madskristensen / BundlerMinifier

Visual Studio extension
Other
616 stars 173 forks source link

Add .NET 5.0 support #550

Open e27182 opened 3 years ago

e27182 commented 3 years ago

Adds .NET 5.0 as a supported target framework.

Relates to #460.

alexrp commented 3 years ago

Simply adding <RollForward>LatestMajor</RollForward> to the project file should be sufficient. Then you shouldn't have to add another TFM with every new major .NET version. (This is probably what the prefercliruntime file used to do, but I doubt it works anymore as it was never documented.)

PeterHagen commented 3 years ago

I tried to dotNet bundle in a Docker 5.0 SDK image, without installing DotNet 2.1 (currently the .deb package for this is unavailable), and get the "The framework 'Microsoft.NETCore.App', version '2.0.0-preview1-002111-00' was not found." error.

Has this been released already?

460

jmoralesv commented 3 years ago

Hi all, I cleanup my local machine from older .NET Core 2.x and 3.x runtimes, and I found that one of my projects was failing, and I realized I'm using BundlerMinifier.Core, version 3.2.449 which depends on .NET Core 2.0

When running dotnet bundle I got this:

Cannot find a manifest file.
For a list of locations searched, specify the "-d" option before the tool name.
No tools were restored.
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
  - The following frameworks were found:
      3.1.21 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      5.0.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

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

So I guess I have to install .NET Core 2.0 again in my computer, just for having this tool working again.

Any plans on adding support for .NET 5 or .NET 6 (already available) to this tool anytime soon?

lonix1 commented 2 years ago

@madskristensen Any plans for .NET 6 support?

I see the changes were approved above, are there blockers? Would be nice for this to be pushed to nuget.