Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (18 sloc) 2.04 KB
To update LibGit2Sharp to a new version, follow these steps:
1. Update the LibGit2Sharp NuGet package to obtain the new version of the LibGit2Sharp.dll, and it's corresponding LibGit2Sharp.NativeBinaries NuGet package's git2-*.dll.
2. Run the following batch script against the LibGit2Sharp.dll to create a signed version of the dll file with a new strong name (i.e. PublicKeyToken). We do this to
prevent runtime conflicts with other Visual Studio extensions that may also be using a different version of this assembly. The script paths may need to be updated.
:: Strongly sign the LibGit2Sharp.dll, as VS Extensions want strongly signed assemblies and we want to avoid runtime version conflicts.
cd "$(SolutionDir)packages\LibGit2Sharp.0.23.1\lib\net40\"
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\ildasm.exe" /all / LibGit2Sharp.dll
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\sn.exe" -k MyLibGit2SharpKey.snk
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe" /dll /key=MyLibGit2SharpKey.snk
3. Replace the file at VS.DiffAllFiles\_LibGit2Sharp\LibGit2Sharp.dll with the new signed version.
4. Remove the LibGit2Sharp reference from all of the VS projects, and re-add it, pointing it to the new signed version.
5. Delete the VS.DiffAllFiles\_LibGit2Sharp\git2-*.dll file.
6. Copy the x86 version of the git2-*.dll file from the new LigGit2Sharp.NativeBinaries NuGet package to the VS.DiffAllFiles\_LibGit2Sharp directory.
e.g. "packages\LibGit2Sharp.NativeBinaries.1.0.164\runtimes\win7-x86\native\git2-a5cf255.dll"
7. Update the _LibGit2Sharp shortcut files in the other VS projects.
8. In the VSIX projects, change the _LibGit2Sharp\git2-*.dll properties to have Include In VSIX set to "True", and set the VSIX Sub Path to "\".
This will ensure that the git2-*.dll file required by LibGit2Sharp.dll is included in the root directory of the extension when it is installed.