Jump to content
View in the app

A better way to browse. Learn more.

Obsidian Forum Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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?

 

If you want to generate an executable, you do:

dotnet publish -c Release -r win10-x64

"r" means "runtime", here's a list. By default, .NET Core compiles into a .dll which can then be executed on any platform supported by .NET Core (via dotnet "appname")

 

You can't have multiple entry points into an executable application. Even web applications contain a Main which builds web host.

 

Edit: Incidentally, https://stackoverflow.com

Edited by Fenixp

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.