Browse .NET Framework Assembly from .NET Core Applications

Asked 2 years ago, Updated 2 years ago, 182 views

Is it possible to browse and run the .NET Framework assembly from the .NET Core application?
I was able to add and compile reference settings by specifying DLLs directly, but I couldn't execute them.

Example)

  • Create a console application (.NET Core 2.2)
  • See C:\Program Files (x86)\Reference Assembly\Microsoft\Framework.NETFramework\v4.6.1\System.Runtime.Remoting.dll
  • Change platform to x86

Program.cs

var channel = new IpcServerChannel ("SampleChannel");

Debugging does not display any error messages, but the application exits immediately.

c# .net .net-core

2022-09-30 21:37

1 Answers

I didn't understand the details, and I looked for them only with keywords, but there is a Q&A like this.

.net core class library calling.net framework class library
It's old two years ago, but there is a mark that it has been resolved, so it might be helpful.Below is machine translation.

Sharing code between a regular .NET library and a Core project did not work just by using a shared project.This is because it cannot be viewed from the Core project.

But with a little trick, I can make it work.

This is what was introduced in the other answer in the same Q.
Sharing code across platforms

There are other Q&A's.
Calling a.Net Framework 4(or Mono) assembly from a.Net Core application

Also, this is the Q&A that may have something to do with it in Japan.
Exception occurs when you browse to dll in the console app of .NET Core and use the class of contents

I hope I can help you.


2022-09-30 21:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.