How to exclude the files while packaging

Automated deployment for web applications and databases

How to exclude the files while packaging

Postby ganesh.mulimani » Wed Jun 04, 2014 12:21 pm

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.
ganesh.mulimani
 
Posts: 19
Joined: Fri Apr 25, 2014 12:12 pm

Postby Chris.Allen » Tue Jun 10, 2014 3:51 pm

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?
Chris.Allen
 
Posts: 579
Joined: Thu Mar 12, 2009 4:17 pm

Postby Mike Upton » Wed Jun 11, 2014 9:44 am

Also, can I ask exactly how you're creating the package from TFS? Which tool are you using to build the .nupkg?
Mike Upton

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 189
Joined: Wed May 11, 2011 8:04 am
Location: Redgate

How to exclude the files while packaging

Postby ganesh.mulimani » Wed Jul 16, 2014 9:47 am

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.
ganesh.mulimani
 
Posts: 19
Joined: Fri Apr 25, 2014 12:12 pm

Postby Mike Upton » Wed Jul 16, 2014 12:58 pm

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.
Mike Upton

Project Manager - SQL Compare|Data Compare|Comparison SDK
Redgate Software Ltd.
Mike Upton
 
Posts: 189
Joined: Wed May 11, 2011 8:04 am
Location: Redgate


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 1 guest