Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 6.0 Support? #178

Closed
mpekurny opened this issue Feb 8, 2022 · 19 comments
Closed

.NET 6.0 Support? #178

mpekurny opened this issue Feb 8, 2022 · 19 comments

Comments

@mpekurny
Copy link
Contributor

mpekurny commented Feb 8, 2022

When trying to use a .NET assembly built in .NET 6, I get the error below. Looking at other issues and PRs, it appears that updates needed to be made to support .NET 5.0, so I would assume that similar updates will also need to be made to support .NET 6? Is there a plan to make those changes? Also, .NET 5 was not a long term support version, so support and updates for that version will end in May of this year.

: Grpc.AspNetCore.Server.ServerCallHandler[6]
Error when executing service method 'ValidateStep'.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
at Gauge.Dotnet.GaugeLoadContext.Gauge.Dotnet.IGaugeLoadContext.LoadFromAssemblyName(AssemblyName name)
at Gauge.Dotnet.AssemblyLoader.ScanAndLoad(String path) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/AssemblyLoader.cs:line 138
at Gauge.Dotnet.AssemblyLoader..ctor(AssemblyPath assemblyPath, IGaugeLoadContext gaugeLoadContext, IReflectionWrapper reflectionWrapper, IActivatorWrapper activatorWrapper, IStepRegistry registry) in /home/runner/work/gauge-dotnet/gauge-dotnet/src/AssemblyLoader.cs:line 41
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](I
ServiceProvider provider)
at Grpc.AspNetCore.Server.Internal.DefaultGrpcServiceActivator`1.Create(IServiceProvider serviceProvider)
at Grpc.Shared.Server.UnaryServerMethodInvoker`3.Invoke(HttpContext httpContext, ServerCallContext serverCallContext, TRequest request)
---snip---
@sriv
Copy link
Member

sriv commented Feb 9, 2022

.net 6.0 support was added and merged via #174. It is still to be released (some builds have been misbehaving)

@mpekurny
Copy link
Contributor Author

Thanks for the information @sriv is there any ETA on when it might be released?

@mpekurny
Copy link
Contributor Author

Any word on when the .NET 6 support will be released?
@sriv

@sriv
Copy link
Member

sriv commented Mar 23, 2022

apologies for going silent here, been terribly busy off late. I'll try to spend some time this weekend.

In the meantime, if you are able to do a build from source and take a quick look to see what works and what doesn't, that'd be super helpful (ref: https://github.com/getgauge/gauge-dotnet#build-from-source)

@mpekurny
Copy link
Contributor Author

Hey @sriv I downloaded and built from source as you requested. I will admit we are fairly new to gauge and do not have a lot of tests written yet and nothing testing UI code (yet), just tests checking inputs/outputs of our service APIs.

With that caveat out of the way the version built from code worked in .NET 6 without any issues running out tests.

@sriv
Copy link
Member

sriv commented Mar 28, 2022

Hi @mpekurny , thanks for checking the source build. It's good to hear that the source build is working for you. But I am worried that the tests are not passing on our CI - #186

I was attempting to make a release fwiw, but the tests indicate two potential issues - (1) with table driven parallel execution and (2) when shutting down an editor like vscode (which relies on gauge language server).

I need to spend some time investigating this, because if we force a release now too many users will have to face these. I had spent some time in the past over the language server issue, but it was not replicable on my linux machine :(

I can manually create a pre-release if you want to use it in the interim, but it will have to be installed from a file and will not be available via gauge install dotnet

@mpekurny
Copy link
Contributor Author

mpekurny commented Apr 5, 2022

@sriv since I can build from source, I think for now I can wait for you to work out the issues you are having. We don't use table driven parallel execution, or at least not yet, so that wasn't part of my testing. However, I use VSCode and didn't see any issues with shutting down the editor in my testing. I am on Windows. Not sure if that helps or not, but if there is anything else I can help with to get to a release, let me know.

@ayankumaar
Copy link

@sriv I followed the same process that you have mentioned here. I am able to run the dotnet plugin in .NET 6.0. Also, I did a sanity check with one of my scripts. It is working fine as of now.

But, I have one question, I have created a zip file for the dotnet plugin. I am trying to install it using the following command: gauge install dotnet --file "<file_path>" .

But, I am getting the following error:

Failed to install plugin 'dotnet'.
Reason: File C:\Users\XXXXX\AppData\Local\Temp\1\gauge_temp1649917827641745100\plugin.json doesn't exist.

I am not sure what I am missing here while creating the dotnet plugin zip file. I have included the binaries along with dotnet.json, launcher.cmd and launcher.sh.

@ayankumaar
Copy link

ayankumaar commented Apr 18, 2022

@zabil or @sriv As .NET 5.0 will be out of support soon, is there any update when gauge dotnet will be upgraded to .NET 6.0 and will be officially released ?

@harimadusumilli
Copy link

Hello Gauge Team, We also would like to know any tentative ETA for support of DOTNET 6.0 . As we have many tests in our enterprise which are using 5.x and since its going to be end of support , It would be great if you can provide some information, which would help us make a plan.

@zabil
Copy link
Member

zabil commented Apr 18, 2022

Unfortunately, there is no ETA for this. The builds are failing and it's been hard to pin point the exact reason. The best options is to build from source and use it for now. Thanks for being patient.

@harimadusumilli
Copy link

Hello Gauge Team, Checking to see if there is any update on the release and support for Dotnet 6.0. Any response is appreciated.

@sriv
Copy link
Member

sriv commented May 9, 2022

The latest release should work on. Net 6.0. https://github.com/getgauge/gauge-dotnet/releases/tag/v0.5.0

Please check and report your experience.

Thanks

@harimadusumilli
Copy link

Thank you for your prompt response. We will work with it and let you know.

Regards,
Hari

@harimadusumilli
Copy link

Do you have the .zip offline installation file that you generally provide for installation. I see that the packages that you have provided are with the source code. Is is possible for you to provide the .zip offline installation file ?

@sriv
Copy link
Member

sriv commented May 9, 2022

Seems like the artifacts did not get attached. I'll check this, bit busy presently

@harimadusumilli
Copy link

Hello Sriv / Gauge Team, Can you please let me know if you will be able to have the offline installation .zip package when it can be made available ?

@sriv
Copy link
Member

sriv commented May 10, 2022

Need to investigate the release scripts, it may take some time. I can only look at it over the weekend at the earliest.

Any help is welcome here. There is no gauge team anymore, the project is maintained by volunteers on their personal time (this has been the case since Jan 2021).

@sriv
Copy link
Member

sriv commented May 11, 2022

The release script has been fixed. The zip file is available here for offline install - https://github.com/getgauge/gauge-dotnet/releases/download/v0.5.0/gauge-dotnet-0.5.0.zip

I am going to close this issue, feel free to open a new one if there are any issues.

@sriv sriv closed this as completed May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants