views:

33

answers:

2

I have a Visual Studio 2010 project which references some third-party components. Their assemblies are accompanied by XML documentation files, which are useful for us (and only us) developers. And whenever the project is built (either in Debug or Release modes) these XML files are copied to the build directory.

I can't seem to find a setting or switch to disable the copy of those XML files to the build directory, either within Visual Studio or though MSBuild. A post-build script may be an option, but a smelly one. Any ideas? Thank you.

A: 

If the .xml/.pdb are marked as build-action "Content" (etc), you can change them to "None". You should also ensure they copy-to-build-output is false.

Are both of those set?

Marc Gravell
But to do this I'd have to add them as project items... or am I mistaken?
Humberto
A: 

What is the problem with having the XML files get copied into the folder on release builds? It seems to me that this is fine and that the real problem is with the code that picks up files to place them in the installer. Picking up third party dlls from your own bin\release folder is not a good practice in my opinion. I'd have my installer pick up third party dlls from their own folder in my source tree.

Russell McClure
The problem is that these files have no function besides aiding the IntelliSense feature. There's no point in including them with the release files. Besides, there's no installer involved...
Humberto
So how are you deploying your app?
Russell McClure
It's a single installation under our control, so we're deploying it by simply copying the files.
Humberto
So my solution would be to modify the copy script to not copy the files you don't want to copy.
Russell McClure
@Russel that would work for sure. But it's not the *ideal* solution, which would prevent the files from being copied in the build. I'm trying to understand the logic behind this behavior. Thanks!
Humberto