From 6d757988c9399af16f61dcf94c0f3f42df01642b Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Mon, 29 Jan 2018 11:41:10 -0800 Subject: [PATCH] Integrate new Sdk The project file change is a workaround for https://github.com/Microsoft/msbuild/issues/2874 --- korebuild-lock.txt | 4 ++-- ...ualStudio.Mac.LanguageServices.Razor.csproj | 2 +- .../IntegrationTests/PublishIntegrationTest.cs | 18 ++++++++++++++++-- .../AppWithP2PReference.csproj | 3 --- test/testapps/ClassLibrary/ClassLibrary.csproj | 4 ++-- test/testapps/SimpleMvc/SimpleMvc.csproj | 3 --- test/testapps/SimplePages/SimplePages.csproj | 3 --- 7 files changed, 21 insertions(+), 16 deletions(-) diff --git a/korebuild-lock.txt b/korebuild-lock.txt index c76ae7f9e1..4d18d19325 100644 --- a/korebuild-lock.txt +++ b/korebuild-lock.txt @@ -1,2 +1,2 @@ -version:2.1.0-preview2-15692 -commithash:5d9f445ce3f8492451a6f461df7e739bbed6a7f8 +version:2.1.0-preview2-15696 +commithash:85ae1301d1a2ff19aab6837cc657699ccca719b5 diff --git a/src/Microsoft.VisualStudio.Mac.LanguageServices.Razor/Microsoft.VisualStudio.Mac.LanguageServices.Razor.csproj b/src/Microsoft.VisualStudio.Mac.LanguageServices.Razor/Microsoft.VisualStudio.Mac.LanguageServices.Razor.csproj index 2a450c409d..69e9071704 100644 --- a/src/Microsoft.VisualStudio.Mac.LanguageServices.Razor/Microsoft.VisualStudio.Mac.LanguageServices.Razor.csproj +++ b/src/Microsoft.VisualStudio.Mac.LanguageServices.Razor/Microsoft.VisualStudio.Mac.LanguageServices.Razor.csproj @@ -1,7 +1,7 @@  - net461 + net461 Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor design-time infrastructure for Visual Studio for Mac. false diff --git a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs index 6089d6f378..6b80b97be6 100644 --- a/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs +++ b/test/Microsoft.AspNetCore.Razor.Design.Test/IntegrationTests/PublishIntegrationTest.cs @@ -74,14 +74,28 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml"); } - [Fact] + [Fact] // This will use the old precompilation tool, RazorSDK shouldn't get involved. [InitializeTestProject("SimpleMvc")] - public async Task Publish_WithMvcRazorCompileOnPublish_PublishesAssembly() + public async Task Publish_WithMvcRazorCompileOnPublish_Noops() { var result = await DotnetMSBuild("Publish", "/p:MvcRazorCompileOnPublish=true"); Assert.BuildPassed(result); + Assert.FileExists(result, PublishOutputPath, "SimpleMvc.dll"); + Assert.FileExists(result, PublishOutputPath, "SimpleMvc.pdb"); + Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.PrecompiledViews.dll"); + Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.PrecompiledViews.pdb"); + } + + [Fact] // This is an override to force the new toolset + [InitializeTestProject("SimpleMvc")] + public async Task Publish_WithMvcRazorCompileOnPublish_AndRazorSDK_PublishesAssembly() + { + var result = await DotnetMSBuild("Publish", "/p:MvcRazorCompileOnPublish=true /p:ResolvedRazorCompileToolset=RazorSDK"); + + Assert.BuildPassed(result); + Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.PrecompiledViews.dll"); Assert.FileDoesNotExist(result, OutputPath, "SimpleMvc.PrecompiledViews.pdb"); diff --git a/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj b/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj index 6320e074c5..fe9d5d2940 100644 --- a/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj +++ b/test/testapps/AppWithP2PReference/AppWithP2PReference.csproj @@ -11,9 +11,6 @@ netcoreapp2.0 - - - RazorSDK diff --git a/test/testapps/ClassLibrary/ClassLibrary.csproj b/test/testapps/ClassLibrary/ClassLibrary.csproj index bc881dfa84..443d790efa 100644 --- a/test/testapps/ClassLibrary/ClassLibrary.csproj +++ b/test/testapps/ClassLibrary/ClassLibrary.csproj @@ -13,8 +13,8 @@ netcoreapp2.0 - - RazorSDK + + RazorSDK diff --git a/test/testapps/SimpleMvc/SimpleMvc.csproj b/test/testapps/SimpleMvc/SimpleMvc.csproj index 1b4b28d00f..31c006b2f3 100644 --- a/test/testapps/SimpleMvc/SimpleMvc.csproj +++ b/test/testapps/SimpleMvc/SimpleMvc.csproj @@ -12,9 +12,6 @@ netcoreapp2.0 - - - RazorSDK diff --git a/test/testapps/SimplePages/SimplePages.csproj b/test/testapps/SimplePages/SimplePages.csproj index 25735b5b03..340a6f14db 100644 --- a/test/testapps/SimplePages/SimplePages.csproj +++ b/test/testapps/SimplePages/SimplePages.csproj @@ -12,9 +12,6 @@ netcoreapp2.0 - - - RazorSDK