Reference (not using) windows forms in cross platform class library or application. #1959
Labels
tracking-external-issue
An issue is caused by an external system and won't be fixed in this repo
won't fix: by design
Behaviour is by design
Hi,
I am working on a cross platform application that uses windows forms on windows.
So my csproj contains the following lines:
The problem with this is that I am now unable to build the application with Visual Studio Mac because of the missing Microsoft.NET.Sdk.WindowsDesktop.
I'm completely aware of the fact that windows forms will not work on other platforms but does this mean I'm forced to setup up multiple projects if the application only uses windows forms on windows but still needs to reference the binaries for the build ?
Using the "Microsoft.NET.Sdk.WindowsDesktop" means that every binary that references windows forms (even without using it) cannot be references in a cross platform application/library.
Is there any recommended way to do this ? Most information only talk about porting windows apps to .net core.
Otherwise I'm now forced to split one application and one class library into 2 applications and 2 class libraries. (with and without windows forms)
The text was updated successfully, but these errors were encountered: