diff --git a/.gitignore b/.gitignore
index fc9d4c04dc..582853f6b7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -186,42 +186,6 @@
/gitweb/static/gitweb.js
/gitweb/static/gitweb.min.*
/command-list.h
-/libgit
-/test-chmtime
-/test-ctype
-/test-config
-/test-date
-/test-delta
-/test-dump-cache-tree
-/test-dump-split-index
-/test-dump-untracked-cache
-/test-fake-ssh
-/test-scrap-cache-tree
-/test-genrandom
-/test-hashmap
-/test-index-version
-/test-line-buffer
-/test-match-trees
-/test-mergesort
-/test-mktemp
-/test-parse-options
-/test-path-utils
-/test-prio-queue
-/test-read-cache
-/test-regex
-/test-revision-walking
-/test-run-command
-/test-sha1
-/test-sha1-array
-/test-sigchain
-/test-string-list
-/test-submodule-config
-/test-subprocess
-/test-svn-fe
-/test-urlmatch-normalization
-/test-wildmatch
-/vcs-svn_lib
-/xdiff_lib
*.tar.gz
*.dsc
*.deb
diff --git a/contrib/buildsystems/Generators/Vcxproj.pm b/contrib/buildsystems/Generators/Vcxproj.pm
index 00ef26fddd..4b02524b10 100644
--- a/contrib/buildsystems/Generators/Vcxproj.pm
+++ b/contrib/buildsystems/Generators/Vcxproj.pm
@@ -228,7 +228,7 @@ EOM
print F << "EOM";
EOM
- if (!$static_library || $target =~ 'vcs-svn') {
+ if (!$static_library || $target =~ 'vcs-svn' || $target =~ 'xdiff') {
my $uuid_libgit = $$build_structure{"LIBS_libgit_GUID"};
my $uuid_xdiff_lib = $$build_structure{"LIBS_xdiff/lib_GUID"};
@@ -238,11 +238,15 @@ EOM
$uuid_libgit
false
+EOM
+ if (!($name =~ 'xdiff')) {
+ print F << "EOM";
$uuid_xdiff_lib
false
EOM
+ }
if ($name =~ /(test-(line-buffer|svn-fe)|^git-remote-testsvn)\.exe$/) {
my $uuid_vcs_svn_lib = $$build_structure{"LIBS_vcs-svn/lib_GUID"};
print F << "EOM";