Merge branch 'master' into merge/release/3.1-to-master\n\nCommit migrated from 94fd1eaa85
This commit is contained in:
commit
668e7b3051
|
|
@ -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. -->
|
<!-- 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>
|
<RazorSdkDirectoryRoot Condition="'$(RazorSdkDirectoryRoot)'==''">$(MSBuildThisFileDirectory)..\..\</RazorSdkDirectoryRoot>
|
||||||
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
|
<RazorSdkBuildTasksDirectoryRoot Condition="'$(RazorSdkBuildTasksDirectoryRoot)'==''">$(RazorSdkDirectoryRoot)tasks\</RazorSdkBuildTasksDirectoryRoot>
|
||||||
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">$(DefaultNetCoreTargetFramework)</_RazorSdkTasksTFM>
|
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp5.0</_RazorSdkTasksTFM>
|
||||||
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
|
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
|
||||||
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
|
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
internal static partial class BuildVariables
|
internal static partial class BuildVariables
|
||||||
{
|
{
|
||||||
private static string _msBuildPath = string.Empty;
|
private static string _msBuildPath = string.Empty;
|
||||||
private static string _microsoftNETCoreApp31PackageVersion = string.Empty;
|
private static string _MicrosoftNETCoreApp50PackageVersion = string.Empty;
|
||||||
private static string _microsoftNetCompilersToolsetPackageVersion = string.Empty;
|
private static string _microsoftNetCompilersToolsetPackageVersion = string.Empty;
|
||||||
|
|
||||||
static partial void InitializeVariables();
|
static partial void InitializeVariables();
|
||||||
|
|
@ -20,12 +20,12 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string MicrosoftNETCoreApp31PackageVersion
|
public static string MicrosoftNETCoreApp50PackageVersion
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
InitializeVariables();
|
InitializeVariables();
|
||||||
return _microsoftNETCoreApp31PackageVersion;
|
return _MicrosoftNETCoreApp50PackageVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
Assert.AssemblyHasAttribute(result, Path.Combine(OutputPath, "AppWithP2PReference.dll"), "Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute");
|
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")]
|
[InitializeTestProject("SimpleMvcFSharp", language: "F#", additionalProjects: "ClassLibrary")]
|
||||||
public async Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttributeToNonCSharpProjects()
|
public async Task Build_ProjectWithDependencyThatReferencesMvc_AddsAttributeToNonCSharpProjects()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
Assert.FileDoesNotContain(result, razorAssemblyInfo, "Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute");
|
Assert.FileDoesNotContain(result, razorAssemblyInfo, "Microsoft.AspNetCore.Razor.Hosting.RazorConfigurationNameAttribute");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/13303")]
|
||||||
[InitializeTestProject("SimpleMvcFSharp", language: "F#")]
|
[InitializeTestProject("SimpleMvcFSharp", language: "F#")]
|
||||||
public async Task Build_SimpleMvcFSharp_NoopsWithoutFailing()
|
public async Task Build_SimpleMvcFSharp_NoopsWithoutFailing()
|
||||||
{
|
{
|
||||||
|
|
@ -645,7 +645,9 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
{
|
{
|
||||||
var result = await DotnetMSBuild(
|
var result = await DotnetMSBuild(
|
||||||
"Build",
|
"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);
|
suppressBuildServer: true);
|
||||||
var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");
|
var indexFilePath = Path.Combine(RazorIntermediateOutputPath, "Views", "Home", "Index.cshtml.g.cs");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
|
|
||||||
MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language);
|
MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language);
|
||||||
#if NETCOREAPP
|
#if NETCOREAPP
|
||||||
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp3.1";
|
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp5.0";
|
||||||
#else
|
#else
|
||||||
#error Target frameworks need to be updated
|
#error Target frameworks need to be updated
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
// Let the test app know it is running as part of a test.
|
// Let the test app know it is running as part of a test.
|
||||||
"/p:RunningAsTest=true",
|
"/p:RunningAsTest=true",
|
||||||
|
|
||||||
$"/p:MicrosoftNETCoreApp31PackageVersion={BuildVariables.MicrosoftNETCoreApp31PackageVersion}",
|
$"/p:MicrosoftNETCoreApp50PackageVersion={BuildVariables.MicrosoftNETCoreApp50PackageVersion}",
|
||||||
$"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}",
|
$"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}",
|
||||||
|
|
||||||
// Additional restore sources for projects that require built packages
|
// Additional restore sources for projects that require built packages
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
{
|
{
|
||||||
public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture>
|
public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture>
|
||||||
{
|
{
|
||||||
private static readonly string TFM = "netcoreapp3.1";
|
private static readonly string TFM = "netcoreapp5.0";
|
||||||
|
|
||||||
public PackIntegrationTest(BuildServerTestFixture buildServer)
|
public PackIntegrationTest(BuildServerTestFixture buildServer)
|
||||||
: base(buildServer)
|
: base(buildServer)
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml");
|
Assert.FileCountEquals(result, 0, Path.Combine(PublishOutputPath, "Views"), "*.cshtml");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/13303")]
|
||||||
[InitializeTestProject("SimpleMvcFSharp", language: "F#")]
|
[InitializeTestProject("SimpleMvcFSharp", language: "F#")]
|
||||||
public async Task Publish_SimpleMvcFSharp_NoopsWithoutFailing()
|
public async Task Publish_SimpleMvcFSharp_NoopsWithoutFailing()
|
||||||
{
|
{
|
||||||
|
|
@ -434,7 +434,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
||||||
var result = await DotnetMSBuild("Publish", "/p:NoBuild=true");
|
var result = await DotnetMSBuild("Publish", "/p:NoBuild=true");
|
||||||
|
|
||||||
Assert.BuildFailed(result);
|
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.dll");
|
||||||
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");
|
Assert.FileDoesNotExist(result, PublishOutputPath, "SimpleMvc.Views.dll");
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
This is also a partial workaround for https://github.com/Microsoft/msbuild/issues/2661 - this project
|
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.
|
has netcoreapp dependencies that need to be built first.
|
||||||
-->
|
-->
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
<DefineConstants Condition="'$(PreserveWorkingDirectory)'=='true'">$(DefineConstants);PRESERVE_WORKING_DIRECTORY</DefineConstants>
|
<DefineConstants Condition="'$(PreserveWorkingDirectory)'=='true'">$(DefineConstants);PRESERVE_WORKING_DIRECTORY</DefineConstants>
|
||||||
<!-- Copy references locally so that we can use them in the test. -->
|
<!-- 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()
|
static partial void InitializeVariables()
|
||||||
{
|
{
|
||||||
_msBuildPath = @"$(_DesktopMSBuildPath)";
|
_msBuildPath = @"$(_DesktopMSBuildPath)";
|
||||||
_microsoftNETCoreApp31PackageVersion = "$(MicrosoftNETCoreApp31PackageVersion)";
|
_MicrosoftNETCoreApp50PackageVersion = "$(MicrosoftNETCoreApp50PackageVersion)";
|
||||||
_microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)";
|
_microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="RazorTest.Introspection.targets" />
|
<Import Project="RazorTest.Introspection.targets" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<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 -->
|
<!-- aspnet/BuildTools#662 Don't police what version of NetCoreApp we use -->
|
||||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue