Merge branch 'master' into merge/release/3.0-to-master\n\nCommit migrated from d764ed1025

This commit is contained in:
William Godbe 2019-08-22 15:16:05 -07:00 committed by GitHub
commit 3d19bec655
30 changed files with 66 additions and 64 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Description>Razor is a markup syntax for adding server-side logic to web pages. This assembly contains infrastructure supporting Razor MSBuild integration.</Description> <Description>Razor is a markup syntax for adding server-side logic to web pages. This assembly contains infrastructure supporting Razor MSBuild integration.</Description>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<AssemblyName>rzc</AssemblyName> <AssemblyName>rzc</AssemblyName>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**</DefaultItemExcludes> <DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**</DefaultItemExcludes>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor.</Description> <Description>Razor is a markup syntax for adding server-side logic to web pages. This package contains MSBuild support for Razor.</Description>
<TargetFrameworks>netcoreapp3.0;net46</TargetFrameworks> <TargetFrameworks>netcoreapp5.0;net46</TargetFrameworks>
<TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName> <TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile> <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
@ -19,8 +19,8 @@
<PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" /> <PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataPackageVersion)" Condition="'$(TargetFramework)'=='net46'" /> <PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataPackageVersion)" Condition="'$(TargetFramework)'=='net46'" />
<ProjectReference Include="..\Microsoft.AspNetCore.Mvc.Razor.Extensions\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netcoreapp3.0'" /> <ProjectReference Include="..\Microsoft.AspNetCore.Mvc.Razor.Extensions\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netcoreapp5.0'" />
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netcoreapp3.0'" /> <ProjectReference Include="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netcoreapp5.0'" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -44,7 +44,7 @@
<!-- Layout tasks, compiler, and extensions in the sdk-output folder. The entire folder structure gets packaged as-is into the SDK --> <!-- Layout tasks, compiler, and extensions in the sdk-output folder. The entire folder structure gets packaged as-is into the SDK -->
<MSBuild <MSBuild
Projects="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj" Projects="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj"
Properties="PublishDir=$(SdkOutputPath)tools\netcoreapp3.0;TargetFramework=netcoreapp3.0" Properties="PublishDir=$(SdkOutputPath)tools\netcoreapp5.0;TargetFramework=netcoreapp5.0"
Targets="Publish" /> Targets="Publish" />
<ItemGroup> <ItemGroup>
@ -57,7 +57,7 @@
<ItemGroup> <ItemGroup>
<ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\Microsoft.NET.Sdk.Razor.Tasks.*" /> <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\Microsoft.NET.Sdk.Razor.Tasks.*" />
<ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\netcoreapp3.0*\Microsoft.NET.Sdk.Razor.Tasks.*" /> <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\netcoreapp5.0*\Microsoft.NET.Sdk.Razor.Tasks.*" />
<ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Collections.Immutable.dll" /> <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Collections.Immutable.dll" />
<ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Reflection.Metadata.dll" /> <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\net46*\System.Reflection.Metadata.dll" />

View File

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

View File

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

View File

