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

Boots doesn't work with DotNet5 #55

Closed SaqibS closed 3 years ago

SaqibS commented 3 years ago
  1. I install DotNet5
  2. I install boots
  3. I try to run Boots, but get an error about DotNet3.0 not being installed.

While it would be relatively trivial to install DotNet3 on the build server, it seems unnecessary since surely DotNet5 is backwards compatible, and indeed I used DotNet5 to install Boots.

Any tips appreciated.

Output below:

You can invoke the tool using the following command: boots Tool 'boots' (version '1.0.3.527') was successfully installed.

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

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:

jonathanpeppers commented 3 years ago

Is this running on Azure DevOps? What agent pool is it?

On Azure DevOps, last I checked macos-latest and windows-latest were both working, but maybe an update to the image broke this?

SaqibS commented 3 years ago

Yes, this is on Azure Dev Ops. We're using the macOS-10.15 image.

Our YAML includes the following two tasks:

    - task: UseDotNet@2
      displayName: 'Use .NET Core SDK $(DotNetCoreVersion)'
      inputs:
        version: '$(DotNetCoreVersion)'

    - bash: 'dotnet tool install --global --ignore-failed-sources boots && boots --stable Mono && boots --stable Xamarin.iOS'
      displayName: 'Install latest stable Mono and Xamarin.iOS'

In the failing version, DotNetCoreVersion is set to 5.x.

jonathanpeppers commented 3 years ago

Ok in this repo, I removed the UseDotNet task completely and that is why it works, I think.

I think the solution is to compile boots for netcoreapp2.1;netcoreapp3.1;net5.0 and it would work everywhere. I had to do something similar when .NET Core 3.0 came out.

SaqibS commented 3 years ago

Thanks! I haven't built/tried this, but looking at the commit that should fix it. Let me know when this is published and I'll give it a go.

jonathanpeppers commented 3 years ago

Let me fix the build on AppVeyor; then I'll close this when a new package is available for you to try.

jonathanpeppers commented 3 years ago

Let me know if this build works, thanks!

https://www.nuget.org/packages/boots/1.0.3.556

jonathanpeppers commented 3 years ago

I used 1.0.3.556 successfully on another repo where only .NET 6 is installed, so I think this will work for you. Let me know, otherwise, thanks.