Find out all the files required to run a c# application

329 Views Asked by At

I need to generate a list of all the files which are enough to run my application on any machine. I need this for a setup program. When i go to bin/release folder i'm able to see some pdb files and some configuration files, which i think will not be needed. I tried to disable generation of pdb files too but it still generates pdb for the other projects present in the solution.

So i need a way in visual studio 2008, which can get me all the files (the .exe and .dll and other files) required by my application to run.

Thanks.

4

There are 4 best solutions below

1
ChrisF On BEST ANSWER

Have you tried publishing the application (Build > Publish [app])?

This should just copy all the essential files to the specified folder.

1
Anthony On

The pdb files are used for debugging. Building in "Release" mode should exclude these files.

You can also create a setup project within the solution. Using that project it is possible to see a list of included files.

0
Gerrie Schenck On

If you make a release build or publish the application then you should have a complete set of assemblies your application needs.

However, it can still rely on assemblies which reside in the GAC (Global Assembly Cache) of your machine. Check the references of your project if you think there are assemblies missing in the bin folder.

0
Pondidum On

To solve this exact problem with our software, we wrote a simple console app that finds all the .vbproj & .csproj files in our projects directory, then changes all of the to Release mode (which does not create pdb files, documentation files etc).

This is then run by the build machine (CruiseControl.Net) before it starts compiling the projects.