From 233e67d0e0ff2413af4699ebf257efe9a7ac83ce Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 18 Jan 2018 19:08:03 -0800 Subject: [PATCH] Prepare for Web SDK changes The Web SDK is going to set a new msbuild property to tell us that the Razor SDK should be active. This hasn't been integrated into our build system yet, so I'm temporarily hacking it until we get that change. At that time I'll remove the special cases in these projects. --- .../Microsoft.AspNetCore.Razor.Design.targets | 15 ++++++++------- .../AppWithP2PReference.csproj | 3 +++ test/testapps/ClassLibrary/ClassLibrary.csproj | 3 +++ test/testapps/SimpleMvc/SimpleMvc.csproj | 3 +++ test/testapps/SimplePages/SimplePages.csproj | 3 +++ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.targets b/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.targets index 9089c4afd3..31760bbbb9 100644 --- a/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.targets +++ b/src/Microsoft.AspNetCore.Razor.Design/build/netstandard2.0/Microsoft.AspNetCore.Razor.Design.targets @@ -165,7 +165,7 @@ Name="_RazorPrepareForPublish" AfterTargets="PrepareForPublish" DependsOnTargets="RazorCompile" - Condition="'$(RazorCompileOnPublish)'=='true'"> + Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true'"> + Condition="'$(ResolvedRazorCompileToolset)'=='RazorSdk' and '$(RazorCompileOnPublish)'=='true' and '@(RazorGenerate)'!=''"> diff --git a/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj b/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj index e2d48c63e2..2ef0434947 100644 --- a/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj +++ b/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj @@ -1,6 +1,9 @@ netcoreapp2.0 + + + RazorSDK diff --git a/test/testapps/ClassLibrary/ClassLibrary.csproj b/test/testapps/ClassLibrary/ClassLibrary.csproj index 55162547b1..7e9ea198c6 100644 --- a/test/testapps/ClassLibrary/ClassLibrary.csproj +++ b/test/testapps/ClassLibrary/ClassLibrary.csproj @@ -1,6 +1,9 @@ netcoreapp2.0 + + + RazorSDK diff --git a/test/testapps/SimpleMvc/SimpleMvc.csproj b/test/testapps/SimpleMvc/SimpleMvc.csproj index d09da0df29..e553d82b2a 100644 --- a/test/testapps/SimpleMvc/SimpleMvc.csproj +++ b/test/testapps/SimpleMvc/SimpleMvc.csproj @@ -1,6 +1,9 @@ netcoreapp2.0 + + + RazorSDK diff --git a/test/testapps/SimplePages/SimplePages.csproj b/test/testapps/SimplePages/SimplePages.csproj index d09da0df29..e553d82b2a 100644 --- a/test/testapps/SimplePages/SimplePages.csproj +++ b/test/testapps/SimplePages/SimplePages.csproj @@ -1,6 +1,9 @@ netcoreapp2.0 + + + RazorSDK