简体   繁体   中英

Create a “minimum deployment package” with Visual Studio 2010

When I choose to "Rebuild Solution" in Visual Studio, the output in the binaries looks something similar to this:

MyProgram.exe
MyProgram.pdb
MyProgram.exe.config
MyProgram.vshosts.exe
MyProgram.vshosts.exe.config
MyProgram.vshosts.exe.manifest
log4net.dll
log4net.xml
SomeOtherLibary.dll
AnotherLibrary.dll

Which seems an awful lot of stuff for a Release, as all you really need to run the program is the exe , config and the dll s of the libraries.

How could I go about building a "minimum deployment package", that really only contains the bare minimum that is need to run the program on another machine (of course assuming it has .NET installed)?

I would create an installer . It's pretty simple to do and it ensures you have all the right files bundled in a single .msi, with the extra advantages of resolving dependencies on .NET, registry keys, file associations and anything else you might need.

If you really want to create package without an installer, you'll need to manually specify the files you want to include. We do this for some projects here and we have our build server run a Nant build that simply packages files into a .zip file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM