How Do I make Multiple Entry Points in a .NET CORE app?

April 10, 2018 at 21:13:04
Specs: Windows 7, logs
I am new to .NET CORE but I have followed a few tutorials. The tutorials I have followed are basically "Hello World" types of programs where I make a small functional .Net Core application and I publish it. They are basically a DLL, I assume, and they run in some sort of system/container where they can run on any OS.

Even though the final product is a DLL, the code itself seems to be structured in a way where it is an actual executable application.

So how would I translate an actual C# DLL project into a .NET Core project? How would a project that is already designed to produce a DLL work in a .Net Core project?

Executables only have one entry point: static void Main.

.NET Libraries expose public methods which are all entry points in that sense.

An "entry point" in a program is where the operating system invokes an executable program file, the term does not apply to libraries. (and ASP.NET web-application files are really just libraries, the ASP.NET host just looks for certain exposed Page/Handler/Controller types). This applies to ASP.NET. Does it also apply to .NET Core? Also, when I ran my .NET Core applications, I did it from a special command line. So how would that work if I translated a DLL C# program into a .NET Core program?

See More: How Do I make Multiple Entry Points in a .NET CORE app?

Report •

April 10, 2018 at 23:40:01
Thank you for your tutorial :)

Report •

April 11, 2018 at 00:17:21
You cannot have multiple entry points in an executable program. The nearest would be to pass command line switches that alter how the program runs.

Report •

April 11, 2018 at 21:36:29
DLL files can have entry points, and they can be run using rundll32. Some can be accessed using vbscript as well. (at least, on 32-bit.)
As long as you know the "hook". But most (for my experience) recognize few hooks. Not much or any help - just my experience with trying to run "exposed" subroutines of DLL files.
OVER to someone who knows a lot more than I do...

message edited by nbrane

Report •
Related Solutions

Ask Question