[release/5.0] Update dependencies from dotnet/efcore dotnet/runtime (#28087)
[release/5.0] Update dependencies from dotnet/efcore dotnet/runtime - Merge branch 'release/5.0' into darc-release/5.0-d4478e43-6d04-47a1-8a7c-c6c2dcd90d64 - Tweak tests - Remove Extensions.Internal.Transport from Runtime - Microsoft.AspNetCore.App.Runtime project does not expect compilation-only references - !fixup! Rearrange a `Condition` - slight change to 49cc13cb5ac6 workaround - Do not compile against assemblies with newer assembly versions - avoid problems with e.g. System.Extensions.DependencyInjection in 5.0.1 - Revert "Remove package version pinning for ref/ assemblies in servicing (#25851)" - dotnet/runtime assembly versions are unexpectedly changing in servicing This reverts commitbfc1ec6792. - Update `SharedFxTests` to handle dotnet/runtime version changes - assemblies with non-0.0 versions end up in Microsoft.AspNetCore.App - future-proofs these tests because more dotnet/runtime versions may change - !fixup! Revert ofbfc1ec6792messed up `RepoTasks` - need the RTM-versioned packages on all platforms - we only target `net472` on Windows
This commit is contained in:
parent
5c1f6ffc8c
commit
d0f09018c0
|
|
@ -4,10 +4,10 @@
|
|||
<clear />
|
||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||
<!-- Begin: Package sources from dotnet-efcore -->
|
||||
<add key="darc-pub-dotnet-efcore-240223e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-efcore-240223ef/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-efcore-e08026a" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-efcore-e08026a6/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-efcore -->
|
||||
<!-- Begin: Package sources from dotnet-runtime -->
|
||||
<add key="darc-pub-dotnet-runtime-9ecbcd7" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-9ecbcd74/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-runtime-b02e13a" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-b02e13ab/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-runtime -->
|
||||
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
||||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ and are generated based on the last package release.
|
|||
<LatestPackageReference Include="System.Reflection.Metadata" />
|
||||
<LatestPackageReference Include="System.Runtime.CompilerServices.Unsafe" />
|
||||
<LatestPackageReference Include="System.Runtime.InteropServices.RuntimeInformation" />
|
||||
<!-- System.Security.AccessControl should only be referenced in Dependencies.props and RepoTasks.csproj. -->
|
||||
<LatestPackageReference Include="System.Security.AccessControl" />
|
||||
<LatestPackageReference Include="System.Security.Cryptography.Cng" />
|
||||
<LatestPackageReference Include="System.Security.Cryptography.Pkcs" />
|
||||
<LatestPackageReference Include="System.Security.Cryptography.Xml" />
|
||||
|
|
@ -195,6 +197,11 @@ and are generated based on the last package release.
|
|||
<!-- Get versions. -->
|
||||
<LatestPackageReference Update="@(LatestPackageReference)">
|
||||
<Version>$(%(VersionName)PackageVersion)</Version>
|
||||
<RTMVersion>$(%(VersionName)V0PackageVersion)</RTMVersion>
|
||||
|
||||
<!-- Remove excess metadata. -->
|
||||
<RTMVersion Condition=" '%(Version)' == '%(RTMVersion)' " />
|
||||
<VersionName />
|
||||
</LatestPackageReference>
|
||||
|
||||
<!--
|
||||
|
|
|
|||
|
|
@ -11,35 +11,35 @@
|
|||
<ProductDependencies>
|
||||
<Dependency Name="dotnet-ef" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Relational" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Tools" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.EntityFrameworkCore.Design" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/efcore</Uri>
|
||||
<Sha>240223ef37a9bb44688f93ebab203c2c8f3c3e95</Sha>
|
||||
<Sha>e08026a638e684e6d3eabbd65702251e8c0febea</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
|
|
@ -93,9 +93,9 @@
|
|||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.0">
|
||||
<Dependency Name="Microsoft.Extensions.DependencyInjection" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
<Sha>b02e13abab3d6f499751af2ad1ae6333fb4e633d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Extensions.FileProviders.Abstractions" Version="5.0.0">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
|
|
@ -209,9 +209,9 @@
|
|||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.IO.Pipelines" Version="5.0.0">
|
||||
<Dependency Name="System.IO.Pipelines" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
<Sha>b02e13abab3d6f499751af2ad1ae6333fb4e633d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Net.Http.Json" Version="5.0.0">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
|
|
@ -237,13 +237,18 @@
|
|||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
</Dependency>
|
||||
<!-- System.Security.AccessControl should only be referenced in Dependencies.props and RepoTasks.csproj. -->
|
||||
<Dependency Name="System.Security.AccessControl" Version="5.0.0">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Cryptography.Cng" Version="5.0.0">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.0">
|
||||
<Dependency Name="System.Security.Cryptography.Pkcs" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>cf258a14b70ad9069470a108f13765e0e5988f51</Sha>
|
||||
<Sha>b02e13abab3d6f499751af2ad1ae6333fb4e633d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="System.Security.Cryptography.Xml" Version="5.0.0">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
|
|
@ -291,15 +296,15 @@
|
|||
-->
|
||||
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.1">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>9ecbcd746c9648d00d4bf98bf15f31e21e01db6e</Sha>
|
||||
<Sha>b02e13abab3d6f499751af2ad1ae6333fb4e633d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.1-servicing.20570.12">
|
||||
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.1-servicing.20575.16">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>9ecbcd746c9648d00d4bf98bf15f31e21e01db6e</Sha>
|
||||
<Sha>b02e13abab3d6f499751af2ad1ae6333fb4e633d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="5.0.1-servicing.20570.12">
|
||||
<Dependency Name="Microsoft.NETCore.BrowserDebugHost.Transport" Version="5.0.1-servicing.20575.16">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>9ecbcd746c9648d00d4bf98bf15f31e21e01db6e</Sha>
|
||||
<Sha>b02e13abab3d6f499751af2ad1ae6333fb4e633d</Sha>
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
|
|
|
|||
|
|
@ -58,10 +58,10 @@
|
|||
<PropertyGroup Label="Automated">
|
||||
<!-- Packages from dotnet/runtime -->
|
||||
<MicrosoftExtensionsDependencyModelPackageVersion>5.0.0</MicrosoftExtensionsDependencyModelPackageVersion>
|
||||
<MicrosoftNETCoreAppInternalPackageVersion>5.0.1-servicing.20570.12</MicrosoftNETCoreAppInternalPackageVersion>
|
||||
<MicrosoftNETCoreAppInternalPackageVersion>5.0.1-servicing.20575.16</MicrosoftNETCoreAppInternalPackageVersion>
|
||||
<MicrosoftNETCoreAppRefPackageVersion>5.0.0</MicrosoftNETCoreAppRefPackageVersion>
|
||||
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>5.0.1-servicing.20570.12</MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>
|
||||
<MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>5.0.1-servicing.20575.16</MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>
|
||||
<MicrosoftWin32RegistryPackageVersion>5.0.0</MicrosoftWin32RegistryPackageVersion>
|
||||
<MicrosoftWin32SystemEventsPackageVersion>5.0.0</MicrosoftWin32SystemEventsPackageVersion>
|
||||
<MicrosoftExtensionsCachingAbstractionsPackageVersion>5.0.0</MicrosoftExtensionsCachingAbstractionsPackageVersion>
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
<MicrosoftExtensionsConfigurationUserSecretsPackageVersion>5.0.0</MicrosoftExtensionsConfigurationUserSecretsPackageVersion>
|
||||
<MicrosoftExtensionsConfigurationXmlPackageVersion>5.0.0</MicrosoftExtensionsConfigurationXmlPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>5.0.0</MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.0</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
||||
<MicrosoftExtensionsDependencyInjectionPackageVersion>5.0.1</MicrosoftExtensionsDependencyInjectionPackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>5.0.0</MicrosoftExtensionsFileProvidersAbstractionsPackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersCompositePackageVersion>5.0.0</MicrosoftExtensionsFileProvidersCompositePackageVersion>
|
||||
<MicrosoftExtensionsFileProvidersPhysicalPackageVersion>5.0.0</MicrosoftExtensionsFileProvidersPhysicalPackageVersion>
|
||||
|
|
@ -104,15 +104,17 @@
|
|||
<SystemDiagnosticsEventLogPackageVersion>5.0.0</SystemDiagnosticsEventLogPackageVersion>
|
||||
<SystemDirectoryServicesProtocolsPackageVersion>5.0.0</SystemDirectoryServicesProtocolsPackageVersion>
|
||||
<SystemDrawingCommonPackageVersion>5.0.0</SystemDrawingCommonPackageVersion>
|
||||
<SystemIOPipelinesPackageVersion>5.0.0</SystemIOPipelinesPackageVersion>
|
||||
<SystemIOPipelinesPackageVersion>5.0.1</SystemIOPipelinesPackageVersion>
|
||||
<SystemNetHttpJsonPackageVersion>5.0.0</SystemNetHttpJsonPackageVersion>
|
||||
<SystemNetHttpWinHttpHandlerPackageVersion>5.0.0</SystemNetHttpWinHttpHandlerPackageVersion>
|
||||
<SystemNetWebSocketsWebSocketProtocolPackageVersion>5.0.0</SystemNetWebSocketsWebSocketProtocolPackageVersion>
|
||||
<SystemReflectionMetadataPackageVersion>5.0.0</SystemReflectionMetadataPackageVersion>
|
||||
<SystemResourcesExtensionsPackageVersion>5.0.0</SystemResourcesExtensionsPackageVersion>
|
||||
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
|
||||
<!-- System.Security.AccessControl should only be referenced in Dependencies.props and RepoTasks.csproj. -->
|
||||
<SystemSecurityAccessControlPackageVersion>5.0.0</SystemSecurityAccessControlPackageVersion>
|
||||
<SystemSecurityCryptographyCngPackageVersion>5.0.0</SystemSecurityCryptographyCngPackageVersion>
|
||||
<SystemSecurityCryptographyPkcsPackageVersion>5.0.0</SystemSecurityCryptographyPkcsPackageVersion>
|
||||
<SystemSecurityCryptographyPkcsPackageVersion>5.0.1</SystemSecurityCryptographyPkcsPackageVersion>
|
||||
<SystemSecurityCryptographyXmlPackageVersion>5.0.0</SystemSecurityCryptographyXmlPackageVersion>
|
||||
<SystemSecurityPermissionsPackageVersion>5.0.0</SystemSecurityPermissionsPackageVersion>
|
||||
<SystemSecurityPrincipalWindowsPackageVersion>5.0.0</SystemSecurityPrincipalWindowsPackageVersion>
|
||||
|
|
@ -151,6 +153,36 @@
|
|||
-->
|
||||
<MicrosoftNETCoreAppRuntimeVersion>$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</MicrosoftNETCoreAppRuntimeVersion>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
We ship ref/ assemblies for runtime packages in our targeting targeting pack. When servicing that targeting pack,
|
||||
these assemblies must not change. Must also compile our assemblies against the initial ref/ assemblies for runtime
|
||||
packages. But, need to test against the latest implementation assemblies and ship them in our shared framework.
|
||||
Upshot is we need Major.Minor.0 runtime packages for compilation and the targeting pack and Major.Minor.Latest
|
||||
runtime packages for everything else. This is not an issue for assemblies available in Microsoft.NETCore.App.Ref or
|
||||
Microsoft.Extensions.Internal.Transport because it is next to impossible we would service those packages.
|
||||
|
||||
System.Security.AccessControl should only be referenced in Dependencies.props and RepoTasks.csproj. Because
|
||||
it's a transitive reference, we reship the ref/ assembly in Microsoft.AspNetCore.App.Ref. dotnet/runtime ships
|
||||
the implementation assemblies in Microsoft.NETCore.App.Runtime.* packages.
|
||||
|
||||
If testing this configuration prior to servicing, update the versions of dependencies too. E.g. change
|
||||
`$(SystemSecurityPrincipalWindowsV0PackageVersion)` if you change `$(SystemSecurityAccessControlV0PackageVersion)`
|
||||
because System.Security.AccessControl will otherwise be loadable. This should not be necessary in servicing.
|
||||
-->
|
||||
<PropertyGroup Condition=" '$(IsServicingBuild)' == 'true' ">
|
||||
<MicrosoftWin32RegistryV0PackageVersion>$(MicrosoftWin32RegistryPackageVersion.Split('.')[0]).$(MicrosoftWin32RegistryPackageVersion.Split('.')[1]).0</MicrosoftWin32RegistryV0PackageVersion>
|
||||
<MicrosoftWin32SystemEventsV0PackageVersion>$(MicrosoftWin32SystemEventsPackageVersion.Split('.')[0]).$(MicrosoftWin32SystemEventsPackageVersion.Split('.')[1]).0</MicrosoftWin32SystemEventsV0PackageVersion>
|
||||
<SystemDiagnosticsEventLogV0PackageVersion>$(SystemDiagnosticsEventLogPackageVersion.Split('.')[0]).$(SystemDiagnosticsEventLogPackageVersion.Split('.')[1]).0</SystemDiagnosticsEventLogV0PackageVersion>
|
||||
<SystemDrawingCommonV0PackageVersion>$(SystemDrawingCommonPackageVersion.Split('.')[0]).$(SystemDrawingCommonPackageVersion.Split('.')[1]).0</SystemDrawingCommonV0PackageVersion>
|
||||
<SystemIOPipelinesV0PackageVersion>$(SystemIOPipelinesPackageVersion.Split('.')[0]).$(SystemIOPipelinesPackageVersion.Split('.')[1]).0</SystemIOPipelinesV0PackageVersion>
|
||||
<SystemSecurityAccessControlV0PackageVersion>$(SystemSecurityAccessControlPackageVersion.Split('.')[0]).$(SystemSecurityAccessControlPackageVersion.Split('.')[1]).0</SystemSecurityAccessControlV0PackageVersion>
|
||||
<SystemSecurityCryptographyCngV0PackageVersion>$(SystemSecurityCryptographyCngPackageVersion.Split('.')[0]).$(SystemSecurityCryptographyCngPackageVersion.Split('.')[1]).0</SystemSecurityCryptographyCngV0PackageVersion>
|
||||
<SystemSecurityCryptographyPkcsV0PackageVersion>$(SystemSecurityCryptographyPkcsPackageVersion.Split('.')[0]).$(SystemSecurityCryptographyPkcsPackageVersion.Split('.')[1]).0</SystemSecurityCryptographyPkcsV0PackageVersion>
|
||||
<SystemSecurityCryptographyXmlV0PackageVersion>$(SystemSecurityCryptographyXmlPackageVersion.Split('.')[0]).$(SystemSecurityCryptographyXmlPackageVersion.Split('.')[1]).0</SystemSecurityCryptographyXmlV0PackageVersion>
|
||||
<SystemSecurityPermissionsV0PackageVersion>$(SystemSecurityPermissionsPackageVersion.Split('.')[0]).$(SystemSecurityPermissionsPackageVersion.Split('.')[1]).0</SystemSecurityPermissionsV0PackageVersion>
|
||||
<SystemSecurityPrincipalWindowsV0PackageVersion>$(SystemSecurityPrincipalWindowsPackageVersion.Split('.')[0]).$(SystemSecurityPrincipalWindowsPackageVersion.Split('.')[1]).0</SystemSecurityPrincipalWindowsV0PackageVersion>
|
||||
<SystemWindowsExtensionsV0PackageVersion>$(SystemWindowsExtensionsPackageVersion.Split('.')[0]).$(SystemWindowsExtensionsPackageVersion.Split('.')[1]).0</SystemWindowsExtensionsV0PackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Manual">
|
||||
<MicrosoftNetCompilersToolsetPackageVersion>3.8.0-3.20458.6</MicrosoftNetCompilersToolsetPackageVersion>
|
||||
<!-- DiagnosticAdapter package pinned temporarily until migrated/deprecated -->
|
||||
|
|
|
|||
|
|
@ -248,16 +248,57 @@
|
|||
Text="Could not resolve this reference. Could not locate the package or project for "%(Reference.Identity)". Did you update baselines and dependencies lists? See docs/ReferenceResolution.md for more details." />
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
Change @(ResolvedCompileFileDefinitions) items between generation and use in order to compile against RTM lib/
|
||||
or ref/ assemblies. The approach works for all TFMs because it happens after a specific assembly is chosen for
|
||||
compilation; no need to restrict this to (say) the default TFM.
|
||||
|
||||
This target could get confused if the layout changes for one of the dozen special-cased packages during servicing.
|
||||
E.g. ResolvePackageAssets picks a compatible assembly from the 5.0.1 package and _UseRTMReferenceAssemblies
|
||||
changes the path to one not present in the 5.0.0 package. Fortunately, this will break the build with complaints
|
||||
about the "invalid strong name".
|
||||
-->
|
||||
<Target Name="_UseRTMReferenceAssemblies"
|
||||
Condition=" '$(MSBuildProjectName)' != 'RepoTasks' "
|
||||
AfterTargets="ResolvePackageAssets"
|
||||
BeforeTargets="GenerateBuildDependencyFile;GeneratePublishDependencyFile;ILLink;ResolveLockFileReferences"
|
||||
DependsOnTargets="ResolvePackageAssets">
|
||||
<Error Condition=" !EXISTS('$(RepoRoot)artifacts\obj\RepoTasks\RepoTasks.csproj.nuget.g.props') "
|
||||
Text="The eng/tools/RepoTasks project must be restored before building other projects." />
|
||||
|
||||
<JoinItems Left="@(ResolvedCompileFileDefinitions)"
|
||||
Right="@(LatestPackageReference->HasMetadata('RTMVersion'))"
|
||||
LeftKey="Filename"
|
||||
ItemSpecToUse="Left"
|
||||
LeftMetadata="*"
|
||||
RightMetadata="RTMVersion;Version">
|
||||
<Output TaskParameter="JoinResult" ItemName="_ResolvedCompileFileDefinitionsToChange" />
|
||||
</JoinItems>
|
||||
|
||||
<ItemGroup>
|
||||
<ResolvedCompileFileDefinitions Remove="@(_ResolvedCompileFileDefinitionsToChange)" />
|
||||
|
||||
<!-- Ignore %(NuGetPackageVersion) when doing substitution because some projects use downlevel packages. -->
|
||||
<_ResolvedCompileFileDefinitionsToChange
|
||||
HintPath="$([System.String]::new('%(Identity)').Replace('\%(Version)\', '\%(RTMVersion)\').Replace('/%(Version)/', '/%(RTMVersion)/'))" />
|
||||
<ResolvedCompileFileDefinitions Include="@(_ResolvedCompileFileDefinitionsToChange -> '%(HintPath)')" />
|
||||
|
||||
<_ResolvedCompileFileDefinitionsToChange Remove="@(_ResolvedCompileFileDefinitionsToChange)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<_CompileTfmUsingReferenceAssemblies>false</_CompileTfmUsingReferenceAssemblies>
|
||||
<_CompileTfmUsingReferenceAssemblies
|
||||
Condition=" '$(CompileUsingReferenceAssemblies)' != false AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">true</_CompileTfmUsingReferenceAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
If we have a ref/ assembly from dotnet/runtime for an Extension package, use that when compiling but do not reference its assemblies.
|
||||
-->
|
||||
<ItemGroup
|
||||
Condition=" $(_CompileTfmUsingReferenceAssemblies) OR ('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref') ">
|
||||
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'Microsoft.AspNetCore.App.Runtime' AND
|
||||
($(_CompileTfmUsingReferenceAssemblies) OR
|
||||
('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref')) ">
|
||||
<PackageReference Include="Microsoft.Extensions.Internal.Transport"
|
||||
Version="$(MicrosoftExtensionsInternalTransportPackageVersion)"
|
||||
IsImplicitlyDefined="true"
|
||||
|
|
@ -266,6 +307,30 @@
|
|||
GeneratePathProperty="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Remove compile-time assets for packages that overlap Microsoft.Extensions.Internal.Transport. Serviced packages
|
||||
may otherwise increase the referenced version. Avoid this because change reduces compatible runtime versions.
|
||||
That's not a big deal within the shared framework but can cause problems for shipped packages. Leave test
|
||||
projects and Ignitor alone because they may transitively reference newer netstandard assemblies and need a
|
||||
net5.0 assembly with the same version. (This can happen in implementation projects but is less likely.)
|
||||
-->
|
||||
<Target Name="RemoveExtensionsCompileAssets"
|
||||
AfterTargets="ResolvePackageAssets"
|
||||
Condition=" '$(PkgMicrosoft_Extensions_Internal_Transport)' != '' AND
|
||||
'$(IsServicingBuild)' == 'true' AND
|
||||
'$(IsImplementationProject)' == 'true' AND
|
||||
'$(MSBuildProjectName)' != 'Ignitor' AND
|
||||
'$(MSBuildProjectName)' != 'Microsoft.AspNetCore.App.Runtime' AND
|
||||
($(_CompileTfmUsingReferenceAssemblies) OR
|
||||
('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref')) ">
|
||||
<ItemGroup>
|
||||
<ResolvedCompileFileDefinitions Remove="@(ResolvedCompileFileDefinitions)"
|
||||
Condition=" '%(NuGetPackageId)' != 'Microsoft.Extensions.Internal.Transport' AND
|
||||
EXISTS('$(PkgMicrosoft_Extensions_Internal_Transport)\ref\$(TargetFramework)\%(Filename).dll') AND
|
||||
$([System.String]::new('%(Directory)').Contains('$(TargetFramework)')) " />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!-- These targets are used to generate the map of assembly name to project files. See also the /t:GenerateProjectList target in build/repo.targets. -->
|
||||
<Target Name="GetReferencesProvided" Returns="@(ProvidesReference)">
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,16 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="NuGet.Packaging" Version="5.6.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
|
||||
|
||||
<!--
|
||||
Gather project references for compilation against RTM packages. %(RTMVersion) is set for about a dozen packages
|
||||
in all servicing builds. Cannot reference two versions of a package, mandating this separation from projects
|
||||
using the relevant packages.
|
||||
-->
|
||||
<PackageReference Include="@(LatestPackageReference->HasMetadata('RTMVersion'))"
|
||||
IncludeAssets="None"
|
||||
PrivateAssets="All"
|
||||
Version="%(RTMVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -9,7 +9,10 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_ExpectedSharedFrameworkBinaries Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)" />
|
||||
<!-- Ignore aspnetcorev2_inprocess because tests expect only managed assemblies in this item group. -->
|
||||
<_SharedFrameworkBinariesFromRepo Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage)" />
|
||||
|
||||
<_ExpectedSharedFrameworkBinaries Include="@(_SharedFrameworkBinariesFromRepo);@(ExternalAspNetCoreAppReference);@(_TransitiveExternalAspNetCoreAppReference)" />
|
||||
<_ExpectedSharedFrameworkBinaries Condition="'$(TargetOsName)' == 'win' AND '$(TargetArchitecture)' != 'arm'" Include="aspnetcorev2_inprocess" />
|
||||
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
|
|
@ -24,6 +27,10 @@
|
|||
<_Parameter1>MicrosoftNETCoreAppRuntimeVersion</_Parameter1>
|
||||
<_Parameter2>$(MicrosoftNETCoreAppRuntimeVersion)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>SharedFrameworkBinariesFromRepo</_Parameter1>
|
||||
<_Parameter2>@(_SharedFrameworkBinariesFromRepo)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
|
||||
<_Parameter1>SharedFxDependencies</_Parameter1>
|
||||
<_Parameter2>@(_ExpectedSharedFrameworkBinaries)</_Parameter2>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ namespace Microsoft.AspNetCore
|
|||
_sharedFxRoot = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"))
|
||||
? Path.Combine(TestData.GetTestDataValue("SharedFrameworkLayoutRoot"), "shared", "Microsoft.AspNetCore.App", TestData.GetTestDataValue("RuntimePackageVersion"))
|
||||
: Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH");
|
||||
_expectedVersionFileName = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH")) ? ".version" : "Microsoft.AspNetCore.App.versions.txt";
|
||||
_expectedVersionFileName = string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNET_RUNTIME_PATH"))
|
||||
? ".version"
|
||||
: "Microsoft.AspNetCore.App.versions.txt";
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -164,38 +166,65 @@ namespace Microsoft.AspNetCore
|
|||
[Fact]
|
||||
public void SharedFrameworkAssembliesHaveExpectedAssemblyVersions()
|
||||
{
|
||||
// Only test managed assemblies
|
||||
IEnumerable<string> dlls = Directory.GetFiles(_sharedFxRoot, "*.dll", SearchOption.AllDirectories).Where(i => !i.Contains("aspnetcorev2_inprocess"));
|
||||
// Only test managed assemblies from dotnet/aspnetcore.
|
||||
var repoAssemblies = TestData.GetSharedFrameworkBinariesFromRepo()
|
||||
.Split(';', StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToHashSet();
|
||||
|
||||
var version = Version.Parse(TestData.GetMicrosoftNETCoreAppPackageVersion());
|
||||
var dlls = Directory.GetFiles(_sharedFxRoot, "*.dll", SearchOption.AllDirectories);
|
||||
Assert.NotEmpty(dlls);
|
||||
|
||||
Assert.All(dlls, path =>
|
||||
{
|
||||
// Unlike dotnet/aspnetcore, dotnet/runtime varies the assembly version while in servicing.
|
||||
if (!repoAssemblies.Contains(Path.GetFileNameWithoutExtension(path)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using var fileStream = File.OpenRead(path);
|
||||
using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
|
||||
var reader = peReader.GetMetadataReader(MetadataReaderOptions.Default);
|
||||
var assemblyDefinition = reader.GetAssemblyDefinition();
|
||||
|
||||
// Assembly versions should all match Major.Minor.0.0
|
||||
Assert.Equal(version.Major, assemblyDefinition.Version.Major);
|
||||
Assert.Equal(version.Minor, assemblyDefinition.Version.Minor);
|
||||
Assert.Equal(0, assemblyDefinition.Version.Build);
|
||||
Assert.Equal(0, assemblyDefinition.Version.Revision);
|
||||
});
|
||||
}
|
||||
|
||||
// ASP.NET Core shared Fx assemblies should reference only ASP.NET Core assemblies with Revsion == 0.
|
||||
[Fact]
|
||||
public void SharedFrameworkAssemblyReferencesHaveExpectedAssemblyVersions()
|
||||
{
|
||||
IEnumerable<string> dlls = Directory.GetFiles(_sharedFxRoot, "*.dll", SearchOption.AllDirectories).Where(i => !i.Contains("aspnetcorev2_inprocess") && !i.Contains("System.Security.Cryptography.Xml", StringComparison.OrdinalIgnoreCase));
|
||||
// Only test managed assemblies from dotnet/aspnetcore.
|
||||
var repoAssemblies = TestData.GetSharedFrameworkBinariesFromRepo()
|
||||
.Split(';', StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToHashSet();
|
||||
|
||||
IEnumerable<string> dlls = Directory.GetFiles(_sharedFxRoot, "*.dll", SearchOption.AllDirectories);
|
||||
Assert.NotEmpty(dlls);
|
||||
|
||||
Assert.All(dlls, path =>
|
||||
{
|
||||
// Unlike dotnet/aspnetcore, dotnet/runtime varies the assembly version while in servicing.
|
||||
// dotnet/aspnetcore assemblies build against RTM targeting pack from dotnet/runtime.
|
||||
if (!repoAssemblies.Contains(Path.GetFileNameWithoutExtension(path)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using var fileStream = File.OpenRead(path);
|
||||
using var peReader = new PEReader(fileStream, PEStreamOptions.Default);
|
||||
var reader = peReader.GetMetadataReader(MetadataReaderOptions.Default);
|
||||
|
||||
|
||||
Assert.All(reader.AssemblyReferences, handle =>
|
||||
{
|
||||
var reference = reader.GetAssemblyReference(handle);
|
||||
Assert.Equal(0, reference.Version.Build);
|
||||
Assert.Equal(0, reference.Version.Revision);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,9 +8,10 @@ using System.Reflection;
|
|||
|
||||
namespace Microsoft.AspNetCore
|
||||
{
|
||||
public class TestData
|
||||
public static class TestData
|
||||
{
|
||||
public static List<string> ListedSharedFxAssemblies;
|
||||
|
||||
public static SortedDictionary<string, string> ListedTargetingPackAssemblies;
|
||||
|
||||
static TestData()
|
||||
|
|
@ -149,6 +150,7 @@ namespace Microsoft.AspNetCore
|
|||
"System.Security.Permissions",
|
||||
"System.Windows.Extensions"
|
||||
};
|
||||
|
||||
ListedTargetingPackAssemblies = new SortedDictionary<string, string>
|
||||
{
|
||||
{ "Microsoft.AspNetCore", "5.0.0.0" },
|
||||
|
|
@ -300,6 +302,8 @@ namespace Microsoft.AspNetCore
|
|||
|
||||
public static string GetSharedFxRuntimeIdentifier() => GetTestDataValue("TargetRuntimeIdentifier");
|
||||
|
||||
public static string GetSharedFrameworkBinariesFromRepo() => GetTestDataValue("SharedFrameworkBinariesFromRepo");
|
||||
|
||||
public static string GetSharedFxDependencies() => GetTestDataValue("SharedFxDependencies");
|
||||
|
||||
public static string GetTargetingPackDependencies() => GetTestDataValue("TargetingPackDependencies");
|
||||
|
|
|
|||
Loading…
Reference in New Issue