Obmama
Obmama

Reputation: 81

c# How do I correctly compile code for distribution?

I want to convert my program into something that I can give out and people can use (just to my friends and people I know) but I'm totally lost as of how to do it. I've tried doing lots of things from other forums but none seem to work or actually do what I'm looking for.

I tried using the publishing feature in the build tab but don't like that It makes It into a ClickOnce application as I'd much rather have it as an .exe.

From what I read there is already one of these in the bin\debug folder (I'd use the use the release bin\ folder when I am fully finished) but i don't know how much or what files actually need to be packaged together for it to work on another computer.

My main questions are:

Can I actually make a distributable a application using the bin\debug .exe with all the other files in it?

Do I also need to include the obj and properties folder? (I'm guessing not for the properties but the obj does look kind of important)

Because I've used NuGet packages and references do i have to to include the App.config and packages.config or is this just something that visual studio uses?

sorry if I've got anything wrong with what I've said, I'm way out of my comfort zone here.

Upvotes: 0

Views: 437

Answers (1)

Victor Wilson
Victor Wilson

Reputation: 1846

For a console application, you should be able to zip up the contents of the bin/release directory and distribute it directly.

You can safely exclude .pdb files from your archive, though they can help you debug the program if your friends and cohorts encounter errors.

Upvotes: 3

Related Questions