<p>While setting up CruiseControl, I added a buildpublisher block to the publisher tasks:</p>

<pre><code>&lt;buildpublisher&gt;
  &lt;sourceDir&gt;C:\MyBuild\&lt;/sourceDir&gt;
  &lt;publishDir&gt;C:\MyBuildPublished\&lt;/publishDir&gt;
  &lt;alwaysPublish&gt;false&lt;/alwaysPublish&gt;
&lt;/buildpublisher&gt; 
</code></pre>

<p>This works, but it copies the entire file contents of the build, I only want to copy the DLL's and .aspx pages, I don't need the source code to get published.</p>

<p>Does anyone know of a way to filter this, or do I need to setup a task to run a RoboCopy script instead?</p>

[{'answer_id': 23060, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 3, 'selected': True, 'text': "<p>I set up a task to do this. I'm not aware of any way to make CruiseControl be that specific. I usually just chain a batch file to do the copy to the CC.net task.</p>\n"}, {'answer_id': 32667, 'author': 'Scott Dorman', 'author_id': 1559, 'author_profile': 'https://Stackoverflow.com/users/1559', 'pm_score': 0, 'selected': False, 'text': '<p>The default build publisher in CC.NET does not provide a way to do this. You have a few options:</p>\n\n<ul>\n<li>Create your own build publisher with the desired functionality</li>\n<li>Create a custom NAnt/MSBuild task</li>\n<li>Use a scripting technology (RoboCopy, batch file, etc.) to create a script file and run an "Executable" task for CC.NET, or an "exec" task for NAnt/MSBuild</li>\n</ul>\n'}, {'answer_id': 32681, 'author': 'Mike', 'author_id': 2848, 'author_profile': 'https://Stackoverflow.com/users/2848', 'pm_score': 1, 'selected': False, 'text': '<p>I\'m not sure with a web project, but for our winforms app, you can grab the TargetOutputs from the MSBuild task like so:</p>\n\n<pre><code>&lt;MSBuild Projects="@(VSProjects)"\n  Properties="Configuration=$(Configuration)"&gt;\n  &lt;Output TaskParameter="TargetOutputs" ItemName="BuildTargetOutputs"/&gt;\n&lt;/MSBuild&gt;\n</code></pre>\n\n<p>and then do a copy:</p>\n\n<pre><code>&lt;Copy SourceFiles="@(BuildTargetOutputs)" \n  DestinationFolder="bin"\n  SkipUnchangedFiles="true" /&gt;\n</code></pre>\n\n<p>Not sure what the TargetOutputs are for a web project, but for winforms and class libraries, it\'s the .dll or .exe.</p>\n'}, {'answer_id': 7028931, 'author': 'riffrazor', 'author_id': 565913, 'author_profile': 'https://Stackoverflow.com/users/565913', 'pm_score': 0, 'selected': False, 'text': '<p>A CC.Net Powershell task can be used for this as well. </p>\n'}]
['https://Stackoverflow.com/questions/23027', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1965/']