If I have a basic C# program in Visual Studio such as
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
And I build the project in Visual Studio, I get a .dll instead of a .exe. I've looked in the properties page for the project, and the Output type is set to Console Application. I've tried Windows Application and Class library too but they all create a dll. If it matters, my Target framework is .NET Core 2.0. Not sure what else would be causing this.
You could try following step:
Step 1. Right click project and click publish
Step 2. Select folder -> click publish(or create profile, it is ok)
Step 3. click configure -> Deployment mode:self-contained -> runtime target:win-x64 -> click save
Step 4. click publish, you will find .exe file under your target location
Btw, you also see the detail in FolderProfile.pubxml. Hope this helps. :)
Update: My environment info:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With