Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

.Net assembly for db migration can't be registered if com-interop is set under project properties build in vs

$
0
0

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:

  1. The assembly"... .dll" can not be registered.The method "DisposeAsync"in type "Microsoft.EntityFrameworkCore.DbContext"of assembly "Microsoft.EntityFrameworkCore, Version 3.1.8..." hasno implementation.

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:

using Microsoft.EntityFrameworkCore;

namespace ...

{

  1. publicclass..:DbContext
  2. {

In Google I couldn't find anything so please help me.


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>