Skip to content

Commit

Permalink
Remove harvesting of M.E.DependencyModel
Browse files Browse the repository at this point in the history
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 dotnet#47530
  • Loading branch information
ViktorHofer committed Apr 21, 2021
1 parent 333a6c7 commit 41e5f17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@
<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" />
</ItemGroup>
<!-- Remove TFMs that aren't supported by the package intentionally anymore. -->
<Target Name="_RemoveSupportedFramework"
BeforeTargets="ValidateLibraryPackage">
<ItemGroup>
<SupportedFramework Remove="netcoreapp1.0" />
<SupportedFramework Remove="netcoreapp1.1" />
<SupportedFramework Remove="netcore50" />
<SupportedFramework Remove="uap10.0" />
<SupportedFramework Remove="net451" />
<SupportedFramework Remove="net46" />
</ItemGroup>
</Target>
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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>
Expand All @@ -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>

0 comments on commit 41e5f17

Please sign in to comment.