0

I need to use a package called NXOpen which requires .NET Framework 4.5 or later, in my project which is running .NET Core.

I can include NXOpen and write code with it, however on runtime I get the following error, "Could not load type 'System.Runtime.Remoting.Messaging.IMessageSink' from the assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. I've found out that this error occurs because this class is not included in .NET Core. Is there any way to resolve this issue without downgrading my project to .NET Framework? I would really rather not write a project in an already outdated framework.

PaperBee
  • 15
  • 6
  • It looks like NXOpen only supports .NET 4.5, 4.6, 4.7 or 4.8. Not .NET Core, or .NET 6 and higher: https://community.sw.siemens.com/s/question/0D54O00007CBnS5SAL/which-net-framework-and-visual-studio-version-is-required-for-nxopen-on-version-nx1953. You'll probably need to target your app for .NET 4.7.x or lower... – paulsm4 May 13 '23 at 05:33
  • @paulsm4 so is there absolutely no other solution apart from downgrading my project to .NET Framework? – PaperBee May 13 '23 at 05:57
  • 2
    Remoting was removed in .NETCore, there is no way to migrate this library. – Hans Passant May 13 '23 at 08:05

1 Answers1

0

I'm almost certain that this cannot be done. NX APIs are compiled with .NET Framework and not .NET Core. Although if you are creating a library then you can create it in .NET Standard. .NET Standard can be reference by both .NET Framework and .NET Core projects. Also, .NET Framework for NX APIs depends on NX Versions as well.