novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects
MIT License
346 stars 43 forks source link

Is MSBuildSdkExtras still needed for WPF #223

Closed haefele closed 4 years ago

haefele commented 4 years ago

When I used to create new WPF applications, and wanted to use the new SDK style csproj format, I would always reference MSBuildSdkExtras.

But now with .NET Core 3, I'm not sure if that's needed anymore. If I have a csproj file like this:

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
  <PropertyGroup>
    <UseWPF>true</UseWPF>
    <TargetFramework>net452</TargetFramework>
  </PropertyGroup>

  <!-- Other things omitted -->
</Project>

Everything builds perfectly without referencing MsBuildSdkExtras at all.

So now I'm wondering whether it's still needed, or I can go with a project like above. Or maybe this is not supported, just works by accident, and might break something? I don't know.

Do you know whether this is supported or not, or do you have any other info regarding this topic?

haefele commented 4 years ago

Looking through the Microsoft.Net.Sdk.WindowsDesktop source code, I found the following comment:

https://github.com/dotnet/wpf/blob/f6a97b31c5e9b8bf7d63fa0959106982d2ebcfae/packaging/Microsoft.NET.Sdk.WindowsDesktop/targets/Microsoft.NET.Sdk.WindowsDesktop.props#L12

So yeah, it seems to be officially supported, nice!