Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to include excluded file types in MSBuild

Currently MSBuild is not copying over files w/ the .manifest extension to my build drop folder. I've added commands to explicitly copy over the file, but is there a config flag that I can set so that .manifest files are included?

like image 968
digita1-anal0g Avatar asked Jun 05 '12 21:06

digita1-anal0g


1 Answers

You can pass the AllowedReferenceRelatedFileExtensions property to your build. The property's value should be a semi-colon separated list of file extensions. From Microsoft.Common.targets:

<!--
These are the extensions that reference resolution will consider when looking for files related
to resolved references.  Add new extensions here if you want to add new file types to consider.
-->
<AllowedReferenceRelatedFileExtensions Condition=" '$(AllowedReferenceRelatedFileExtensions)' == '' ">
    .pdb;
    .xml
</AllowedReferenceRelatedFileExtensions>

There is no way to add values to the list. You can only supply the whole list, so make sure you include the defaults, e.g.,

MSBuild.exe MyProject.csproj /t:build "/p:AllowedReferenceRelatedFileExtensions=.pdb;.xml;.manifest"
like image 96
Aaron Jensen Avatar answered Oct 29 '22 13:10

Aaron Jensen