Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed dotnet core (.NET Core) into native applications on Windows/Linux

Are there possibilities to embed dotnet core (.NET Core) environments into native processes?

My use-case would be an existing game-server where I want to offer the possibility to extend the game using C# on .NET Core on both Windows and Linux.

Bonus question: would there also be an AppDomain-concept available like in "oldschool" .NET?

like image 661
The Wavelength Avatar asked Nov 30 '16 13:11

The Wavelength


People also ask

Can .NET Core application run on Linux?

NET Core runtime allows you to run applications on Linux that were made with .


1 Answers

Yes, it is definitely possible.

I found this documentation with examples: .NET Core Hosting Tutorial

If the link does not work anymore, search the web for "hosting .NET Core".

About AppDomains ... I guess not. If you use CoreClrHost.h you can provide an ID for the default AppDomain, but it seems to be the one and only AppDomain. For isolation you can use seperate processes. Maybe AssemblyLoadContext class can also be a help to you.

like image 84
David Avatar answered Sep 23 '22 06:09

David