Search code examples
gitvisual-studio-2015visual-studio-extensions

Use built in GIT Features of Visual Studio 2015 Extension


I am writing a small extension for our Team. In this extension I would like to use some of the built in features of Visual Studio 2015 with GIT. Currently I am using an external GIT.exe to make commands to GIT like --grep and then parse the console output. Is there a way to use the VS Built in GIT to make such calls in a easier way? The problem is that the GIT.exe has to be in the path for this, which made some troubles with my test users.


Solution

  • Is there a way to use the VS Built in GIT to make such calls in a easier way?

    the problem is that there is no built in Git in VisualStudio. There are using a library libgit2sharp which provide a C# api to manage a git repository.

    Sure you probably can use this library but I highly advise not doing it.

    If you need to use it, write your program using it. The library is provided as a nuget package.

    The problem is that the GIT.exe has to be in the path for this, which made some troubles with my test users.

    What is the problem... Visual Studio propose to install it when you use a git repository (message asking for installing third party tools) , no?