Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the .exe file that VS generates via .NET Core self-contained deployment?

[I'm using Windows conventions for convenience but this is an x-platform question.]

When I publish a .NET Core project (named, say, Tannery) via SCD, Visual Studio generates the application file publish\Tannery.exe, which is my entry point into publish\Tannery.dll. In addition, from what I've tested, publish\Tannery.exe automagically works with any config/build of Tannery.dll [on the target runtime].

This suggests Tannery.exe is just a thin wrapper around dotnet.exe and tantamount to dotnet Tannery.dll. However, I can't find documentation on this. So, what "is" this application file, and how flexibly can one use it?

like image 433
The Most Curious Thing Avatar asked Dec 17 '25 17:12

The Most Curious Thing


1 Answers

When you use SCD you build your project for a specific runtime (e.g. windows x64), the build would include all the dotnet dependencies, so when you run your SCD on a system without the dotnet SDK, it will run without problem.

You can think about it as a wrapper around dotnet.exe, where the dotnet.exe is part of the build and not a system dependency.

like image 141
areller Avatar answered Dec 20 '25 09:12

areller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!