Last post Sep 14, 2020 10:42 AM by Bathory
Sep 14, 2020 10:42 AM|Bathory|LINK
I want to create a C# .Net dll as Add-In for Enterprise Architect in Visual Studio. This dll has to be registered for com-interop to be used by Enterprise Achitect.
Within this dll I also want to do a database migration with code first and nuget package microsoft.entityframework.core. This database migration works fine with the paket manager console in visual studio if the com-interop checkbox in project properties
build is un-checked. If it's checked my dll can't compile. The error message is:
"... .dll" can not be registered.
The method "DisposeAsync"
in type "Microsoft.EntityFrameworkCore.DbContext"
of assembly "Microsoft.EntityFrameworkCore, Version 3.1.8..." has
In my original code I have no functions with any kind of Dispose or similar. It's a simple project with a few lines of code. I tried to manage it in nuget package manager with older versions of Microsoft.EntityFrameworkCore, but it didn't help. Also I had
overwritten the DisposeAsync function within my code, but this didn't also help.
The relevant code is within the context class the line with DbContext:
In Google I couldn't find anything so please help me.