Merge branch 'release/3.1'

\n\nCommit migrated from 7ff56a9e0d
This commit is contained in:
John Luo 2019-09-18 14:03:50 -07:00
commit 19b84ed7a4
27 changed files with 82 additions and 88 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>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</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>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</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>netcoreapp5.0;net46</TargetFrameworks> <TargetFrameworks>$(DefaultNetCoreTargetFramework);net46</TargetFrameworks>
<TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName> <TargetName>Microsoft.NET.Sdk.Razor.Tasks</TargetName>
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile> <NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
@ -11,6 +11,8 @@
<!-- Allow assemblies outside of lib in the package --> <!-- Allow assemblies outside of lib in the package -->
<NoWarn>$(NoWarn);NU5100</NoWarn> <NoWarn>$(NoWarn);NU5100</NoWarn>
<!-- It is intentional to not include build/netstandard2.0/Microsoft.NET.Sdk.Razor.targets -->
<NoWarn>$(NoWarn);NU5129</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -19,8 +21,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)'=='netcoreapp5.0'" /> <ProjectReference Include="..\Microsoft.AspNetCore.Mvc.Razor.Extensions\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'" />
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='netcoreapp5.0'" /> <ProjectReference Include="..\Microsoft.AspNetCore.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.csproj" ReferenceOutputAssembly="false" Condition="'$(TargetFramework)'=='$(DefaultNetCoreTargetFramework)'" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -44,7 +46,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\netcoreapp5.0;TargetFramework=netcoreapp5.0" Properties="PublishDir=$(SdkOutputPath)tools\$(DefaultNetCoreTargetFramework);TargetFramework=$(DefaultNetCoreTargetFramework)"
Targets="Publish" /> Targets="Publish" />
<ItemGroup> <ItemGroup>
@ -57,7 +59,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)\netcoreapp5.0*\Microsoft.NET.Sdk.Razor.Tasks.*" /> <ProjectOutput Include="$(ArtifactsBinDir)Microsoft.NET.Sdk.Razor\$(Configuration)\$(DefaultNetCoreTargetFramework)*\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

@ -2,6 +2,9 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata> <metadata>
$CommonMetadataElements$ $CommonMetadataElements$
<dependencies>
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata> </metadata>
<files> <files>

View File

@ -174,8 +174,8 @@ Copyright (c) .NET Foundation. All rights reserved.
<Target Name="_ResolveGeneratedRazorCompileInputs"> <Target Name="_ResolveGeneratedRazorCompileInputs">
<ItemGroup> <ItemGroup>
<RazorCompile <RazorCompile
Include="%(RazorGenerateWithTargetPath.GeneratedOutput)" Include="%(RazorGenerateWithTargetPath.GeneratedOutput)"
Condition="'%(RazorGenerateWithTargetPath.DocumentKind)'=='mvc'" /> Condition="'%(RazorGenerateWithTargetPath.DocumentKind)'=='mvc'" />
</ItemGroup> </ItemGroup>
</Target> </Target>

View File

@ -639,7 +639,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll"); Assert.FileDoesNotExist(result, IntermediateOutputPath, "SimpleMvc.Views.dll");
} }
[Fact] [Fact(Skip = "Default C# version is 7.3 for netcoreapp3.1 and later https://github.com/aspnet/AspNetCore/issues/13930")]
[InitializeTestProject("SimpleMvc")] [InitializeTestProject("SimpleMvc")]
public async Task Build_ImplicitCSharp8_NullableEnforcement_WarningsDuringBuild_NoBuildServer() public async Task Build_ImplicitCSharp8_NullableEnforcement_WarningsDuringBuild_NoBuildServer()
{ {

View File

@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
Assert.BuildOutputDoesNotContainLine(result, "ProjectCapability: DotNetCoreRazorConfiguration"); Assert.BuildOutputDoesNotContainLine(result, "ProjectCapability: DotNetCoreRazorConfiguration");
} }
[Fact] [Fact (Skip = "https://github.com/aspnet/AspNetCore-Tooling/pull/1122#issuecomment-530976125")]
[InitializeTestProject("SimpleMvc11")] [InitializeTestProject("SimpleMvc11")]
public async Task RazorSdk_DoesNotBuildViewsForNetCoreApp11Projects() public async Task RazorSdk_DoesNotBuildViewsForNetCoreApp11Projects()
{ {

View File

@ -104,7 +104,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{ {
if (!Directory.Exists(LocalNugetPackagesCacheTempPath)) if (!Directory.Exists(LocalNugetPackagesCacheTempPath))
{ {
// The local cache folder needs to exist so that nuget // The local cache folder needs to exist so that nuget
Directory.CreateDirectory(LocalNugetPackagesCacheTempPath); Directory.CreateDirectory(LocalNugetPackagesCacheTempPath);
} }
} }

View File

@ -11,6 +11,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
{ {
public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture> public class PackIntegrationTest : MSBuildIntegrationTestBase, IClassFixture<BuildServerTestFixture>
{ {
private static readonly string TFM = "netcoreapp5.0";
public PackIntegrationTest(BuildServerTestFixture buildServer) public PackIntegrationTest(BuildServerTestFixture buildServer)
: base(buildServer) : base(buildServer)
{ {
@ -29,12 +31,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/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); $@"<files include=""any/{TFM}/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", "netcoreapp5.0", "Views", "Shared", "_Layout.cshtml")); Path.Combine("contentFiles", "any", TFM, "Views", "Shared", "_Layout.cshtml"));
} }
[Fact] [Fact]
@ -56,25 +58,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, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); $@"<files include=""any/{TFM}/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", "netcoreapp5.0", "ClassLibrary.Views.dll")); Path.Combine("lib", TFM, "ClassLibrary.Views.dll"));
} }
[Fact] [Fact]
@ -94,25 +96,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, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); $@"<files include=""any/{TFM}/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", "netcoreapp5.0", "ClassLibrary.Views.dll")); Path.Combine("lib", TFM, "ClassLibrary.Views.dll"));
} }
[Fact] [Fact]
@ -129,21 +131,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, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.pdb")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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", "netcoreapp5.0", "ClassLibrary.Views.dll"), Path.Combine("lib", TFM, "ClassLibrary.Views.dll"),
Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")); Path.Combine("lib", TFM, "ClassLibrary.Views.pdb"));
} }
[Fact] [Fact]
@ -163,19 +165,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, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " + $"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, TFM, "ClassLibrary.Views.dll")}\" " +
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />"); $"target=\"{Path.Combine("lib", TFM, "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/netcoreapp5.0/Views/Shared/_Layout.cshtml"" buildAction=""Content"" />"); $@"<files include=""any/{TFM}/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", "netcoreapp5.0", "ClassLibrary.Views.dll")); Path.Combine("lib", TFM, "ClassLibrary.Views.dll"));
} }
[Fact] [Fact]

View File

@ -73,7 +73,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
var newProjectFilePath = Path.Combine(directoryPath, targetProjectName + extension); var newProjectFilePath = Path.Combine(directoryPath, targetProjectName + extension);
File.Move(oldProjectFilePath, newProjectFilePath); File.Move(oldProjectFilePath, newProjectFilePath);
CopyGlobalJson(repositoryRoot, destinationPath); CopyRepositoryAssets(repositoryRoot, destinationPath);
return new ProjectDirectory( return new ProjectDirectory(
destinationPath, destinationPath,
@ -140,16 +140,16 @@ $@"<Project>
}); });
} }
void CopyGlobalJson(string repositoryRoot, string projectRoot) void CopyRepositoryAssets(string repositoryRoot, string projectRoot)
{ {
var srcGlobalJson = Path.Combine(repositoryRoot, "global.json"); var files = new[] { "global.json", "NuGet.config" };
if (!File.Exists(srcGlobalJson))
{
throw new InvalidOperationException("global.json at the root of the repository could not be found. Run './build /t:Noop' at the repository root and re-run these tests.");
}
var destinationGlobalJson = Path.Combine(projectRoot, "global.json"); foreach (var file in files)
File.Copy(srcGlobalJson, destinationGlobalJson); {
var srcFile = Path.Combine(repositoryRoot, file);
var destinationFile = Path.Combine(projectRoot, file);
File.Copy(srcFile, destinationFile);
}
} }
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks> <TargetFrameworks>$(DefaultNetCoreTargetFramework);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>netcoreapp5.0;net461</TargetFrameworks> <TargetFrameworks>$(DefaultNetCoreTargetFramework);net461</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup> </PropertyGroup>

