Merge branch 'master' into merge/release/3.1-to-master\n\nCommit migrated from d65ede7ef1

This commit is contained in:
Doug Bunting 2019-09-19 12:02:36 -07:00 committed by GitHub
commit 8d0881794a
12 changed files with 20 additions and 18 deletions

View File

@ -39,7 +39,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_RazorGenerateInputsHash></_RazorGenerateInputsHash>
<_RazorGenerateInputsHashFile>$(IntermediateOutputPath)$(MSBuildProjectName).RazorCoreGenerate.cache</_RazorGenerateInputsHashFile>
<_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(RazorSdkDirectoryRoot)tools\netcoreapp3.1\rzc.dll</_RazorToolAssembly>
<_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(RazorSdkDirectoryRoot)tools\netcoreapp5.0\rzc.dll</_RazorToolAssembly>
</PropertyGroup>
<!--

View File

@ -35,7 +35,7 @@ Copyright (c) .NET Foundation. All rights reserved.
Remove comment above ^
Set TargetType="$(OutputType)" to TargetType="Library" - Razor is always a .dll
Remove Returns="@(CscCommandLineArgs)"
Remove <Import Project="Microsoft.Managed.Core.targets"/>
Remove Returns="@(CscCommandLineArgs)"
@ -60,7 +60,7 @@ Copyright (c) .NET Foundation. All rights reserved.
Remove additional steps after calling CSC
Add our FileWrites after the call to CSC
Add Condition="'@(RazorCompile)'!=''" as a condition to the RazorCoreCompile target.
-->
<Target Name="RazorCoreCompile"

View File

@ -30,7 +30,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<!-- Paths to tools, tasks, and extensions are calculated relative to the RazorSdkDirectoryRoot. This can be modified to test a local build. -->
<RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot>
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(DefaultNetCoreTargetFramework)</_RazorSdkTasksTFM>
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp5.0</_RazorSdkTasksTFM>
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
</PropertyGroup>

View File

@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
internal static partial class BuildVariables
{
private static string _msBuildPath = string.Empty;
private static string _microsoftNETCoreApp31PackageVersion = string.Empty;
private static string _MicrosoftNETCoreApp50PackageVersion = string.Empty;
private static string _microsoftNetCompilersToolsetPackageVersion = string.Empty;
static partial void InitializeVariables();
@ -20,12 +20,12 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
}
}
public static string MicrosoftNETCoreApp31PackageVersion
public static string MicrosoftNETCoreApp50PackageVersion
{
get
{
InitializeVariables();
return _microsoftNETCoreApp31PackageVersion;
return _MicrosoftNETCoreApp50PackageVersion;
}
}

View File

@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.AssemblyHasAttribute(result, Path.Combine(OutputPath, "AppWithP2PReference.dll"), "Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute");
}
[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/13303")]
[InitializeTestProject("SimpleMvcFSharp", language: "F#", additionalProjects: "ClassLibrary")]
public async Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttributeToNonCSharpProjects()
{

View File

@ -472,7 +472,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileDoesNotContain(result, razorAssemblyInfo, "Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute");
}
[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/13303")]
[InitializeTestProject("SimpleMvcFSharp", language: "F#")]
public async Task Build_SimpleMvcFSharp_NoopsWithoutFailing()
{
@ -645,7 +645,9 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{
var result = await DotnetMSBuild(
"Build",
"/p:Nullable=enable",
// Remove /p:LangVersion=Default once we've picked up a compiler that supports .NET 5.0.
// Tracked by https://github.com/aspnet/AspNetCore/issues/13304
"/p:Nullable=enable /p:LangVersion=Default",
suppressBuildServer: true);
var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");

View File

@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language);
#if NETCOREAPP
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp3.1";
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp5.0";
#else
#error Target frameworks need to be updated
#endif

View File

@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
// Let the test app know it is running as part of a test.
"/p:RunningAsTest=true",
$"/p:MicrosoftNETCoreApp31PackageVersion={BuildVariables.MicrosoftNETCoreApp31PackageVersion}",
$"/p:MicrosoftNETCoreApp50PackageVersion={BuildVariables.MicrosoftNETCoreApp50PackageVersion}",
$"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}",
// Additional restore sources for projects that require built packages

View File

@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{
public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture>
{
private static readonly string TFM = "netcoreapp3.1";
private static readonly string TFM = "netcoreapp5.0";
public PackIntegrationTest(BuildServerTestFixture buildServer)
: base(buildServer)

View File

@ -329,7 +329,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml");
}
[Fact]
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/13303")]
[InitializeTestProject("SimpleMvcFSharp", language: "F#")]
public async Task Publish_SimpleMvcFSharp_NoopsWithoutFailing()
{
@ -434,7 +434,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
var result = await DotnetMSBuild("Publish", "/p:NoBuild=true");
Assert.BuildFailed(result);
Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp3.1/SimpleMvc.dll because it couldn't be found.
Assert.BuildError(result, "MSB3030"); // Could not copy the file "obj/Debug/netcoreapp5.0/SimpleMvc.dll because it couldn't be found.
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.dll");
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");

View File

@ -7,7 +7,7 @@
This is also a partial workaround for https://github.com/Microsoft/msbuild/issues/2661 - this project
has netcoreapp dependencies that need to be built first.
-->
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<TargetFramework>netcoreapp5.0</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<DefineConstants Condition="'$(PreserveWorkingDirectory)'=='true'">$(DefineConstants);PRESERVE_WORKING_DIRECTORY</DefineConstants>
<!-- Copy references locally so that we can use them in the test. -->
@ -96,7 +96,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
static partial void InitializeVariables()
{
_msBuildPath = @"$(_DesktopMSBuildPath)";
_microsoftNETCoreApp31PackageVersion = "$(MicrosoftNETCoreApp31PackageVersion)";
_MicrosoftNETCoreApp50PackageVersion = "$(MicrosoftNETCoreApp50PackageVersion)";
_microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)";
}
}

View File

@ -2,7 +2,7 @@
<Import Project="RazorTest.Introspection.targets" />
<PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreApp31PackageVersion)</RuntimeFrameworkVersion>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">$(MicrosoftNETCoreApp50PackageVersion)</RuntimeFrameworkVersion>
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
</PropertyGroup>