Skip to content

System.CodeDom.dll is copied to the output/build directory when referencing System.Management v9 #4991

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

Open
EatonZ opened this issue Mar 25, 2025 · 4 comments

Comments

@EatonZ
Copy link

EatonZ commented Mar 25, 2025

The issue I reported last year with .NET 8 is now happening again with .NET 9.

The same repro steps and details as described in that original issue apply to .NET 9.

@lonitra Can you help with this again?

@lonitra
Copy link
Member

lonitra commented Mar 25, 2025

We had attempted to mitigate this issue from occurring again by applying same resolution for 9.0 via #4782. I double checked again just now that PlatformManifest in release/9.0 branch contains the same information as the PlatformManifest that is provided with .NET 9 GA at C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\9.0.0\data\PlatformManifest.txt
@EatonZ Could you provide the dotnet 9 version you are using?
@ericstj do you have any ideas what else could be causing this issue?
@dotnet/dotnet-winforms FYI

@EatonZ
Copy link
Author

EatonZ commented Mar 25, 2025

I am using .NET 9.0.3.

@ericstj
Copy link
Member

ericstj commented Mar 25, 2025

TL;DR - stop checking in PlatformManifest.txt and generate it.

Related to this -- #4904

Right now 9.0 contains the 9.0 GA versions, so if a CodeDom newer than GA is used, it will be copied app local.

What we've done for both Asp.NET and NetCore.App is stop pinning the data files to GA. We've found that folks prefer to float the conflict-resolution information because they typically update both their SDKs and runtime installations. Mentioned in the linked issue:

Per dotnet/sdk#44566 this file (and other conflict resolution data) should track the latest versions rather than GA.

Also in 10.0 the package pruning feature will handle this during restore.

So I'd say it's by-design that a version of System.CodeDom newer than GA becomes app-local for WindowsDesktop apps, but after the changes described it will not. I'd say this is a safe change to take in servicing and consider it reactive to the increased frequency of dotnet/runtime package updates.

cc @ViktorHofer

@EatonZ
Copy link
Author

EatonZ commented Mar 26, 2025

If there is a way to stop this from happening until the next servicing release, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants