How to exclude the files while packaging
ganesh.mulimani
Posts: 28
I am creating the package from TFS. But it is copying the .pdb files as well.
How to exclude the pdb and web.config file while feeding into the package.
How to exclude the pdb and web.config file while feeding into the package.
Comments
Redgate Software
Everything works fine but it is including the .pdb files and excluding some of the dlls which are set to CopyLocal=False.
In case if i set the property PurgeOutputDirectory=True then i will loose some of the dlls which are set to CopyLocal=False.
How to solve this.
If you want referenced assemblies to be deployed to the target location, you need to set CopyLocal on those assemblies to true, otherwise the assumption is that they are installed in the GAC. Is there are reason you need some assemblies not to be copied to the output directory for local builds, but do want them deployed to the target directory on deployment?
There is no harm in deploying .pdbs - in fact, it helps with debugging exceptions on live systems - but if you want to remove them, you can turn off pdb generation by right-clicking on the project in Visual Studio, going to Properties...->Build->Advanced... and setting the 'Debug Info' dropdown to 'none' for the Release configuration.
If you want to do more specific filtering of the output so that the deployed files are not the same as the build output, you'll need to switch to using RgPublish with a .nuspec file after building the project.
Redgate Software