-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft.NET.ILLink.Tasks generating consolidation notice when trimming enabled #96249
Comments
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsDescriptionI believe this package is being brought in by the .NET 8 SDK. No matter what I do any project targeting .NET 8 shows that this package needs to be consolidated in the Nuget Package Manager UI for VS 2022. This is on projects that multi-target. Reproduction Steps
Expected behaviorNo consolidation issue for the ILLink package. Actual behaviorGenerates a consolidation warning in the package manager UI. Regression?No response Known WorkaroundsRemove trimming from project and the issue goes away. Configuration.NET 472, 6 and 8 with trimming Other informationNo response
|
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas Issue DetailsDescriptionI believe this package is being brought in by the .NET 8 SDK. No matter what I do any project multi-targeting .NET 8 with trimming shows that this package needs to be consolidated in the Nuget Package Manager UI for VS 2022. This is on projects that multi-target. Reproduction Steps
Expected behaviorNo consolidation issue for the ILLink package. Actual behaviorGenerates a consolidation warning in the package manager UI. Regression?No response Known WorkaroundsRemove trimming from project and the issue goes away. Configuration.NET 472, 6 and 8 with trimming Other informationNo response
|
Thank you @mtaylorfsmb!! I could not find the root cause of the consolidation notice and did not corelate it with the Setting it to |
Thanks for the repro steps @mtaylorfsmb, I was able to see the same consolidation notice, though it wasn't entirely reliable. I only see it for "Manage NuGet Packages For Solution...", not "Manage NuGet Packages..." for a specific project. As far as I can tell, the package manager UI shows this notice whenever different versions of a package are referenced across a solution - even if the different versions are referenced for different TFMs. For example, if I add the following, I get a consolidation notice for System.Text.Json: <ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net8.0'" Include="System.Text.Json" Version="8.0.0" />
<PackageReference Condition="'$(TargetFramework)' == 'net6.0'" Include="System.Text.Json" Version="6.0.0" />
</ItemGroup> The SDK effectively adds a PackageReference to Microsoft.NET.ILLink.Tasks, where the referenced version depends on the TFM, so it ends up with the same consolidation notice: Interestingly, the UI is aware that the package is implicitly referenced by an SDK, but still produces a consolidation notice. I also can't select a Version in the UI - if I click that dropdown, it says "Blocked by project", which suggests this has been intentionally blocked for SDK-referenced packages. I don't think there's anything we can do on our side to fix this - this would need to be handled in NuGet or VS, if it's not intended behavior. |
Moved to NuGet/Home#13676 |
Description
I believe this package is being brought in by the .NET 8 SDK. No matter what I do any project multi-targeting .NET 8 with trimming shows that this package needs to be consolidated in the Nuget Package Manager UI for VS 2022. This is on projects that multi-target.
Reproduction Steps
Expected behavior
No consolidation issue for the ILLink package.
Actual behavior
Generates a consolidation warning in the package manager UI.
Regression?
No response
Known Workarounds
Remove trimming from project and the issue goes away.
Configuration
.NET 472, 6 and 8 with trimming
Class library
Other information
No response
The text was updated successfully, but these errors were encountered: