jonathanpeppers / boots

boots is a .NET global tool for "bootstrapping" vsix & pkg files. Just "boots https://url/to/your/package"!
MIT License
86 stars 9 forks source link

[build] use $(RollForward) Major instead of multi-targeting #59

Closed jonathanpeppers closed 3 years ago

jonathanpeppers commented 3 years ago

Context: https://natemcmaster.com/blog/2019/01/09/netcore-primitives-3/ Context: https://github.com/dotnet/designs/blob/main/accepted/2019/runtime-binding.md#rollforward

Previously when running boots on a machine with only .NET 5.0 and no .NET Core 3.1, you could hit:

It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '3.1.0' was not found.

To solve this, we need our *.runtimeconfig.json to allow things to automatically roll forward to .NET 5.0 if .NET Core 3.1 is not found.

If we set $(RollForward) to Major:

Major -- Roll forward to lowest higher major version, and lowest minor version, if requested major version is missing. If the requested major version is present, then the Minor policy is used.

I think this will make things work indefinitely for new .NET versions. I don't think this tool is likely to break on newer versions, and the older one will be used if found.