You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had developed a user control in WPF with VB and the 4.8 framework that worked perfectly.
By recreating the same user control with .net 9, I noticed many BC30111 error detections.
Ex: Unable to convert a value of type Point to Point.
Unable to convert a value of type Color to Color.
This problem is present when the system.drawing library is imported.
This library was imported to use the ToolboxBitmap property.
You can see this error behavior on the illustration.
Visual Studio 2022 Version 17.12.1
.Net 9
WPF Program in VB
Original Comments
Nicole Hu [MSFT] on 2/1/2025, 10:42 AM:
We have converted this feedback item to a problem. This change was done to better reflect the feedback’s nature. It will allow other developers to easily find it and engage on it.
jacky.perpete on 2/1/2025, 00:18 PM:
To avoid the error, you have to remove the import code line of the system.drawing library and add the library reference in the ToolboxBitmap property declaration.
My user control code with framework 4.8 was built this way. The problem was already there.
This is a problem that has existed for several years and has never been corrected.
Feedback Bot on 2/1/2025, 01:24 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
The text was updated successfully, but these errors were encountered:
This seems to be by design. Color and Point types are both in the System.Windows and System.Drawing namespaces. If the solution by jacky.perpete (i.e. removing the using) is not acceptable, you have to specify fully qualified type (such as System.Windows.Media.Color instead of Color).
This issue has been moved from a ticket on Developer Community.
I had developed a user control in WPF with VB and the 4.8 framework that worked perfectly.
By recreating the same user control with .net 9, I noticed many BC30111 error detections.
Ex: Unable to convert a value of type Point to Point.
Unable to convert a value of type Color to Color.
This problem is present when the system.drawing library is imported.
This library was imported to use the ToolboxBitmap property.
You can see this error behavior on the illustration.
A simplified test program is available here.
TestUserControl.zip
Visual Studio 2022 Version 17.12.1
.Net 9
WPF Program in VB
Original Comments
Nicole Hu [MSFT] on 2/1/2025, 10:42 AM:
We have converted this feedback item to a problem. This change was done to better reflect the feedback’s nature. It will allow other developers to easily find it and engage on it.
jacky.perpete on 2/1/2025, 00:18 PM:
To avoid the error, you have to remove the import code line of the system.drawing library and add the library reference in the ToolboxBitmap property declaration.
My user control code with framework 4.8 was built this way. The problem was already there.
This is a problem that has existed for several years and has never been corrected.
Feedback Bot on 2/1/2025, 01:24 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
The text was updated successfully, but these errors were encountered: