2

I have built a console application in C# and would like to execute this application on a remote machine.

The debug folder of this project contains several other files apart from HelloWorld.exe

For example

  • HelloWorld.exe.config
  • HelloWorld.pdb
  • HelloWorld.vshost.exe
  • HelloWorld.vshost.exe.config
  • HelloWorld.vshost.exe.manifest

Do I need to copy ALL these files to a folder on remote machine? I think the pdb file is a debugger file which can be ignored? The two .config files are exactly the same.

3 Answers 3

7

Of the files you listed, you only need HelloWorld.exe, and maybe HelloWorld.exe.config (if you are using configuration stored in it).

  • HelloWorld.exe.config - XML configuration file of your application. This file may be important. File is created by copying and renaming app.config file to build target directory.

  • HelloWorld.pdb - Debug symbols. They store information needed for debugging of the application, like line numbers and similar. Application will run correctly without them, but they are not bad to have when deployed. For example, if your application throws an exception and crashes, line numbers in stack trace will be displayed if you have debug symbols present.

  • HelloWorld.vshost.exe - This is temporary executable that is used by Visual Studio, and which hosts your application temporarily while in debug mode

  • HelloWorld.vshost.exe.config - Same as for first .config file, but for VS temporary executable

  • HelloWorld.vshost.exe.manifest - "Describes and identifies the shared and private side-by-side assemblies that an application should bind to at run time". You will not need this either, unless you have dependencies on assemblies of which you have many versions installed in .NET search locations (application folder, GAC, etc). Most probably this is not the case for you.

Sign up to request clarification or add additional context in comments.

Comments

6

If it's just a console application, all you should need is the executable. However:

  • If you have referenced files that are not embedded you'll need those referenced files

  • If you make use of app.config, you'll also need the exe.config, I'll credit Nikola and Bar's answers for that though

You are correct that the pdb file is for debugging purposes.

2 Comments

and maybe the .exe.config if you configured something there
@sine I guess it depends on what's going on in the executable. I'll add that
3

If the application needs some hardcore variable in app.config then you need the executable and the exe.config, if not only the .exe

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.