Skip to content

Instantly share code, notes, and snippets.

@sayedihashimi
Last active August 29, 2015 14:12
Show Gist options
  • Save sayedihashimi/ee692577a328d951190f to your computer and use it in GitHub Desktop.
Save sayedihashimi/ee692577a328d951190f to your computer and use it in GitHub Desktop.
How to include libgit2sharp NativeBinaries in the generated .vsix for a VSIX or Visual Studio Package
<!--
MSBuild snippet which you can paste into your .csproj/.vbproj for a VSIX or Visual Studio Package project
to have the libgit2sharp NativeBinaries .dlls included in the final .vsix.
Modified version of http://chrisparnin.github.io/articles/2013/09/deploying-native-binaries-with-visual-studio-extensions/
-->
<PropertyGroup>
<EnableIncludeLibGit2SharpInVsix Condition=" '$(EnableIncludeLibGit2SharpInVsix)'=='' ">true</EnableIncludeLibGit2SharpInVsix>
</PropertyGroup>
<ItemGroup Condition=" '$(EnableIncludeLibGit2SharpInVsix)'=='true' ">
<Content Include="$(MSBuildThisFileDirectory)..\packages\LibGit2Sharp.0.20.1.0\lib\net40\NativeBinaries\**\*.*"
Exclude="$(MSBuildThisFileDirectory)..\packages\LibGit2Sharp.0.20.1.0\lib\net40\NativeBinaries\**\*.pdb">
<Link>NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
</ItemGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment