-
Notifications
You must be signed in to change notification settings - Fork 128
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 5.0 linking error #1625
Comments
@agocke this looks like 5.0 fix candidate to me /cc @vitek-karas |
This looks like #1559. That issue is also referenced by a customer that just hit it yesterday. |
One of my package was referencing an old .net core 3.1 EF Core package, which it seems was provoking the issue. Sorry to have bothered you guys for nothing :( And many thanks for you quick replies! |
I've checked through all my packages and do not have .net core 3.1 ef packages, but i'm running into the same issue, can you shed more light on this? alright, managed to find my reference, it was due to AspNetCore.Diagnostics.HealthChecks |
Duplicate of #1559 |
Hello,
I recently updated a solution to the .NET 5.0 framework and attempted to build a Docker image from my startup project.
The publish command is the following:
dotnet publish "MyProject.csproj" --runtime alpine-x64 --self-contained true -p:PublishTrimmed=true -p:PublishSingleFile=true -c Release -o /app/output
In NET CORE 3.1, no problem, the command was being executed as expected. In .NET 5.0, though, I get the following error:
LLink : error IL1005: Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDesignTimeServices.ConfigureDesignTimeServices(IServiceCollection): Error processing method 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDesignTimeServices.ConfigureDesignTimeServices(IServiceCollection)' in assembly 'Microsoft.EntityFrameworkCore.Sqlite.Design.dll' [/src/Microservices/ProjectManager/Neuroglia.Souche.ProjectManager.Api/Neuroglia.Souche.ProjectManager.Api.csproj] 5> Mono.Linker.LinkerFatalErrorException: ILLink: error IL1005: Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDesignTimeServices.ConfigureDesignTimeServices(IServiceCollection): Error processing method 'Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDesignTimeServices.ConfigureDesignTimeServices(IServiceCollection)' in assembly 'Microsoft.EntityFrameworkCore.Sqlite.Design.dll' 5> ---> System.InvalidOperationException: Operation is not valid due to the current state of the object. 5> at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.GetValueNodeFromGenericArgument(TypeReference genericArgument) 5> at Mono.Linker.Dataflow.ReflectionMethodBodyScanner.ProcessGenericArgumentDataFlow(GenericParameter genericParameter, TypeReference genericArgument, IMemberDefinition source) 5> at Mono.Linker.Steps.MarkStep.MarkGenericArgumentConstructors(IGenericInstance instance, IMemberDefinition sourceLocationMember) 5> at Mono.Linker.Steps.MarkStep.MarkGenericArguments(IGenericInstance instance, IMemberDefinition sourceLocationMember) 5> at Mono.Linker.Steps.MarkStep.GetOriginalMethod(MethodReference method, DependencyInfo reason, IMemberDefinition sourceLocationMember) 5> at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference, DependencyInfo reason, IMemberDefinition sourceLocationMember) 5> at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction, MethodDefinition method, Boolean& requiresReflectionMethodBodyScanner) 5> at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) 5> at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method, DependencyInfo& reason) 5> at Mono.Linker.Steps.MarkStep.ProcessQueue() 5> --- End of inner exception stack trace --- 5> at Mono.Linker.Steps.MarkStep.ProcessQueue() 5> at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue() 5> at Mono.Linker.Steps.MarkStep.Process() 5> at Mono.Linker.Steps.MarkStep.Process(LinkContext context) 5> at Mono.Linker.Pipeline.Process(LinkContext context) 5> at Mono.Linker.Driver.Run(ILogger customLogger)
Anyone has an idea on how why I'm gettings these errors with .NET 5.0? And how I could solve them, without sacrificing trimming?
Thanks in advance!
The text was updated successfully, but these errors were encountered: