Closed rainersigwald closed 3 years ago
@SabotageAndi It shouldn't mean anything for tasks, unless you hit one of the rare breaking change in API surface. MSBuild as part of the .NET SDK is already running on the .NET 5 (or .NET Core 3.1) runtime; this just formalizes that at our layer, enabling us (and task authors) to use new functionality.
Thanks, @rainersigwald for this quick clarification.
Adding a note that we should probably update to net5.0 instead since that will be available shortly. For custom tasks, I would generally recommend that tasks compile against a higher target framework when possible to reduce the rollforward distance but as Rainer pointed out, the risk we have found is low as the runtime generally has enough back compat to cover all MSBuild task likely scenarios.
Just to clarify: will the MSBuild in visual studio still run on net framework?
I would generally recommend that tasks compile against a higher target framework when possible
From previous experience this is driven by: What is the minimum version that a tool can use MSBuild NuGet pacakges to load a project and execute builds? Either with MSBuildLocator and MSBuild APIs driectly, Roslyn's MSBuildWorkspace or tools like Buildalyzer.
So for third party tools/tasks it's probably easier if the TFMs supported by MSBuild APIs increases every now and then to reduce complexity of MSBuild version / runtime version compatibility tests.
will the MSBuild in visual studio still run on net framework?
@japj Yes, that's not changing here and will continue to target net472
.
So for third party tools/tasks it's probably easier if the TFMs supported by MSBuild APIs increases every now and then to reduce complexity of MSBuild version / runtime version compatibility tests.
@dasMulli this is a good point and I think it should be our policy going forward.
Work for this is being done in the arcade update PR. Assigning to myself
As part of this we need to consider what we do with the ref assemblies:
With .NET 5.0+, they won't really be netstandard any more, and I think we should consider making them explicitly .NET 5.0 (and then seeing the explicit public-API-breaking changes when we move to 6.0 and so on).
What would this mean for MSBuild Tasks? Currently, we are targeting .NET Core 2.1 for them. Do we have to change that to .NET Core 3.1? What happens if a user updates MSBuild/VS and builds a project which has still the .NET Core 2.1 MSBuild task referenced?