dotnet-razor-precompile does not work when the application targets netcoreapp1.1

Fixes #30
This commit is contained in:
Pranav K 2016-11-11 15:57:58 -08:00
parent a2b29a5ac4
commit d9140e97c9
12 changed files with 12 additions and 12 deletions

View File

@ -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()}");

View File

@ -5,7 +5,7 @@
"xunit": "2.2.0-*"
},
"frameworks": {
"netcoreapp1.0": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",

View File

@ -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

View File

@ -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 =
{

View File

@ -15,7 +15,7 @@
"xunit": "2.2.0-*"
},
"frameworks": {
"netcoreapp1.0": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",

View File

@ -14,7 +14,7 @@
"Microsoft.Extensions.Logging.Console": "1.1.0-*"
},
"frameworks": {
"netcoreapp1.0": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.1.0-*",

View File

@ -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-*",

View File

@ -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-*",

View File

@ -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-*",

View File

@ -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-*",

View File

@ -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-*",

View File

@ -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-*",