dotnet-razor-precompile does not work when the application targets netcoreapp1.1
Fixes #30
This commit is contained in:
parent
a2b29a5ac4
commit
d9140e97c9
|
|
@ -190,7 +190,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal
|
|||
ProjectContext projectContext;
|
||||
if (TargetFramework != null)
|
||||
{
|
||||
projectContext = projectContexts.FirstOrDefault(context => context.TargetFramework == TargetFramework);
|
||||
projectContext = projectContexts.FirstOrDefault(context => context.TargetFramework.Equals(TargetFramework));
|
||||
if (projectContext == null)
|
||||
{
|
||||
throw new InvalidOperationException($"Project '{ProjectPath}' does not support framework: {FrameworkOption.Value()}");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"xunit": "2.2.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
|
||||
ExecuteForClassLibrary(Command.CreateDotNet(
|
||||
"razor-precompile",
|
||||
GetPrecompileArguments("netcoreapp1.0")));
|
||||
GetPrecompileArguments("netcoreapp1.1")));
|
||||
|
||||
var timestamp = "z" + DateTime.UtcNow.Ticks.ToString().PadLeft(18, '0');
|
||||
var packCommand = Command
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation
|
|||
RuntimeArchitecture.x64)
|
||||
{
|
||||
PublishApplicationBeforeDeployment = true,
|
||||
TargetFramework = flavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.0",
|
||||
TargetFramework = flavor == RuntimeFlavor.Clr ? "net451" : "netcoreapp1.1",
|
||||
Configuration = "Release",
|
||||
EnvironmentVariables =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"xunit": "2.2.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"Microsoft.Extensions.Logging.Console": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Tools": "1.1.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"netcoreapp1.1": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"version": "1.1.0-*",
|
||||
|
|
|
|||
Loading…
Reference in New Issue