project-system
project-system copied to clipboard
Unexplained warnings while trying to add System.Web reference
Visual Studio Version
2022 - Version 17.8.6
Summary
Hello team,
I'm experiencing unexplained warning signs in my .NET 8 application, created with Visual Studio 2022, after adding the System.Web library as a COM reference. Additionally, when checking the tree, I observe an ID being displayed instead of the expected package name.
Steps to Reproduce
- Create a .NET 8 application using Visual Studio 2022.
- Add System.Web library as a COM reference.
- Observe unexplained warning signs.
- Inspect the tree to find an ID instead of the package name.
Are you able to build the project without any errors?
Looking on my machine, I don't see a System.Web
COM reference:
But the following steps do seem to reproduce the issue you're seeing for me:
- Create a new .NET Console App
- Right-click the Dependencies node and choose Add COM Reference
- Search for "System" and select "System.Drawing" (any version)
- Observe the solution explorer and project file:
The XML added to the project doesn't include a name.
Building the project produces an error though:
MSB3290: Failed to create the wrapper assembly for type library "{d37e2a3e-8545-3a39-9f4f-31827c9124ab}". Type library 'System_Drawing' was exported from a CLR assembly and cannot be re-imported as a CLR assembly.
So it seems that this particular COM reference is not supported.
Adding other COM references produces a human-readable name in the Include
attribute, and no yellow triangle.
@bbbturan
Closing this site to inactivity. We can reopen if @bbbturan replies.