Open jnajerasc opened 6 years ago
@mandel-macaque
Is there any eta on this getting fixed?
@jcapellman sorry, but there is no ETA at the moment, we are triaging, identifying issues and will get back to you. But I do not expect it to be any time soon, sorry :(
Embeddinator-4000 returns the following error when processing a Xamarin library that references EF Core:
error MM2001: Could not link assemblies. Reason: Error processing method: 'System.Void EFCoreSampleLibrary1.BloggingContext::OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder)' in assembly: 'EFCoreSampleLibrary1.dll'
Steps to Reproduce
Refer to the attached zip file, which contains sample code that demonstrates this issue.
The sample code contains three projects: a .NET Standard 2.0 library that contains the EF Core tutorial code (https://docs.microsoft.com/en-us/ef/core/get-started/netcore/new-db-sqlite); a .NET Core 2.1 application that creates a library object and uses it to run the database tutorial code; a Xamarin library that acts as a wrapper of the .NET Standard library so an Objective-C app can invoke the EF Core tutorial code, assuming a successful code generation by Embeddinator-4000.
As part of the EF Core setup, I ran migration on the library project and referenced the startup project:
dotnet ef migrations add InitialCreate --startup-project ../EFCoreSampleNetCoreApp1/EFCoreSampleNetCoreApp1.csproj
Rather than running the 'dotnet ef database update' command, the program invokes the Migrate method of DbContext at runtime.
After building the Release configuration successfully in Visual Studio for Mac, I ran Embeddinator-4000 and had to resolve 10 errors related to missing internal dependencies in bin/Release. One such error was:
error MM2002: Failed to resolve "Microsoft.EntityFrameworkCore.DbContext" reference from "Microsoft.EntityFrameworkCore, Version=2.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"
These are the libraries that I had to manually copy into bin/Release from my local NuGet cache to get past the Embeddinator-4000 "Failed to resolve" errors:
Microsoft.EntityFrameworkCore.Abstractions.dll (2.1.2, netstandard2.0) Microsoft.EntityFrameworkCore.dll (2.1.2, netstandard2.0) Microsoft.EntityFrameworkCore.Relational.dll (2.1.2, netstandard2.0) Microsoft.Extensions.Caching.Abstractions.dll (2.1.1, netstandard2.0) Microsoft.Extensions.DependencyInjection.Abstractions.dll (2.1.1, netstandard2.0) Microsoft.Extensions.Logging.Abstractions.dll (2.1.1, netstandard2.0) Microsoft.Extensions.Primitives.dll (2.1.1, netstandard2.0) Remotion.Linq.dll (2.2.0, netstandard1.0) System.Diagnostics.DiagnosticSource.dll (I copied 4.4.1, netstandard1.3 -- error referred to assembly version 4.0.3.0) System.Interactive.Async.dll (I copied 3.2.0, netstandard2.0 -- error referred to assembly version 3.0.3000.0)
At this point, I get the link assembly error.
Expected Behavior
I expect a successful code generation of the sample Xamarin library by Embeddinator-4000.
Actual Behavior
error MM2001: Could not link assemblies. Reason: Error processing method: 'System.Void EFCoreSampleLibrary1.BloggingContext::OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder)' in assembly: 'EFCoreSampleLibrary1.dll'
Environment
macOS 10.13.6 (High Sierra)
Build Logs
This is the output of Embeddinator-4000 after copying all internally-referenced libraries into bin/Release:
Example Project (If Possible)
EFCoreSample1.zip