зеркало из https://github.com/dotnet/razor.git
Retarget to netcoreapp5.0 (#996)
This commit is contained in:
Родитель
b187ff36c6
Коммит
5908616812
|
@ -8,6 +8,29 @@
|
|||
<BundledNETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Source Build still uses a 3.0 SDK, which we need to retarget to 5.0 until the first 5.0 SDK is publicly released -->
|
||||
<ItemGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
|
||||
<KnownFrameworkReference
|
||||
Include="@(KnownFrameworkReference->WithMetadataValue('TargetFramework', 'netcoreapp3.0'))"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
/>
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Workaround while there is no publicly released 5.0 SDK available for source build, suppress unsupported version error -->
|
||||
<PropertyGroup Condition="'$(DotNetBuildFromSource)' == 'true'">
|
||||
<NETCoreAppMaximumVersion>5.0</NETCoreAppMaximumVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Workaround while there is no publicly released 5.0 SDK available for source build -->
|
||||
<ItemGroup>
|
||||
<FrameworkReference
|
||||
Update="Microsoft.NETCore.App"
|
||||
Condition="'$(TargetFramework)' == 'netcoreapp5.0' and '$(DotNetBuildFromSource)' == 'true'"
|
||||
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimeVersion)"
|
||||
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
|
||||
/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Track compiler separately from Arcade.-->
|
||||
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<MicrosoftCodeAnalysisCommonPackageVersion>3.3.0</MicrosoftCodeAnalysisCommonPackageVersion>
|
||||
<MicrosoftCodeAnalysisCSharpPackageVersion>3.3.0</MicrosoftCodeAnalysisCSharpPackageVersion>
|
||||
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>3.3.0</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
|
||||
<MicrosoftNETCoreApp30PackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreApp30PackageVersion>
|
||||
<MicrosoftNETCoreApp50PackageVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreApp50PackageVersion>
|
||||
<MicrosoftNETFrameworkReferenceAssemblies>1.0.0-alpha-5</MicrosoftNETFrameworkReferenceAssemblies>
|
||||
<MicrosoftNetRoslynDiagnosticsPackageVersion>2.6.3</MicrosoftNetRoslynDiagnosticsPackageVersion>
|
||||
<MicrosoftVisualStudioComponentModelHostPackageVersion>16.0.467</MicrosoftVisualStudioComponentModelHostPackageVersion>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"tools": {
|
||||
"dotnet": "3.0.100-preview7-012821",
|
||||
"dotnet": "5.0.100-alpha1-013788",
|
||||
"runtimes": {
|
||||
"dotnet": [
|
||||
"2.1.11",
|
||||
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
},
|
||||
"sdk": {
|
||||
"version": "3.0.100-preview7-012821"
|
||||
"version": "5.0.100-alpha1-013788"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19416.16"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<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>
|
||||
<AssemblyName>rzc</AssemblyName>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<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>
|
||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
||||
|
@ -19,8 +19,8 @@
|
|||
<PackageReference Include="Microsoft.Extensions.CommandLineUtils.Sources" Version="$(MicrosoftExtensionsCommandLineUtilsSourcesPackageVersion)" />
|
||||
<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.Razor.Tools\Microsoft.AspNetCore.Razor.Tools.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)'=='netcoreapp5.0'" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -36,13 +36,15 @@
|
|||
<Compile Include="..\Microsoft.AspNetCore.Razor.Tools\Client.cs">
|
||||
<Link>Shared\Client.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Content Include="_._" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="LayoutDependencies" BeforeTargets="Build" Condition="'$(IsInnerBuild)' != 'true'">
|
||||
<!-- Layout tasks, compiler, and extensions in the sdk-output folder. The entire folder structure gets packaged as-is into the SDK -->
|
||||
<MSBuild
|
||||
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" />
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -55,7 +57,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<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.Reflection.Metadata.dll" />
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<file src="Sdk\*" target="Sdk" />
|
||||
<file src="build\**" target="build" />
|
||||
<file src="buildMultiTargeting\**" target="buildMultiTargeting" />
|
||||
<file src="_._" target="lib\netstandard2.0\_._" />
|
||||
|
||||
<file src="$outputPath$\**" target="\" />
|
||||
</files>
|
||||
|
|
|
@ -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.0\rzc.dll</_RazorToolAssembly>
|
||||
<_RazorToolAssembly Condition="'$(_RazorToolAssembly)'==''">$(RazorSdkDirectoryRoot)tools\netcoreapp5.0\rzc.dll</_RazorToolAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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'">netcoreapp3.0</_RazorSdkTasksTFM>
|
||||
<_RazorSdkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core'">netcoreapp5.0</_RazorSdkTasksTFM>
|
||||
<_RazorSdkTasksTFM Condition=" '$(_RazorSdkTasksTFM)' == ''">net46</_RazorSdkTasksTFM>
|
||||
<RazorSdkBuildTasksAssembly>$(RazorSdkBuildTasksDirectoryRoot)$(_RazorSdkTasksTFM)\Microsoft.NET.Sdk.Razor.Tasks.dll</RazorSdkBuildTasksAssembly>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<Description>Builds Razor pages for views in a project. For internal use only.</Description>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<AssemblyName>dotnet-razorpagegenerator</AssemblyName>
|
||||
<PackageId>RazorPageGenerator</PackageId>
|
||||
<OutputType>Exe</OutputType>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<ExcludeFromSourceBuild>true</ExcludeFromSourceBuild>
|
||||
<DeveloperBuildTestTfms>netcoreapp3.0</DeveloperBuildTestTfms>
|
||||
<DeveloperBuildTestTfms>netcoreapp5.0</DeveloperBuildTestTfms>
|
||||
<StandardTestTfms>$(DeveloperBuildTestTfms)</StandardTestTfms>
|
||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' ">$(StandardTestTfms)</StandardTestTfms>
|
||||
<StandardTestTfms Condition=" '$(DeveloperBuild)' != 'true' AND '$(OS)' == 'Windows_NT' ">net461;$(StandardTestTfms)</StandardTestTfms>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
|
||||
<TargetFrameworks>netcoreapp5.0;net461</TargetFrameworks>
|
||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);TestFiles\**</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
internal static partial class BuildVariables
|
||||
{
|
||||
private static string _msBuildPath = string.Empty;
|
||||
private static string _microsoftNETCoreApp30PackageVersion = 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 MicrosoftNETCoreApp30PackageVersion
|
||||
public static string MicrosoftNETCoreApp50PackageVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
InitializeVariables();
|
||||
return _microsoftNETCoreApp30PackageVersion;
|
||||
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");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Fact(Skip = "https://github.com/aspnet/AspNetCore/issues/13303")]
|
||||
[InitializeTestProject("SimpleMvcFSharp", language: "F#", additionalProjects: "ClassLibrary")]
|
||||
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");
|
||||
}
|
||||
|
||||
[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");
|
||||
|
||||
|
|
|
@ -37,8 +37,8 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
}
|
||||
|
||||
MSBuildIntegrationTestBase.Project = ProjectDirectory.Create(_originalProjectName, _testProjectName, _baseDirectory, _additionalProjects, _language);
|
||||
#if NETCOREAPP3_0
|
||||
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp3.0";
|
||||
#if NETCOREAPP
|
||||
MSBuildIntegrationTestBase.TargetFramework = "netcoreapp5.0";
|
||||
#else
|
||||
#error Target frameworks need to be updated
|
||||
#endif
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
// Let the test app know it is running as part of a test.
|
||||
"/p:RunningAsTest=true",
|
||||
|
||||
$"/p:MicrosoftNETCoreApp30PackageVersion={BuildVariables.MicrosoftNETCoreApp30PackageVersion}",
|
||||
$"/p:MicrosoftNETCoreApp50PackageVersion={BuildVariables.MicrosoftNETCoreApp50PackageVersion}",
|
||||
$"/p:MicrosoftNetCompilersToolsetPackageVersion={BuildVariables.MicrosoftNetCompilersToolsetPackageVersion}",
|
||||
|
||||
// Additional restore sources for projects that require built packages
|
||||
|
|
|
@ -29,12 +29,12 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.NuspecContains(
|
||||
result,
|
||||
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(
|
||||
result,
|
||||
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]
|
||||
|
@ -56,25 +56,25 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
}
|
||||
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
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(
|
||||
result,
|
||||
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]
|
||||
|
@ -94,25 +94,25 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
}
|
||||
|
||||
Assert.NuspecDoesNotContain(
|
||||
result,
|
||||
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(
|
||||
result,
|
||||
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]
|
||||
|
@ -129,21 +129,21 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.symbols.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb")}\" />");
|
||||
}
|
||||
|
||||
Assert.NupkgContains(
|
||||
result,
|
||||
Path.Combine("bin", Configuration, "ClassLibrary.1.0.0.symbols.nupkg"),
|
||||
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll"),
|
||||
Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.pdb"));
|
||||
Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll"),
|
||||
Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.pdb"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -163,19 +163,19 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
Assert.NuspecContains(
|
||||
result,
|
||||
Path.Combine("obj", Configuration, "ClassLibrary.1.0.0.nuspec"),
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp3.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp3.0", "ClassLibrary.Views.dll")}\" />");
|
||||
$"<file src=\"{Path.Combine(Project.DirectoryPath, "bin", Configuration, "netcoreapp5.0", "ClassLibrary.Views.dll")}\" " +
|
||||
$"target=\"{Path.Combine("lib", "netcoreapp5.0", "ClassLibrary.Views.dll")}\" />");
|
||||
|
||||
Assert.NuspecContains(
|
||||
result,
|
||||
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(
|
||||
result,
|
||||
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]
|
||||
|
|
|
@ -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.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.Views.dll");
|
||||
|
|
|
@ -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>netcoreapp3.0</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. -->
|
||||
|
@ -86,7 +86,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
static partial void InitializeVariables()
|
||||
{
|
||||
_msBuildPath = @"$(_DesktopMSBuildPath)";
|
||||
_microsoftNETCoreApp30PackageVersion = "$(MicrosoftNETCoreApp30PackageVersion)";
|
||||
_MicrosoftNETCoreApp50PackageVersion = "$(MicrosoftNETCoreApp50PackageVersion)";
|
||||
_microsoftNetCompilersToolsetPackageVersion = "$(MicrosoftNetCompilersToolsetPackageVersion)";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<!-- To generate baselines, run tests with /p:GenerateBaselines=true -->
|
||||
<DefineConstants Condition="'$(GenerateBaselines)'=='true'">$(DefineConstants);GENERATE_BASELINES</DefineConstants>
|
||||
<DefineConstants>$(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES</DefineConstants>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<RuntimeAdditionalRestoreSources Condition="'$(RuntimeAdditionalRestoreSources)' == ''">$(MSBuildThisFileDirectory)..\TestPackageRestoreSource\</RuntimeAdditionalRestoreSources>
|
||||
<RestoreSources>
|
||||
$(RestoreSources);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<Copyright>© Microsoft</Copyright>
|
||||
<Product>Razor Test</Product>
|
||||
<Company>Microsoft</Company>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<Import Project="RazorTest.Introspection.targets" />
|
||||
|
||||
<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 -->
|
||||
<NETCoreAppMaximumVersion>99.9</NETCoreAppMaximumVersion>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(RunningAsTest)' == ''">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
<Copyright>© Microsoft</Copyright>
|
||||
<Product>Razor Test</Product>
|
||||
<Company>Microsoft</Company>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче