Description
Hello.
I have a question regarding dotnet tool supprot for WinForms applications: we have been planning to lift our .NET Core 3.1 Windows Forms applications that are now being packaged as dotnet tools to .NET 5 but this will mean that the target framework for those applications will be .net5.0-windows.
The problem is then that we will not be able to package those apps as dotnet tools anymore, ref. following error message coming from the build pipeline:
C:\Program Files\dotnet\sdk\5.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.PackTool.targets(95,5): error NETSDK1146: PackAsTool does not support TargetPlatformIdentifier being set. For example, TargetFramework cannot be net5.0-windows, only net5.0. PackAsTool also does not support UseWPF or UseWindowsForms when targeting .NET 5 and higher.
Unfortunately I'm not able to find more detailed information or any documentation saying that it's not supported and what alternative approaches are recommended.
Can someone please clarify this for me?
Thanks in advance!