@ -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 _microsoftNETCoreApp30PackageVersion = 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 MicrosoftNETCoreApp30PackageVersion public static string MicrosoftNETCoreApp50PackageVersion
{ {
get get
{ {
InitializeVariables(); InitializeVariables();
return _microsoftNETCoreApp30PackageVersion; 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"); 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()
{ {

View File

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

View File

@ -37,8 +37,8 @@ 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 NETCOREAPP3_0 #if NETCOREAPP
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp3.0"; MSBuildIntegrationTestBase.TargetFramework = "netcoreapp5.0";
#else #else
#error Target frameworks need to be updated #error Target frameworks need to be updated
#endif #endif

View File

@ -94,7 +94,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:MicrosoftNETCoreApp30PackageVersion={BuildVariables.MicrosoftNETCoreApp30PackageVersion}", $"/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

View File

@ -29,12 +29,12 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@"<files include=""any/netcoreapp3.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); @"<files include=""any/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
Assert.NupkgContains( Assert.NupkgContains(
result, result,
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"), Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"),
Path.Combine("contentFiles", "any", "netcoreapp3.0", "Views", "Shared", "_Layout.cshtml")); Path.Combine("contentFiles", "any", "netcoreapp5.0", "Views", "Shared", "_Layout.cshtml"));
} }
[Fact] [Fact]
@ -56,25 +56,25 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
Assert.NuspecDoesNotContain( Assert.NuspecDoesNotContain(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />");
} }
Assert.NuspecDoesNotContain( Assert.NuspecDoesNotContain(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@"<files include=""any/netcoreapp3.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); @"<files include=""any/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
Assert.NupkgContains( Assert.NupkgContains(
result, result,
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"), Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"),
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")); Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll"));
} }
[Fact] [Fact]
@ -94,25 +94,25 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
Assert.NuspecDoesNotContain( Assert.NuspecDoesNotContain(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />");
} }
Assert.NuspecDoesNotContain( Assert.NuspecDoesNotContain(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@"<files include=""any/netcoreapp3.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); @"<files include=""any/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
Assert.NupkgContains( Assert.NupkgContains(
result, result,
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"), Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"),
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")); Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll"));
} }
[Fact] [Fact]
@ -129,21 +129,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />");
} }
Assert.NupkgContains( Assert.NupkgContains(
result, result,
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.symbols.nupkg"), Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.symbols.nupkg"),
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll"), Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll"),
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")); Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb"));
} }
[Fact] [Fact]
@ -163,19 +163,19 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
Assert.NuspecContains( Assert.NuspecContains(
result, result,
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"), Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
@"<files include=""any/netcoreapp3.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); @"<files include=""any/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />");
} }
Assert.NupkgContains( Assert.NupkgContains(
result, result,
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"), Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.nupkg"),
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")); Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll"));
} }
[Fact] [Fact]

View File

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

View File

@ -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>netcoreapp3.0</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. -->
@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
static partial void InitializeVariables() static partial void InitializeVariables()
{ {
_msBuildPath = @"$(_DesktopMSBuildPath)"; _msBuildPath = @"$(_DesktopMSBuildPath)";
_microsoftNETCoreApp30PackageVersion = "$(MicrosoftNETCoreApp30PackageVersion)"; _MicrosoftNETCoreApp50PackageVersion = "$(MicrosoftNETCoreApp50PackageVersion)";
_microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)"; _microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)";
} }
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks> <TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks> <TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup> </PropertyGroup>

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks> <TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup> </PropertyGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<RuntimeAdditionalRestoreSources Condition="'$(RuntimeAdditionalRestoreSources)' == ''">$(MSBuildThisFileDirectory)..\TestPackageRestoreSource\</RuntimeAdditionalRestoreSources> <RuntimeAdditionalRestoreSources Condition="'$(RuntimeAdditionalRestoreSources)' == ''">$(MSBuildThisFileDirectory)..\TestPackageRestoreSource\</RuntimeAdditionalRestoreSources>
<RestoreSources> <RestoreSources>
$(RestoreSources); $(RestoreSources);

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<Copyright>© Microsoft</Copyright> <Copyright>© Microsoft</Copyright>
<Product>Razor Test</Product> <Product>Razor Test</Product>
<Company>Microsoft</Company> <Company>Microsoft</Company>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup> </PropertyGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -2,7 +2,7 @@
<Import Project="RazorTest.Introspection.targets" /> <Import Project="RazorTest.Introspection.targets" />
<PropertyGroup> <PropertyGroup>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp3.0' ">$(MicrosoftNETCoreApp30PackageVersion)</RuntimeFrameworkVersion> <RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp5.0' ">$(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>

View File

@ -17,7 +17,7 @@
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(RunningAsTest)' == ''"> <PropertyGroup Condition="'$(RunningAsTest)' == ''">

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
<Copyright>© Microsoft</Copyright> <Copyright>© Microsoft</Copyright>
<Product>Razor Test</Product> <Product>Razor Test</Product>
<Company>Microsoft</Company> <Company>Microsoft</Company>

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp5.0</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>