From 3a0fa2de363e993d8ee817efce8f24262108746d Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 18 Jan 2018 19:25:54 -0800 Subject: [PATCH] Update to handle changes from Web SDK The Web SDK is adding new properties that will make it clear whether MvcPrecompilation or Razor SDK should be used. This change introduces the new setting and a workaround until we can get the new SDK integrated. --- .../Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets | 4 ++-- .../ApplicationUsingRelativePaths.csproj | 3 +++ .../ApplicationWithConfigureMvc.csproj | 5 ++++- .../ApplicationWithCustomInputFiles.csproj | 3 +++ .../ApplicationWithParseErrors.csproj | 3 +++ .../ApplicationWithRazorSdkNeitherUsed.csproj | 3 +++ .../ApplicationWithRazorSdkPrecompilationUsed.csproj | 3 +++ .../ApplicationWithRazorSdkUsed.csproj | 6 +++--- .../ApplicationWithTagHelpers.csproj | 3 +++ .../ClassLibraryWithPrecompiledViews.csproj | 3 +++ .../PublishWithEmbedViewSources.csproj | 3 +++ testapps/RazorPagesApp/RazorPagesApp.csproj | 3 +++ testapps/SimpleApp/SimpleApp.csproj | 3 +++ .../SimpleAppWithAssemblyRename.csproj | 3 +++ testapps/StrongNamedApp/StrongNamedApp.csproj | 3 +++ 15 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets index 7744c4dd4c..e026bad426 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets +++ b/src/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation/build/netstandard2.0/Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.targets @@ -166,12 +166,12 @@ Name="_MvcRazorPrecompileOnPublish" DependsOnTargets="MvcRazorPrecompile" AfterTargets="PrepareForPublish" - Condition="'$(MvcRazorCompileOnPublish)'=='true'" /> + Condition="'$(ResolvedRazorCompileToolset)'=='PrecompilationTool'and '$(MvcRazorCompileOnPublish)'=='true'" /> + Condition="'$(ResolvedRazorCompileToolset)'=='PrecompilationTool'and '$(MvcRazorCompileOnPublish)'=='true'"> <_MvcRazorOutputPdbFullPath>$([System.IO.Path]::ChangeExtension('$(_MvcRazorOutputFullPath)', '.pdb')) diff --git a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj index f330f2386d..48cb8ef294 100644 --- a/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj +++ b/testapps/ApplicationUsingRelativePaths/ApplicationUsingRelativePaths.csproj @@ -2,6 +2,9 @@ $(StandardTestAppTfms) + + + PrecompilationTool true diff --git a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj index f27f45283b..ad9d3b1bb8 100644 --- a/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj +++ b/testapps/ApplicationWithConfigureMvc/ApplicationWithConfigureMvc.csproj @@ -2,8 +2,11 @@ $(StandardTestAppTfms) - true $(DefineConstants);TEST123 + + + PrecompilationTool + true diff --git a/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj b/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj index f9904ee766..78e05d4d69 100644 --- a/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj +++ b/testapps/ApplicationWithCustomInputFiles/ApplicationWithCustomInputFiles.csproj @@ -2,6 +2,9 @@ $(StandardTestAppTfms) + + + PrecompilationTool true true diff --git a/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj b/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj index f330f2386d..48cb8ef294 100644 --- a/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj +++ b/testapps/ApplicationWithParseErrors/ApplicationWithParseErrors.csproj @@ -2,6 +2,9 @@ $(StandardTestAppTfms) + + + PrecompilationTool true diff --git a/testapps/ApplicationWithRazorSdkNeitherUsed/ApplicationWithRazorSdkNeitherUsed.csproj b/testapps/ApplicationWithRazorSdkNeitherUsed/ApplicationWithRazorSdkNeitherUsed.csproj index fbe8aa5b8d..12c64c8ef4 100644 --- a/testapps/ApplicationWithRazorSdkNeitherUsed/ApplicationWithRazorSdkNeitherUsed.csproj +++ b/testapps/ApplicationWithRazorSdkNeitherUsed/ApplicationWithRazorSdkNeitherUsed.csproj @@ -3,6 +3,9 @@ $(StandardTestAppTfms) + + + diff --git a/testapps/ApplicationWithRazorSdkPrecompilationUsed/ApplicationWithRazorSdkPrecompilationUsed.csproj b/testapps/ApplicationWithRazorSdkPrecompilationUsed/ApplicationWithRazorSdkPrecompilationUsed.csproj index 322c04a44e..bb01501352 100644 --- a/testapps/ApplicationWithRazorSdkPrecompilationUsed/ApplicationWithRazorSdkPrecompilationUsed.csproj +++ b/testapps/ApplicationWithRazorSdkPrecompilationUsed/ApplicationWithRazorSdkPrecompilationUsed.csproj @@ -3,6 +3,9 @@ $(StandardTestAppTfms) + + PrecompilationTool + diff --git a/testapps/ApplicationWithRazorSdkUsed/ApplicationWithRazorSdkUsed.csproj b/testapps/ApplicationWithRazorSdkUsed/ApplicationWithRazorSdkUsed.csproj index d97fb72b16..75dc7a5aa3 100644 --- a/testapps/ApplicationWithRazorSdkUsed/ApplicationWithRazorSdkUsed.csproj +++ b/testapps/ApplicationWithRazorSdkUsed/ApplicationWithRazorSdkUsed.csproj @@ -2,11 +2,11 @@ - - - $(StandardTestAppTfms) + + RazorSDK + true diff --git a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj index d86ac254e6..0106aad199 100644 --- a/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj +++ b/testapps/ApplicationWithTagHelpers/ApplicationWithTagHelpers.csproj @@ -2,6 +2,9 @@ $(StandardTestAppTfms) + + + PrecompilationTool true diff --git a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj index b0e5e2f417..e271f1eb50 100644 --- a/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj +++ b/testapps/ClassLibraryWithPrecompiledViews/ClassLibraryWithPrecompiledViews.csproj @@ -3,6 +3,9 @@ $(StandardTestAppTfms) obj\precompiled\$(TargetFramework) + + + PrecompilationTool true diff --git a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj index 1362dd84ec..fc5e5b8e96 100644 --- a/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj +++ b/testapps/PublishWithEmbedViewSources/PublishWithEmbedViewSources.csproj @@ -2,6 +2,9 @@ $(StandardTestAppTfms) + + + PrecompilationTool true true diff --git a/testapps/RazorPagesApp/RazorPagesApp.csproj b/testapps/RazorPagesApp/RazorPagesApp.csproj index 5ab7219211..2b28d5d146 100644 --- a/testapps/RazorPagesApp/RazorPagesApp.csproj +++ b/testapps/RazorPagesApp/RazorPagesApp.csproj @@ -2,6 +2,9 @@ $(StandardTestAppTfms) + + + PrecompilationTool true diff --git a/testapps/SimpleApp/SimpleApp.csproj b/testapps/SimpleApp/SimpleApp.csproj index f57d869aeb..d444257567 100644 --- a/testapps/SimpleApp/SimpleApp.csproj +++ b/testapps/SimpleApp/SimpleApp.csproj @@ -3,6 +3,9 @@ $(StandardTestAppTfms) win7-x86;debian-x64 + + + PrecompilationTool true diff --git a/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj b/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj index 1a8db3562d..778d1b9c0b 100644 --- a/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj +++ b/testapps/SimpleAppWithAssemblyRename/SimpleAppWithAssemblyRename.csproj @@ -3,6 +3,9 @@ NewAssemblyName $(StandardTestAppTfms) + + + PrecompilationTool true diff --git a/testapps/StrongNamedApp/StrongNamedApp.csproj b/testapps/StrongNamedApp/StrongNamedApp.csproj index 9691746590..fb31fa9ff5 100644 --- a/testapps/StrongNamedApp/StrongNamedApp.csproj +++ b/testapps/StrongNamedApp/StrongNamedApp.csproj @@ -4,6 +4,9 @@ $(StandardTestAppTfms) true true + + + PrecompilationTool true