diff --git a/CI/build.LocalDev.msbuild b/CI/build.LocalDev.msbuild
new file mode 100644
index 000000000..574358bbb
--- /dev/null
+++ b/CI/build.LocalDev.msbuild
@@ -0,0 +1,58 @@
+
+
+ Debug
+ $(MSBuildProjectDirectory)\..
+ $(RootDir)\LibGit2Sharp.Tests\bin\$(Configuration)
+ $(RootDir)\Build
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LibGit2Sharp.LocalDev.sln b/LibGit2Sharp.LocalDev.sln
new file mode 100644
index 000000000..566bd984d
--- /dev/null
+++ b/LibGit2Sharp.LocalDev.sln
@@ -0,0 +1,56 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp.LocalDev", "LibGit2Sharp\LibGit2Sharp.LocalDev.csproj", "{91B31384-CCEB-4F0A-B0F4-F5913658CC4B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LibGit2Sharp.Tests.LocalDev", "LibGit2Sharp.Tests\LibGit2Sharp.Tests.LocalDev.csproj", "{7DFE89AD-BA3E-4012-A71B-BB860440BBEA}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19D079A4-A273-4630-B2D2-79EADE3E7CA1}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\packages.config = .nuget\packages.config
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {91B31384-CCEB-4F0A-B0F4-F5913658CC4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91B31384-CCEB-4F0A-B0F4-F5913658CC4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91B31384-CCEB-4F0A-B0F4-F5913658CC4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91B31384-CCEB-4F0A-B0F4-F5913658CC4B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7DFE89AD-BA3E-4012-A71B-BB860440BBEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7DFE89AD-BA3E-4012-A71B-BB860440BBEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7DFE89AD-BA3E-4012-A71B-BB860440BBEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7DFE89AD-BA3E-4012-A71B-BB860440BBEA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ Policies = $0
+ $0.TextStylePolicy = $1
+ $1.inheritsSet = null
+ $1.scope = text/x-csharp
+ $0.CSharpFormattingPolicy = $2
+ $2.IndentSwitchBody = True
+ $2.BeforeMethodCallParentheses = False
+ $2.BeforeMethodDeclarationParentheses = False
+ $2.BeforeConstructorDeclarationParentheses = False
+ $2.BeforeDelegateDeclarationParentheses = False
+ $2.NewParentheses = False
+ $2.inheritsSet = Mono
+ $2.inheritsScope = text/x-csharp
+ $2.scope = text/x-csharp
+ $0.StandardHeader = $3
+ $3.Text =
+ $3.inheritsSet = Apache2License
+ $0.TextStylePolicy = $4
+ $4.FileWidth = 120
+ $4.RemoveTrailingWhitespace = True
+ $4.inheritsSet = VisualStudio
+ $4.inheritsScope = text/plain
+ $4.scope = text/plain
+ EndGlobalSection
+EndGlobal
diff --git a/LibGit2Sharp.Tests/LibGit2Sharp.Tests.LocalDev.csproj b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.LocalDev.csproj
new file mode 100644
index 000000000..f44c2d063
--- /dev/null
+++ b/LibGit2Sharp.Tests/LibGit2Sharp.Tests.LocalDev.csproj
@@ -0,0 +1,170 @@
+
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {7DFE89AD-BA3E-4012-A71B-BB860440BBEA}
+ Library
+ Properties
+ LibGit2Sharp.Tests
+ LibGit2Sharp.Tests
+ v4.0
+ 512
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;NET40
+ prompt
+ 4
+ true
+ AnyCPU
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ true
+
+
+
+ ..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll
+
+
+
+
+
+ False
+ ..\packages\xunit.1.9.2\lib\net20\xunit.dll
+
+
+ ..\packages\xunit.extensions.1.9.2\lib\net20\xunit.extensions.dll
+
+
+
+
+ TestHelpers\Epoch.cs
+
+
+ TestHelpers\Platform.cs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {91B31384-CCEB-4F0A-B0F4-F5913658CC4B}
+ LibGit2Sharp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
diff --git a/LibGit2Sharp/LibGit2Sharp.LocalDev.csproj b/LibGit2Sharp/LibGit2Sharp.LocalDev.csproj
new file mode 100644
index 000000000..1d8a3b028
--- /dev/null
+++ b/LibGit2Sharp/LibGit2Sharp.LocalDev.csproj
@@ -0,0 +1,409 @@
+
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {91B31384-CCEB-4F0A-B0F4-F5913658CC4B}
+ Library
+ Properties
+ LibGit2Sharp
+ LibGit2Sharp
+ v4.0
+ 512
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG;NET40
+ prompt
+ 4
+ false
+ true
+ AllRules.ruleset
+ bin\Debug\LibGit2Sharp.xml
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ true
+ false
+ bin\Release\LibGit2Sharp.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/LocalDev/LibGit2Sharp.NativeBinaries.props b/LocalDev/LibGit2Sharp.NativeBinaries.props
new file mode 100644
index 000000000..a3a72a10d
--- /dev/null
+++ b/LocalDev/LibGit2Sharp.NativeBinaries.props
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+ NativeBinaries\amd64\git2-localdev.dll
+ PreserveNewest
+
+
+ NativeBinaries\amd64\git2-localdev.pdb
+ PreserveNewest
+
+
+ NativeBinaries\x86\git2-localdev.dll
+ PreserveNewest
+
+
+ NativeBinaries\x86\git2-localdev.pdb
+ PreserveNewest
+
+
+
+ LibGit2Sharp.dll.config
+ PreserveNewest
+
+
+
diff --git a/LocalDev/LibGit2Sharp.dll.config b/LocalDev/LibGit2Sharp.dll.config
new file mode 100644
index 000000000..eac41404d
--- /dev/null
+++ b/LocalDev/LibGit2Sharp.dll.config
@@ -0,0 +1,3 @@
+
+
+
diff --git a/LocalDev/README.txt b/LocalDev/README.txt
new file mode 100644
index 000000000..d457dd019
--- /dev/null
+++ b/LocalDev/README.txt
@@ -0,0 +1,78 @@
+This file describes how to build and test LibGit2Sharp using a locally
+build version of LibGit2 (rather than a NuGet-based version). The goal
+is to facilitate development and debugging across all 3 layers of a
+LibGit2Sharp-based application.
+
+In order to minimize the changes to LibGit2Sharp, I've created stub
+files and some slightly modified versions of the msbuild files (*.sln,
+*.csproj, and *.msbuild) to maintain the same basic build structure
+of LibGit2Sharp. The new .csproj files import the .props file in this
+directory rather than importing the file from the NuGet package.
+(In "https://msdn.microsoft.com/en-us/library/92x05xfs.aspx" it is
+stated that does support conditionals, but that they only work
+from the command line, not from Visual Studio. So I copied the .csproj
+files rather than include both imports with conditionals. This also
+keeps the LocalDev stuff out of the main/official build scripts.)
+
+LibGit2 DLL/PDB files are copied over from the local peer repo and
+named "git2-localdev" rather than using a hash value.
+
+################################################################
+#### To work using the LocalDev scripts.
+#### [1] Clone both repos as peers and checkout whatever commit you need.
+
+> cd
+> git clone https://github.com/libgit2/libgit2.git libgit2
+> git clone https://github.com/libgit2/libgit2sharp.git libgit2sharp
+
+#### [2] Build 32-bit and/or 64-bit debug version of LibGit2 into
+#### libgit2/build and libgit2/build64. You only need to build
+#### the bitness that you need, but we support both.
+#### TODO add build64 to the libgit2/.gitignores.
+
+> cd libgit2
+> mkdir build
+> cd build
+> cmake -G "Visual Studio 14 2015" -DSTDCALL=ON ..
+> msbuild /m libgit2.sln
+
+> cd ..
+> mkdir build64
+> cd build64
+> cmake -G "Visual Studio 14 2015 Win64" -DSTDCALL=ON ..
+> msbuild /m libgit2.sln
+
+#### [3] Build LibGit2Sharp and run the unit tests using the above
+#### local version of LibGit2.
+
+> build.libgit2sharp.LocalDev.cmd
+
+################################################################
+#### Notes.
+#### [1] The .cmd will run NuGet on the .sln to fetch all required packages.
+#### Per https://docs.nuget.org/consume/command-line-reference
+#### (1.1) The .sln explicitly causes .\nuget\packages.config to be loaded.
+#### (1.2) And $(ProjectDir)\packages.config is loaded for each project
+#### referenced by the .sln.
+#### (1.2.1) LibGit2Sharp\packages.config
+#### (1.2.2) LibGit2Sharp.Tests\packages.config
+####
+#### TODO 1.2.1 causes the LibGit2Sharp.NativeBinaries package to be
+#### downloaded. However, we do not need/use it for developer mode.
+#### See if NuGet has a conditional syntax to make this clear.
+####
+#### [2] The .cmd uses a variant of the CI build script to build LibGit2Sharp
+#### and run the unit tests.
+#### (2.1) I'm forcing Debug mode on LibGit2Sharp, since that's the whole
+#### point of this exercise.
+#### (2.2) The build process will copy the locally-built 32/64-bit debug
+#### DLL and PDB files from the peer LibGit2 during test runs.
+####
+#### ./LibGit2Sharp/bin/Debug/LibGit2Sharp.{dll,pdb}
+#### ./LibGit2Sharp/bin/Debug/NativeBinaries/{amd64,x86}/git2-localdev.{dll,pdb}
+####
+#### ./LibGit2Sharp.Tests/bin/Debug/LibGit2Sharp.Tests.{dll,pdb}
+#### ./LibGit2Sharp.Tests/bin/Debug/NativeBinaries/{amd64,x86}/git2-localdev.{dll,pdb}
+####
+#### [3] Here's a reference for running the unit tests as a 64-bit process:
+#### https://msdn.microsoft.com/en-us/library/ee782531.aspx
diff --git a/LocalDev/libgit2_filename.txt b/LocalDev/libgit2_filename.txt
new file mode 100644
index 000000000..f8f149e92
--- /dev/null
+++ b/LocalDev/libgit2_filename.txt
@@ -0,0 +1 @@
+git2-localdev
diff --git a/LocalDev/libgit2_hash.txt b/LocalDev/libgit2_hash.txt
new file mode 100644
index 000000000..d9643cbbe
--- /dev/null
+++ b/LocalDev/libgit2_hash.txt
@@ -0,0 +1 @@
+localdev
diff --git a/build.libgit2sharp.LocalDev.cmd b/build.libgit2sharp.LocalDev.cmd
new file mode 100644
index 000000000..130795338
--- /dev/null
+++ b/build.libgit2sharp.LocalDev.cmd
@@ -0,0 +1,32 @@
+@ECHO OFF
+
+REM This is the "LocalDev" version of the build scripts. It references
+REM locally-built versions of LibGit2. (The normal scripts use a LibGit2
+REM NuGet package.)
+REM
+REM See .\LocalDev\README.txt for full details.
+REM
+REM Command line usage is identical to the normal script. See it for details.
+
+
+SETLOCAL
+
+SET BASEDIR=%~dp0
+SET FrameworkVersion=v4.0.30319
+SET FrameworkDir=%SystemRoot%\Microsoft.NET\Framework
+
+if exist "%SystemRoot%\Microsoft.NET\Framework64" (
+ SET FrameworkDir=%SystemRoot%\Microsoft.NET\Framework64
+)
+
+ECHO ON
+
+SET CommitSha=%~1
+SET ExtraDefine=%~2
+
+"%BASEDIR%Lib/NuGet/NuGet.exe" restore "%BASEDIR%LibGit2Sharp.sln"
+"%FrameworkDir%\%FrameworkVersion%\msbuild.exe" "%BASEDIR%CI\build.LocalDev.msbuild" /property:CommitSha=%CommitSha% /property:ExtraDefine="%ExtraDefine%" /property:Configuration=Debug
+
+ENDLOCAL
+
+EXIT /B %ERRORLEVEL%