Skip to content

ApacheTech/TLS-EntryPoints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Multiple Entry Points in .NET Applications.

This repository aims to show how it is possible to have multiple entry-points within an application, even to the extent that multiple applications can share an entry-point, via Shared Projects.

Build Configurations

I have included four different Build configurations:

  • IMPLICIT: - This flag is also included within Debug and Release configurations, and shows the OOBE behaviour.
  • EXPLICIT: - This sets the Startup Object to be $(AssemblyName).ExplicitEntryPoint. This entry point is within the same assembly.
  • SHARED: - This sets the Startup Object to be SharedEntryPoints.SharedProgram. This entry point is NOT within the same assembly.
  • TLS: - This sets the project to use the implicitly generated link to the TLS file within the assembly.

In each case, you can see that there is no Program.cs file in either assembly, or the Shared Project.

Top Level Statements are purely a language feature. We can see that all three projects, net7.0, net5.0, and netstandard2.0 all have TLS enabled, and active, when in TLS configuration. So long as the project is running C# version 9.0 or higher, then TLS will be the first default implicit entry point to be run. If no TLS files are found, then the first static void Main(...) class will be used.

By running each project, in each configuration, you can see how the entry-point shifts down the line.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages