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