Integrate new Sdk

The project file change is a workaround for
https://github.com/Microsoft/msbuild/issues/2874
This commit is contained in:
Ryan Nowak 2018-01-29 11:41:10 -08:00 committed by Pranav K
parent 0a7edd665e
commit 6d757988c9
7 changed files with 21 additions and 16 deletions

View File

@ -1,2 +1,2 @@
version:2.1.0-preview2-15692
commithash:5d9f445ce3f8492451a6f461df7e739bbed6a7f8
version:2.1.0-preview2-15696
commithash:85ae1301d1a2ff19aab6837cc657699ccca719b5

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461</TargetFrameworks>
<TargetFramework>net461</TargetFramework>
<Description>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.</Description>
<EnableApiCheck>false</EnableApiCheck>
</PropertyGroup>

View File

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

View File

@ -11,9 +11,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup>
<!-- Test Placeholder -->

View File

@ -13,8 +13,8 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
<!-- This is needed without a reference to the Web SDK. See: #1986 -->
<ResolvedRazorCompileToolset>RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup>
<!-- Test Placeholder -->

View File

@ -12,9 +12,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup>
<!-- Test Placeholder -->

View File

@ -12,9 +12,6 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<!-- Workaround until we get a new SDK build -->
<ResolvedRazorCompileToolset Condition="'$(RazorCompileToolset)'==''">RazorSDK</ResolvedRazorCompileToolset>
</PropertyGroup>
<!-- Test Placeholder -->