title: VS2012 Custom Build Step - Treat Output As Content
body: <p>I am currently migrating a reasonably large solution from VS2008 to VS2012. To date, this solution has been dependent on a command line build for several build steps, and I want to use the project system properly to execute these build steps.  I've been through the various options and decided that a custom build step makes sense in most of the VC++ projects that require it. The solution is a mix of C++, C# &amp; VB.</p>
  
  <p>These tasks include building Primary Inter-op Assemblies and processing output files using third-party utilities, where the input and the output are the same.</p>
  
  <p>I've had some teething issues, but I'm mostly up and working with this approach. The remaining issue is one of deploying these additional outputs to dependent projects.</p>
  
  <p>Consider this; I have a third-party component, which given an input of a.dll produces two outputs, a revised a.dll and a_util.dll.  When I have a project that is dependent on a.dll, I now need that project to pull a_util.dll in to it's output too.  I was hopeful that the "Treat Output as Content" field on the custom build step in VS2012 would help in this respect, but I'm going by the one-liner in the UI, I can't find any comprehensive documentation on this option.  In fact, the <a href="http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&amp;l=EN-US&amp;k=k%28VC.Project.VCCustomBuildStep.Command%29;k%28TargetFrameworkMoniker-.NETFramework,Version=v4.0%29;k%28TargetFrameworkMoniker-.NETFramework,Version=v4.0%29&amp;rd=true" rel="nofollow">MSDN documentation</a> just pretends this option doesn't exist.</p>
  
  <p>If anyone can help explain this option, or an alternative approach, that would be great. </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>At the moment, I am adding a BeforeBuild target to each dependent project to copy the additional outputs into that dependent project.  The problem with this approach (while it works) is one of maintenance. Unfortunately if a dependency of this type is missed, it results in a cryptic runtime error.</p>