Upgrade to more recent .NET SDK (#21017)
* Update SDK to preview.5.20251.2 - includes support for the `net5.0` TFM - includes fix for `$(PublishDepsFilePath)` - includes fix for incorrect NU5118 warnings when `'$(PackAsTool)' == 'true'` * !!temporary!! Suppress NU5129 warnings - build/ and buildTransitive/ naming conventions do not treat TFMs as equivalent * Run `InjectRequestHandlerOnPublish` later - late enough for .deps file to exist i.e. after the `CopyFilesToPublishDirectory` target - `AfterTargets` is a bit flaky; use `BeforeTargets` with empty targets instead * Always add `@(AssemblyAttribute)` items before they are processed - use `BeforeTargets="GetAssemblyAttributes"` for consistently throughout the repo
This commit is contained in:
parent
c9cdc4891a
commit
fdb0372a67
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "5.0.100-preview.2.20120.3"
|
"version": "5.0.100-preview.5.20251.2"
|
||||||
},
|
},
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet": "5.0.100-preview.2.20120.3",
|
"dotnet": "5.0.100-preview.5.20251.2",
|
||||||
"runtimes": {
|
"runtimes": {
|
||||||
"dotnet/x64": [
|
"dotnet/x64": [
|
||||||
"$(MicrosoftNETCoreAppInternalPackageVersion)"
|
"$(MicrosoftNETCoreAppInternalPackageVersion)"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC.</Description>
|
<Description>Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC.</Description>
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
|
|
||||||
|
<!-- !!! Temporary workaround while we switch TFMs. -->
|
||||||
|
<NoWarn>$(NoWarn);NU5129</NoWarn>
|
||||||
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;aspnetcoremvc;razor</PackageTags>
|
<PackageTags>aspnetcore;aspnetcoremvc;razor</PackageTags>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Support for writing functional tests for MVC applications.</Description>
|
<Description>Support for writing functional tests for MVC applications.</Description>
|
||||||
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
||||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||||
|
|
||||||
|
<!-- !!! Temporary workaround while we switch TFMs. -->
|
||||||
|
<NoWarn>$(NoWarn);NU5129</NoWarn>
|
||||||
|
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<PackageTags>aspnetcore;aspnetcoremvc;aspnetcoremvctesting</PackageTags>
|
<PackageTags>aspnetcore;aspnetcoremvc;aspnetcoremvctesting</PackageTags>
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
|
|
@ -21,5 +24,4 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Microsoft.AspNetCore.Mvc.Testing.targets" Pack="true" PackagePath="build/$(TargetFramework)/" />
|
<Content Include="Microsoft.AspNetCore.Mvc.Testing.targets" Pack="true" PackagePath="build/$(TargetFramework)/" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_AddContentRootForProjectReferences" BeforeTargets="BeforeCompile" DependsOnTargets="_ResolveMvcTestProjectReferences">
|
<Target Name="_AddContentRootForProjectReferences" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="_ResolveMvcTestProjectReferences">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<WebApplicationFactoryContentRootAttribute
|
<WebApplicationFactoryContentRootAttribute
|
||||||
Condition="'%(_ContentRootProjectReferences.Identity)' != ''"
|
Condition="'%(_ContentRootProjectReferences.Identity)' != ''"
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AssemblyAttribute
|
<AssemblyAttribute
|
||||||
Condition=" '%(WebApplicationFactoryContentRootAttribute.Identity)' != '' "
|
Condition=" '%(WebApplicationFactoryContentRootAttribute.Identity)' != '' "
|
||||||
Include="Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryContentRootAttribute">
|
Include="Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactoryContentRootAttribute">
|
||||||
<_Parameter1>%(WebApplicationFactoryContentRootAttribute.AssemblyName)</_Parameter1>
|
<_Parameter1>%(WebApplicationFactoryContentRootAttribute.AssemblyName)</_Parameter1>
|
||||||
|
|
@ -55,5 +55,5 @@
|
||||||
|
|
||||||
<Copy SourceFiles="%(DepsFilePaths.FullPath)" DestinationFolder="$(OutDir)" Condition="Exists('%(DepsFilePaths.FullPath)')" />
|
<Copy SourceFiles="%(DepsFilePaths.FullPath)" DestinationFolder="$(OutDir)" Condition="Exists('%(DepsFilePaths.FullPath)')" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
</AssemblyAttribute>
|
</AssemblyAttribute>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PrepareForTest" BeforeTargets="CoreCompile" Condition="$(DesignTimeBuild) != true">
|
<Target Name="PrepareForTest" BeforeTargets="GetAssemblyAttributes" Condition="$(DesignTimeBuild) != true">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TestTemplateCreationFolder>$([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)'))</TestTemplateCreationFolder>
|
<TestTemplateCreationFolder>$([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)'))</TestTemplateCreationFolder>
|
||||||
<TestTemplateTestsProps>$(TestTemplateCreationFolder)$(TestTemplateTestsProps)</TestTemplateTestsProps>
|
<TestTemplateTestsProps>$(TestTemplateCreationFolder)$(TestTemplateTestsProps)</TestTemplateTestsProps>
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
</AssemblyAttribute>
|
</AssemblyAttribute>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="PrepareForTest" BeforeTargets="CoreCompile" Condition="$(DesignTimeBuild) != true">
|
<Target Name="PrepareForTest" BeforeTargets="GetAssemblyAttributes" Condition="$(DesignTimeBuild) != true">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TestTemplateCreationFolder>$([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)'))</TestTemplateCreationFolder>
|
<TestTemplateCreationFolder>$([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)'))</TestTemplateCreationFolder>
|
||||||
<TestTemplateTestsProps>$(TestTemplateCreationFolder)$(TestTemplateTestsProps)</TestTemplateTestsProps>
|
<TestTemplateTestsProps>$(TestTemplateCreationFolder)$(TestTemplateTestsProps)</TestTemplateTestsProps>
|
||||||
|
|
|
||||||
|
|
@ -59,17 +59,27 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GenerateBuildDependencyFile creates the .deps file used here. BuildDepsJson and CoreBuild are empty targets marking
|
||||||
|
the end of processes using the GenerateBuildDependencyFile target.
|
||||||
|
-->
|
||||||
<Target Name="InjectRequestHandler"
|
<Target Name="InjectRequestHandler"
|
||||||
Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
|
Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
|
||||||
AfterTargets="GenerateBuildDependencyFile"
|
BeforeTargets="BuildDepsJson;CoreBuild"
|
||||||
DependsOnTargets="PrepareInjectionApp">
|
DependsOnTargets="GenerateBuildDependencyFile;PrepareInjectionApp">
|
||||||
<Exec Command="$(InjectDepsApp) "$(ProjectDepsFilePath)" $(RuntimeIdentifier) " />
|
<Exec Command="$(InjectDepsApp) "$(ProjectDepsFilePath)" $(RuntimeIdentifier) " />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GeneratePublishDependencyFile creates an intermediate .deps file copied soon after into the publish folder.
|
||||||
|
CopyFilesToPublishDirectory is an empty target marking the end of all copies into the publish folder, including the
|
||||||
|
.deps file and native assets. Publish is an empty target marking the end of the entire process.
|
||||||
|
(GenerateSingleFileBundle also uses the intermediate .desp file but only in single-file publish cases ignored here.)
|
||||||
|
-->
|
||||||
<Target Name="InjectRequestHandlerOnPublish"
|
<Target Name="InjectRequestHandlerOnPublish"
|
||||||
Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
|
Condition=" '$(InProcessTestSite)' == 'true' AND '$(BuildIisNativeProjects)' == 'true' AND '$(TargetFrameworkIdentifier)' != '.NETFramework'"
|
||||||
AfterTargets="GeneratePublishDependencyFile"
|
BeforeTargets="Publish"
|
||||||
DependsOnTargets="PrepareInjectionApp">
|
DependsOnTargets="GeneratePublishDependencyFile;CopyFilesToPublishDirectory;PrepareInjectionApp">
|
||||||
<Exec Command="$(InjectDepsApp) "$(PublishDepsFilePath)" $(RuntimeIdentifier) " />
|
<Exec Command="$(InjectDepsApp) "$(PublishDepsFilePath)" $(RuntimeIdentifier) " />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_AddTestProjectMetadataAttributes" BeforeTargets="BeforeCompile" DependsOnTargets="_ResolveTestProjectReferences">
|
<Target Name="_AddTestProjectMetadataAttributes" BeforeTargets="GetAssemblyAttributes" DependsOnTargets="_ResolveTestProjectReferences">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_ContentRootMetadata
|
<_ContentRootMetadata
|
||||||
Condition="'%(_ContentRootProjectReferences.Identity)' != ''"
|
Condition="'%(_ContentRootProjectReferences.Identity)' != ''"
|
||||||
|
|
@ -98,7 +98,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_AddSeleniumSupportedMetadataAttribute" BeforeTargets="BeforeCompile">
|
<Target Name="_AddSeleniumSupportedMetadataAttribute" BeforeTargets="GetAssemblyAttributes">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_SeleniumE2ETestsSupportedAttributeValue>false</_SeleniumE2ETestsSupportedAttributeValue>
|
<_SeleniumE2ETestsSupportedAttributeValue>false</_SeleniumE2ETestsSupportedAttributeValue>
|
||||||
<_SeleniumE2ETestsSupportedAttributeValue Condition="'$(SeleniumE2ETestsSupported)' == 'true'">true</_SeleniumE2ETestsSupportedAttributeValue>
|
<_SeleniumE2ETestsSupportedAttributeValue Condition="'$(SeleniumE2ETestsSupported)' == 'true'">true</_SeleniumE2ETestsSupportedAttributeValue>
|
||||||
|
|
@ -118,7 +118,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_AddProcessTrackingMetadataAttribute" BeforeTargets="BeforeCompile">
|
<Target Name="_AddProcessTrackingMetadataAttribute" BeforeTargets="GetAssemblyAttributes">
|
||||||
<MakeDir Directories="$(SeleniumProcessTrackingFolder)" />
|
<MakeDir Directories="$(SeleniumProcessTrackingFolder)" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AssemblyAttribute
|
<AssemblyAttribute
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue