0
votes

I have a .Net Framework 4.5.2 dll which I want to use in a .Net Core 3.1 project. I know the classic framework dll is not compatible to core framework so I can't reference the assembly directly. Porting to .Net Standard may be an option but a lot of work because it uses WCF. I have two options, a) inter process communication or b) COM interop. I read a lot about problems and solutions of framework/core compatibility, but nothing about COM interop.

What I did with Visual Studio 2019: Framework dll: "Make assembly COM-Visible" + "Register for COM interop" Core dll: add COM dependency

After I have added my COM dependency, Visual Studio displays a yellow triangle about the COM reference, no error. Does this means it should basically work but I did something wrong?

1

1 Answers

0
votes

From my experience it will not work, it will throw you some errors on usage. Maybe my cases where a bit different, but I would be surprised if this will work. edit: from some other responses will not work. Could you maybe add a new .net standard project as a small wrapper over the .net framework DLL and then reference the .net standard project in your .net core app?