Open Rand-Random opened 3 years ago
You just need Microsoft.NET.Sdk.WindowsDesktop
SDK. Then you can use UseWPF
with .net 4.7.
You just need
Microsoft.NET.Sdk.WindowsDesktop
SDK. Then you can useUseWPF
with .net 4.7.
I thought we had just moved from Microsoft.NET.Sdk.WindowsDesktop
to Microsoft.NET.Sdk
in .net5's csproj sdk
warning NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'.
You just need
Microsoft.NET.Sdk.WindowsDesktop
SDK. Then you can useUseWPF
with .net 4.7.I thought we had just moved from
Microsoft.NET.Sdk.WindowsDesktop
toMicrosoft.NET.Sdk
in .net5's csproj sdkwarning NETSDK1137: It is no longer necessary to use the Microsoft.NET.Sdk.WindowsDesktop SDK. Consider changing the Sdk attribute of the root Project element to 'Microsoft.NET.Sdk'.
Microsoft.NET.Sdk
works with only net5.
When multitarget, we should use Microsoft.NET.Sdk.WindowsDesktop
.
@jespersh Thanks for the info, didn't notice the warning when I tried it myself. Seems like a prematurely opened the issue https://github.com/dotnet/try-convert/issues/343.
@kkwpsv
Can I define the SDK based on a condition?
So use Microsoft.NET.Sdk.WindowsDesktop
on net47 but use Microsoft.NET.Sdk
on net5-windows?
@kkwpsv Can I define the SDK based on a condition? So use
Microsoft.NET.Sdk.WindowsDesktop
on net47 but useMicrosoft.NET.Sdk
on net5-windows?
No need to do this. There's no warning with multitarget project when use Microsoft.NET.Sdk.WindowsDesktop
.
After some headache trying to achieve a multitarget project with net47 and net5.0-windows. I would like to suggest that UseWpf should also work for net47.
My current project sadly has to look like this to make it "work".
My project file is a strange combination of this stackoverflow question https://stackoverflow.com/questions/43693591/how-to-migrate-wpf-projects-to-the-new-vs2017-format
Other question, why is it necessary for me to provide the
HintPath
only for the assemblyPresentationUI
? All the other assemblies can be found without an issue, but if I would drop theHintPath
I would get aI am not sure if that is the correct place to post this issue. If possible and I am wrong here move the issue to the correct place.