tags:

views:

78

answers:

3

What exactly is needed for someone to use my C# windows application in executable form? I do know that .NET framework has to be installed on the computer, but I heard there is much more. And is there any way to spread the application besides doing installable form via "Publish"? I mean, which project files are needed? Only exe file, or these pdb and manifest files too? Do they have to be from bin/debug or bin/Release, or makes no difference? (I know files created with this application are saved in "debug") Because I need to show my program (as exe) to certain person with .NET framework...

+4  A: 

You only really need the .NET framework, unless you've used third party components.

If you use a Package and Deployment project in your solution it will automatically generate a .msi file for you with everything that your app needs to be installed.

You need .pdb files if you want file and line number detail in any exceptions thrown by your app. If you're selling the app as a product, don't include them as that information poses a security risk. If it's an internal app, then consider including them in your package and deployment project, because it's useful information to get with exception logs.

Neil Barnwell
A: 

The best option is to give them the files from your bin/release folder.

PDB files (which you should only find in your debug folder) contain the symbols for debugging your application, so you don't need to give them those.

There are other options such as ClickOnce deployment or an MSI, but it sounds like you just need to temporarily show this to only one individual, so it won't be worth it to go down this path.

In short, as long as the user has the correct version of the .NET framework installed on their machine, and you give them all of the relevant files from your bin/release folder (the EXE file, any additional DLLs that your application references, and any miscellaneous files like an app.config file), they should be able to run it just fine.

Nate Dudek
+2  A: 

For runtime etc, .NET should be enough. Or with some tools (like as is used via MonoTouch and some others), not even that.

For the application, just the exe is necessary, but there can be lots of other required files - a config file perhaps, or maybe supporting non-CLR dlls (third party dlls perhaps).

For deployment, you can just use the exe etc (xcopy deployment), or ClickOnce (.application), or an installer (.exe / .msi).

Marc Gravell