The Most Curious Thing
The Most Curious Thing

Reputation: 211

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?

Upvotes: 3

Views: 208

Answers (1)

areller
areller

Reputation: 5238

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.

Upvotes: 3

Related Questions