.NET - x86 Project - What files need to get pushed to the production machine?

Posted on 2011-10-19
Last Modified: 2012-05-12
What files need to get pushed to the production machine for a console app?  You'll notice the app.config file is missing.  I didn't use one in this project.

AutoEmail.application - Don't think I include.
AutoEmail.exe - Include
AutoEmail.exe.config - Not sure
AutoEmail.exe.manifest - Not sure.
AutoEmail.pdb - Not needed if I don't need to debug the deployment.
AutoEmail.vshost.application - Not sure.
AutoEmail.vshost.exe - Don't think I need it.
AutoEmail.vshost.exe.config - Don't think I need it.
AutoEmail.vshost.exe.manifest - Don't think I need it.
AutoEmail.xml - Not sure.

Obviously, if I overcompensate, and deploy all or many of these files, it will work.  My objective, however, is to deploy only what's necessary.
Question by:jdana
    LVL 40

    Accepted Solution

    The *.vshost.* are useless. They are used only by Visual Studio, while you are executing the application from the development environment. So you can get rid of them for deployment.

    The .pdb is also usually useless, it is used by the debugger. However, some programmers like to distribute the debug information in a first deployment, because when you trap errors with the .pdb included, you have a little more information, such as the line number for the lines of code in the stacktrace. However, there is a security issue doing that for some types applications, because you are basically sending your source code away with your application. Note that if the .pdb does not have the same timestamp as the .exe, it is useless anyway, it is then simply a remains of an old compilation that has nothing to do with the current .exe.

    For the other files, it depends on what you did during development. They were needed at some point, but maybe they are not anymore.

    How to be sure? Start from sratch. Here is what I would whenever I need to deploy an application.

    Delete all those files. Do not be scared, they are all the result of a compilation, we will bring recreate them in a minute by recompiling the application.

    Fire Visual Studio with you solution or your project. Go in the project properties window (bottom of the Project menu). Select the Compile tab, and then the Advanced Compile Options button. In Generate debug info, select None. This will get rid of the .pdb and make your application slightly faster and smaller. Be sure to reset it later for future development, otherwise your debugger won't work for that project.

    Recompile (Build) the solution or project.

    You will end up of a clean slate of the files that are needed for your project in its actual state, with only the *.vshost.* as extras. Close Visual Studio, delete the *.vshost.*, and what is left is usually what you need to distribute.

    I say usually, because if you used some third party stuff in your application, it might not be included there and you might have to install it separately. Many third party tools have the bad habit of installing on your development machine in a way that does not flag Visual Studio of the need to be distributed with the application, and they are not copied in the application directory as they should.

    Author Comment


    Your response is one of the best EE responses I've ever seen (and I've seen quite a few).  I've incorporated the full posting into my .NET lesson.  



    Author Closing Comment


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    In my previous article ( we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now