MSBuildSdkExtras icon indicating copy to clipboard operation
MSBuildSdkExtras copied to clipboard

How to reference Windows.Forms in a library that uses MsBuild.Sdk.Extras, on .net core?

Open bgavrilMS opened this issue 5 years ago • 2 comments

To be able to use Windows Forms or WPF in .NET Core, we are asked to use:

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

Which conflicts with MsBuild.Sdk.Extras.

Do you have any suggestions on how to take advantage of both of these technologies?

bgavrilMS avatar Jul 16 '20 17:07 bgavrilMS

Perhaps you can use the old way of importing its targets via PackageReference and Import: https://github.com/novotnyllc/MSBuildSdkExtras#migrate-from-the-old-way-vs-pre-156

chucker avatar Jul 23 '20 19:07 chucker

You don't need the Extras when using the .NET Core 3.x SDK for targeting Windows Forms. Just make sure you have "UseWindowsForms" set to true in your project file.

clairernovotny avatar Sep 03 '20 15:09 clairernovotny