Appleoddity
Appleoddity

Reputation: 1181

Compile vb.net application in to standalone .exe

I've been digging around for an answer to this problem. It seems like a simple use case.

I have a very simple vb.net console application in Visual Studio 2019. I want to compile it in to a standalone .exe file.

When I compile the application several files are generated.

myprogram.deps.json
myprogram.dll
myprogram.exe
myprogram.pdb
myprogram.runtimeconfig.dev.json
myprogram.runtimeconfig.json

I find that if I don't include myprogram.dll and myprogram.runtimeconfig.json with myprogram.exe I am unable to execute the application. I have tried both debug and release versions.

How can I compile this simple application in to a single .exe file with no other dependencies other than the .net framework which is already on every modern Windows computer?

Upvotes: 1

Views: 1745

Answers (1)

Wallace
Wallace

Reputation: 59

It looks like you may be attempting to use CORE 3.0.
In that case you may want to consider using the "--self-contained" flag.

Refer

Upvotes: 2

Related Questions