dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.41k stars 984 forks source link

Follow-up on 'Constructor on type 'System.Drawing.Image' not found' crash in .NET Core – Provided Sample Not Runnable #12435

Open Sekar47 opened 1 week ago

Sekar47 commented 1 week ago

Environment

Microsoft Visual Studio Professional 2022 (64-bit) - Preview Version 17.12.0 Preview 5.0

.NET version

NET 9.0

Did this work in a previous version of Visual Studio and/or previous .NET release?

No

Issue description

In a .NET Core project, when attempting to add an item as an image in the ImageCollection Editor via the Properties window, this error is encountered. This issue does not occur in the .NET Framework project.

Previous Forum Thread: https://github.com/dotnet/winforms/issues/10549

Current Situation: In response to our initial query, a sample was provided to help resolve the issue. However, the sample is not in a runnable state; it produces additional errors when we attempt to execute it. Screenshots of these errors are attached to this post for your reference.

Request for Assistance: Could someone from the support team review the sample provided in the original query and, if possible, provide an updated, runnable version? Alternatively, any guidance on resolving this issue within the .NET Core project would be greatly appreciated.Image Image

Steps to reproduce

1.Download the sample provided in the previous thread. 2.Open the solution in Visual Studio. 3.Attempt to build or run the project.

Observed Behavior: Errors appear in the Solution Explorer related to the NuGet package references, preventing the solution from building or running. Unfortunately, we’re unsure how to resolve these reference issues, as all necessary NuGets are already referenced in the sample.

Diagnostics

No response

Tanya-Solyanik commented 1 week ago

@Sekar47 - had you performed steps 4 and 5 from this comment - https://github.com/dotnet/winforms/issues/10549#issuecomment-1953296793