Skip to content

Commit

Permalink
Remove unused dependency to MS.CA.Collections from Framework and …
Browse files Browse the repository at this point in the history
…surface dependency to immutable collections.

This lightens the NS2.0 reference assembly.
  • Loading branch information
teo-tsirpanis committed Dec 7, 2024
1 parent 75356a3 commit f220ecc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Framework/Microsoft.Build.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
<EnablePackageValidation>true</EnablePackageValidation>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Collections" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- Promote CompilerServices.Unsafe from the old version we get from System.Memory on net472. -->
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" />
<Reference Include="System.Xaml" />
</ItemGroup>

<!-- When targeting NS2.0, make private all references not exposed in the public API. -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Collections.Immutable" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\Shared\Constants.cs">
<Link>Shared\Constants.cs</Link>
Expand Down

0 comments on commit f220ecc

Please sign in to comment.