How to exclude the files while packaging

ganesh.mulimaniganesh.mulimani Posts: 28
edited July 16, 2014 7:58AM in Deployment Manager
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.

Comments

  • These files would need to be excluded as part of the original project. Can you please double check that they are excluded at the MSBUILD stage?
  • Also, can I ask exactly how you're creating the package from TFS? Which tool are you using to build the .nupkg?
    Technical Lead
    Redgate Software
  • I am creating the package using RgPublishExecutable command.
    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.
  • This behaviour is by design. When you use RgPublish to publish a .csproj, it uses MSBuild to build the project, and therefore gives you exactly the same output that building in Visual Studio would give you.

    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.
    Technical Lead
    Redgate Software
Sign In or Register to comment.