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 am building a library for .NET48 .NET6.0 and .NET8.0 with custom WPF controls, one of them is a directory picker. In .NET48 and .NET6.0 I am using the Windows Forms picker, in .NET8.0 I am using the WPF picker and therefore also don't want to have the reference to Windows forms. See repro for details.
To Reproduce
Create a multitargeting C# project and reference Windows Forms conditionally:
I can also create a complete repro project and upload.
Exceptions (if any)
For Target .NET8.0 I get build error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?), though it should not be required by .NET8.0.
Further technical details
The bug was introduced with .NET SDK 9.0.200. With .NET SDK 9.0.102 I can compile successfully.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am building a library for .NET48 .NET6.0 and .NET8.0 with custom WPF controls, one of them is a directory picker. In .NET48 and .NET6.0 I am using the Windows Forms picker, in .NET8.0 I am using the WPF picker and therefore also don't want to have the reference to Windows forms. See repro for details.
To Reproduce
Create a multitargeting C# project and reference Windows Forms conditionally:
And write a C# class as follows:
I can also create a complete repro project and upload.
Exceptions (if any)
For Target .NET8.0 I get build error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?), though it should not be required by .NET8.0.
Further technical details
The bug was introduced with .NET SDK 9.0.200. With .NET SDK 9.0.102 I can compile successfully.
The text was updated successfully, but these errors were encountered: