0

I've recently started exploring ASP.NET core, because I'd like to know if I can use it to create a neat web interface to control a program that is installed on my pc (that program has an API).

All went well until I found that .NET Core 3.1 does not have Marshal.GetActiveObject (I need that to connect with the program). So I thought I'd be smart and create another program with .NET Framework that I then reference.

Trouble is I still get this error (see also the GIF attached below):

System.MissingMethodException: 'Method not found: 'System.Object System.Runtime.InteropServices.Marshal.GetActiveObject(System.String)'.'

Does anyone have an idea how to solve this particular issue? Or have comments on how to best approach the business of creating web interfaces to control desktop applications? I'm new to that and would love to learn more!

Thanks a lot in advance!

[edit 1] So to be clear, I made a separate program (class library) that targets .NET Framework. It compiles well (as Marshal.GetActiveObject is supported in .NET Framework), but then I get the error returned anyway. I am aware that .NET Core does not implement Marshal.GetActiveObject.

Marshal.GetActiveObject missing

  • OS specific functionality is not included in by default in .Net Core as it is supposed to be cross platform. – phuzi Mar 05 '20 at 11:37
  • Does this answer your question? [No definition found for GetActiveObject from System.Runtime.InteropServices.Marshal C#](https://stackoverflow.com/questions/58010510/no-definition-found-for-getactiveobject-from-system-runtime-interopservices-mars) – phuzi Mar 05 '20 at 11:41
  • Ok, so If I just want it to be windows only should I choose a .net Framework setup? – Michael684 Mar 05 '20 at 12:58
  • Just because it's not included by default doesn't mean there isn't necessarily a way to do it! – phuzi Mar 05 '20 at 13:07

0 Answers0