2

I have written a game using C# in VS Code. I have installed .NET Core 3.1 on my computer and the C# extension but I don't know how to export it as an .exe as when I try using the .exe and .exe extensions inside of the bin then debug on a computer without .NET installed then it doesn't work.

Is it possible to put everything necessary to run the game inside of the game folder it self without need .NET installed on the computer running it?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
penguin
  • 21
  • 2
  • https://learn.microsoft.com/en-us/windows/uwp/dotnet-native/ No idea but check this out. – kirjosieppo Dec 18 '21 at 22:10
  • 1
    No need for .Net Native. The key words for looking up are "dotnet publish" (the cli command) and "self-contained executable". – gunr2171 Dec 18 '21 at 22:38
  • 1
    Does this answer your question? [Publish .NET Core App As Portable Executable](https://stackoverflow.com/questions/50703578/publish-net-core-app-as-portable-executable) – gunr2171 Dec 18 '21 at 22:41

1 Answers1

0

Solution 1: right-click the project name which is beneath the solution name and above the properties you can find it in the solution explorer, once you have right clicked the project name there should be a button named publish. If you then go through all of the steps then it should give you an executable.

Solution 2: if you go into file explorer and find where your project is saved you can then go into the folder bin and then there should be a .exe there

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user456789
  • 37
  • 3