View File

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks> <TargetFrameworks>$(DefaultNetCoreTargetFramework);net461</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext> <PreserveCompilationContext>true</PreserveCompilationContext>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" /> <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourcePackageVersion)" />
<PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebPackageVersion)" /> <PackageReference Include="System.Text.Encodings.Web" Version="$(SystemTextEncodingsWebPackageVersion)" />
<ProjectReference Include="..\Microsoft.AspNetCore.Razor.Test.ComponentShim\Microsoft.AspNetCore.Razor.Test.ComponentShim.csproj" /> <ProjectReference Include="..\Microsoft.AspNetCore.Razor.Test.ComponentShim\Microsoft.AspNetCore.Razor.Test.ComponentShim.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot> <RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,16 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot> <RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<RuntimeAdditionalRestoreSources Condition="'$(RuntimeAdditionalRestoreSources)' == ''">$(MSBuildThisFileDirectory)..\TestPackageRestoreSource\</RuntimeAdditionalRestoreSources> <RuntimeAdditionalRestoreSources Condition="'$(RuntimeAdditionalRestoreSources)'==''">$(MSBuildThisFileDirectory)..\TestPackageRestoreSource\</RuntimeAdditionalRestoreSources>
<RestoreSources> <RestoreAdditionalProjectSources>$(RestoreAdditionalProjectSources);$(RuntimeAdditionalRestoreSources)</RestoreAdditionalProjectSources>
$(RestoreSources);
$(RuntimeAdditionalRestoreSources)
</RestoreSources>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot> <RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
</PropertyGroup> </PropertyGroup>
@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<Copyright>© Microsoft</Copyright> <Copyright>© Microsoft</Copyright>
<Product>Razor Test</Product> <Product>Razor Test</Product>
<Company>Microsoft</Company> <Company>Microsoft</Company>

View File

@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot> <RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup> </PropertyGroup>
@ -13,7 +13,7 @@
<!-- We don't want to run build server when not running as tests. --> <!-- We don't want to run build server when not running as tests. -->
<UseRazorBuildServer>false</UseRazorBuildServer> <UseRazorBuildServer>false</UseRazorBuildServer>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\ClassLibrary\ClassLibrary.csproj" /> <ProjectReference Include="..\ClassLibrary\ClassLibrary.csproj" />
</ItemGroup> </ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -18,19 +18,6 @@
<RazorSdkCurrentVersionProps>$(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps> <RazorSdkCurrentVersionProps>$(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.props</RazorSdkCurrentVersionProps>
<RazorSdkCurrentVersionTargets>$(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets> <RazorSdkCurrentVersionTargets>$(SolutionRoot)src\Microsoft.NET.Sdk.Razor\build\netstandard2.0\Sdk.Razor.CurrentVersion.targets</RazorSdkCurrentVersionTargets>
<!-- Necessary while testing with unreleased packages. -->
<RestoreSources>
$(RestoreSources);
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json;
https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json;
https://api.nuget.org/v3/index.json;
</RestoreSources>
<RestoreSources Condition="$(BuildingTestAppsIndependently) == false">
$(RestoreSources);
https://dotnet.myget.org/F/roslyn/api/v3/index.json;
</RestoreSources>
</PropertyGroup> </PropertyGroup>
<Import Project="$(SolutionRoot)..\..\eng\Versions.props" /> <Import Project="$(SolutionRoot)..\..\eng\Versions.props" />
@ -38,6 +25,9 @@
<PropertyGroup> <PropertyGroup>
<!-- Working around an issue in XDT transforms --> <!-- Working around an issue in XDT transforms -->
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel> <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
<!-- Working around https://github.com/NuGet/Home/issues/8467 -->
<NoWarn>$(NoWarn);NU5131</NoWarn>
</PropertyGroup> </PropertyGroup>
<!-- Don't use the server when building in place. This locks up rzc.dll --> <!-- Don't use the server when building in place. This locks up rzc.dll -->

View File

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

View File

@ -17,7 +17,7 @@
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(RunningAsTest)' == ''"> <PropertyGroup Condition="'$(RunningAsTest)' == ''">
@ -33,8 +33,8 @@
<ItemGroup Condition="'$(BinariesRoot)'!=''"> <ItemGroup Condition="'$(BinariesRoot)'!=''">
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/> <Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.ComponentShim.dll"/>
<Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/> <Reference Include="$(BinariesRoot)\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.dll"/>
</ItemGroup> </ItemGroup>
<!-- Test Placeholder --> <!-- Test Placeholder -->
</Project> </Project>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,5 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot> <RazorSdkDirectoryRoot>$(RazorSdkArtifactsDirectory)$(Configuration)\sdk-output\</RazorSdkDirectoryRoot>
</PropertyGroup> </PropertyGroup>
@ -9,7 +9,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</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>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -5,7 +5,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp5.0</TargetFramework> <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>