gauge-dotnet icon indicating copy to clipboard operation
gauge-dotnet copied to clipboard

dotnet 5.0 not supported?

Open rhuims opened this issue 3 years ago • 8 comments

Hi. I have a project that uses .NET 5.0 and gauge run tells me:

It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '3.0.0' was not found.
- The following frameworks were found:
5.0.5 at [/snap/dotnet-sdk/120/shared/Microsoft.AspNetCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at:
- https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=3.0.0&arch=x64&rid=ubuntu.20.04-x64
Error occurred while waiting for runner process to finish.
Error : exit status 150
Error ----------------------------------
Your Environment Information -----------
        linux, 1.1.8, b1501f4
        dotnet (0.3.1), html-report (4.0.12), screenshot (0.0.1)

Is .NET 5.0 not supported? If so, do you intend to add v5 support?

Thanks Reto

rhuims avatar Apr 13 '21 13:04 rhuims

Hi @rhuims,

Gauge-dotnet does not have Microsoft.AspNetCore.App as it's dependency. It does use Gauge.CSharp.Core which has a dependency onGrpc.AspNetCore.Server.

I am not sure how Microsoft.AspNetCore.App is being picked up as a dependency. I'll try to uninstall older versions and check with .NET 5.0.

sriv avatar Apr 13 '21 14:04 sriv

@sriv alright, thanks

rhuims avatar Apr 13 '21 14:04 rhuims

I can confirm that this is replicable. I am yet to trace the package that's adding Microsoft.AspNetCore.App as it's dependency.

sriv avatar Apr 16 '21 02:04 sriv

:+1:

rhuims avatar Apr 16 '21 08:04 rhuims

So, finally figured out that it is not a problem with the dependency of gauge-dotnet, rather gauge-dotnet itself has to be deployed with net5.0 as a target framework.

Changing the target framework is a fairly straightforward task, but I worry if a binary built with net5.0 as targetframework would work on .net core 3.1? If it doesn't, then gauge-dotnet would have to target multiple frameworks. This will be tricky, given how the scripts/packaging/hosting is setup.

@zabil - thoughts?

sriv avatar Apr 23 '21 11:04 sriv

I noticed this while trying to run gauge with dotnet5. Is it worth having a dotnet5 as a separate plugin so that it does not break for users running on 3?

For example

gauge init dotnet5
gauge install dotnet5

zabil avatar Apr 23 '21 12:04 zabil

I can confirm that gauge-dotnet built with targetframework netcoreapp3.0 and net5.0 do not work with .net 5.0 and .net 3.2.14 respectively.

So there's a need to have target framework specific builds. I am not a fan of another plugin, it is essentially a duplicate.

So there are a couple of options:

  • release a gauge-dotnet version which supports net5.0 and deprecate .net3.x support (not recommended as long as 3.x remains LTS)
  • create multiple framework support, and have a launcher script that would use the right version depending on the .net version installed with the ability to override this using a property/env var.

sriv avatar Apr 27 '21 03:04 sriv

create multiple framework support, and have a launcher script that would use the right version depending on the .net version installed with the ability to override this using a property/env var.

I guess this would be a better option. Support 3.x by default change dotnet.properties for 5 support.

zabil avatar Apr 27 '21 07:04 zabil