Skip to content

Instantly share code, notes, and snippets.

@stofte
Last active December 28, 2017 12:14
Show Gist options
  • Save stofte/8ed84d68b1e99ba3f4dd5a9e4463085c to your computer and use it in GitHub Desktop.
Save stofte/8ed84d68b1e99ba3f4dd5a9e4463085c to your computer and use it in GitHub Desktop.
<!--
1. Define a new CopyAllFilesToSingleFolderForPackageDependsOn prop group
2. Define SwaggerXmlDocumentationCopyFiles target to be run before CopyAllFiles target
3. Create target with itemgroup denoting all xml files to include in publish package
4. Modify the FilesForPackagingFromProject itemgroup by including all missing xml files
-->
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
SwaggerXmlDocumentationCopyFiles;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
</PropertyGroup>
<Target Name="SwaggerXmlDocumentationCopyFiles">
<ItemGroup>
<MyOtherDocs Include="bin\CLEVER.Connect.xml" />
<MyOtherDocs Include="bin\CLEVER.Connect.Models.xml" />
<MyOtherDocs Include="bin\CLEVER.Connect.Hubject.xml" />
</ItemGroup>
<ItemGroup>
<FilesForPackagingFromProject Include="%(MyOtherDocs.Identity)" />
</ItemGroup>
</Target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment