novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects
MIT License
347 stars 42 forks source link

Support for .NET Core app 3.0 #131

Closed GeertvanHorrik closed 5 years ago

GeertvanHorrik commented 5 years ago

We are using this (happily!) for all our projects, and want to investigate whether we can add support for .NET Core 3.0 for WPF in all our libraries.

I am now getting this error:

C:\Program Files\dotnet\sdk\2.1.500\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0.  Either target .NET Core 2.1 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [C:\Source\Orc.FilterBuilder\src\Orc.FilterBuilder\Orc.FilterBuilder.csproj]

I am coming from 1.5.4, so made 2 changes:

1) Update to Project Sdk="MSBuild.Sdk.Extras" instead of referencing it as package reference 2) Add netcoreapp3.0 as target framework

Will keep posting investigations here, it might be of use for others.

GeertvanHorrik commented 5 years ago

Without using netcoreapp3.0, the packages are created correctly, so I am assuming the migration of step 1 have been completed successfully.

clairernovotny commented 5 years ago

For WPF, you don't need the extras at all anymore. The recommended approach would be to use the new Microsoft.NET.Sdk.WindowsDesktop SDK.

The extras will likely be relevant for Xamarin and UWP.

GeertvanHorrik commented 5 years ago

Thanks for your reply. The advantage of extras is that we can use them for all our projects (WPF apps, web apps, libs (WPF, UWP and netstandard all combined). Whenever we use WindowsDesktop, we can't really multitarget (right?).

So we would like to keep using extras since it has brought us benefit and will give us benefit if we need to be flexible in the future (we've standardized our project structure).

clairernovotny commented 5 years ago

The end goal is to allow the extras to co-exist, but the WPF-related functionality will call in the desktop one where available. Just hasn't been updated to co-exist yet.

GeertvanHorrik commented 5 years ago

Not sure I understand your reply, is there anything I can do to make this work (pr, update my stuff, whatever you think is actionable from my side)?

clairernovotny commented 5 years ago

Done in #133