Skip to content

Commit

Permalink
Don't expose VisualStudio.Setup to NuGet
Browse files Browse the repository at this point in the history
In the switch to Central Package Management (#8317), I missed that
PrivateAssets doesn't apply to PackageVersion items, which caused us to
have an extraneous dependency from some of our packages to
`Microsoft.VisualStudio.Setup.Configuration.Interop` for 17.6, 17.7, and
17.8.
  • Loading branch information
rainersigwald committed Nov 16, 2023
1 parent 85d8422 commit 5addea0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions eng/dependabot/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<PackageVersion Include="Microsoft.BuildXL.Processes" Version="0.1.0-20230929.2" />
<PackageVersion Update="Microsoft.BuildXL.Processes" Condition="'$(BuildXLProcessesVersion)' != ''" Version="$(BuildXLProcessesVersion)" />

<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.2.2146" PrivateAssets="All" />
<PackageVersion Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Condition="'$(MicrosoftVisualStudioSetupConfigurationInteropVersion)' != ''" Version="$(MicrosoftVisualStudioSetupConfigurationInteropVersion)" PrivateAssets="All" />
<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.2.2146" />
<PackageVersion Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Condition="'$(MicrosoftVisualStudioSetupConfigurationInteropVersion)' != ''" Version="$(MicrosoftVisualStudioSetupConfigurationInteropVersion)" />

<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Update="Microsoft.Win32.Registry" Condition="'$(MicrosoftWin32RegistryVersion)' != ''" Version="$(MicrosoftWin32RegistryVersion)" />
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Reference Include="System.IO.Compression" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ItemGroup>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.IO.Redist" Condition="'$(FeatureMSIORedist)' == 'true'" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
<PackageReference Include="Shouldly" />
<PackageReference Include="System.Net.Http" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Framework/Microsoft.Build.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- Promote CompilerServices.Unsafe from the old version we get from System.Memory on net472. -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" />
<Reference Include="System.Xaml" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<Content Include="$(NuGetPackageRoot)microsoft.net.compilers.toolset\$(MicrosoftNetCompilersToolsetVersion)\tasks\net472\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="Roslyn" />
Expand Down
4 changes: 2 additions & 2 deletions src/Utilities/Microsoft.Build.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETStandard' and '$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Text.Encoding.CodePages" />
</ItemGroup>

<ItemGroup Label="Shared Code">
<Compile Include="..\Shared\AssemblyFolders\AssemblyFoldersEx.cs">
<Link>Shared\AssemblyFolders\AssemblyFoldersEx.cs</Link>
Expand Down

0 comments on commit 5addea0

Please sign in to comment.