Remove harvesting of M.E.DependencyModel (#51582)
authorViktor Hofer <viktor.hofer@microsoft.com>
Thu, 22 Apr 2021 10:40:51 +0000 (12:40 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Apr 2021 10:40:51 +0000 (12:40 +0200)
* Remove harvesting of M.E.DependencyModel

The netstandard1.6 configuration of Microsoft.Extensions.DependencyModel
isn't built anymore. Instead the already built matching binary from the
latest available package version is redistributed when packaging the
DependencyModel library.

Also dropping the netstandard1.3 asset and the net451 one as the
minimum supported set of platforms are ones that support netstandard2.0.

In addition to the harvesting removal, cleaning up the src project which
had an unnecessary condition and property set.

Contributes to https://github.com/dotnet/runtime/issues/47530

eng/Version.Details.xml
eng/Versions.props
src/libraries/Microsoft.Extensions.DependencyModel/pkg/Microsoft.Extensions.DependencyModel.pkgproj
src/libraries/Microsoft.Extensions.DependencyModel/src/Microsoft.Extensions.DependencyModel.csproj

index 439980d..ec141f5 100644 (file)
@@ -38,7 +38,7 @@
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Sha>1d951297eb7bdd29a31dff3149606152717ed6b4</Sha>
     </Dependency>
-    <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21219.2">
+    <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="6.0.0-beta.21221.6">
       <Uri>https://github.com/dotnet/arcade</Uri>
       <Sha>1d951297eb7bdd29a31dff3149606152717ed6b4</Sha>
     </Dependency>
index 7e3534f..a982a45 100644 (file)
@@ -62,7 +62,7 @@
     <MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21219.2</MicrosoftDotNetXUnitExtensionsVersion>
     <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21219.2</MicrosoftDotNetXUnitConsoleRunnerVersion>
     <MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21219.2</MicrosoftDotNetBuildTasksArchivesVersion>
-    <MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21219.2</MicrosoftDotNetBuildTasksPackagingVersion>
+    <MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21221.6</MicrosoftDotNetBuildTasksPackagingVersion>
     <MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21219.2</MicrosoftDotNetBuildTasksInstallersVersion>
     <MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21219.2</MicrosoftDotNetRemoteExecutorVersion>
     <MicrosoftDotNetVersionToolsTasksVersion>6.0.0-beta.21219.2</MicrosoftDotNetVersionToolsTasksVersion>
index 6d9d2b9..ba0c445 100644 (file)
@@ -4,8 +4,8 @@
     <ProjectReference Include="..\src\Microsoft.Extensions.DependencyModel.csproj">
       <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
     </ProjectReference>
-    <!-- Elements from previous packages that will be included in the newly built package -->
-    <HarvestIncludePaths Include="lib/net451;lib/netstandard1.3;lib/netstandard1.6" />
+    <!-- Exclude TFMs that aren't supported by the package anymore from validation. -->
+    <ExcludeHarvestedSupportedFramework Include="netcoreapp1.0;netcoreapp1.1;netcore50;uap10.0;net451;net46" />
   </ItemGroup>
   <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
 </Project>
index ce27427..500f16e 100644 (file)
@@ -3,10 +3,6 @@
     <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
     <EnableDefaultItems>true</EnableDefaultItems>
   </PropertyGroup>
-  <PropertyGroup>
-    <!-- Ensure Assemblies are first resolved via targeting pack when targeting net461 -->
-    <AssemblySearchPaths Condition="'$(TargetFramework)' == 'net461'">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.6.1\1.0.1\lib\net461\;$(AssemblySearchPaths)</AssemblySearchPaths>
-  </PropertyGroup>
 
   <ItemGroup>
     <Compile Include="$(CoreLibSharedDir)\System\Numerics\Hashing\HashHelpers.cs"
@@ -17,9 +13,9 @@
     <InternalsVisibleTo Include="Microsoft.Extensions.DependencyModel.Tests" /> 
   </ItemGroup>
 
-  <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
+  <ItemGroup Condition="'$(TargetFramework)' == 'net461'">
     <Reference Include="System.Runtime" />
-    <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" Condition="'$(TargetFramework)' == 'net461'" />
+    <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
   </ItemGroup>
 
   <ItemGroup>
@@ -29,5 +25,4 @@
     <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj" />
     <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
   </ItemGroup>
-
 </Project>