diff --git a/.gitignore b/.gitignore
index b42ce61a4..7dfad2df8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,8 +9,6 @@ Coverage
 library/polarssl.info
 
 # MSVC files generated by CMake:
-*.sln
-*.vcxproj
 *.filters
 
 # MSVC build artifacts:
diff --git a/include/.gitignore b/include/.gitignore
index f3c7a7c5d..feab4e235 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -1 +1,3 @@
 Makefile
+*.sln
+*.vcxproj
diff --git a/library/.gitignore b/library/.gitignore
index 872219be4..39d257a11 100644
--- a/library/.gitignore
+++ b/library/.gitignore
@@ -1,3 +1,5 @@
 *.o
 libpolarssl*
 libmbedtls.*
+*.sln
+*.vcxproj
diff --git a/programs/.gitignore b/programs/.gitignore
index a47ef0662..ae8617f1c 100644
--- a/programs/.gitignore
+++ b/programs/.gitignore
@@ -1,4 +1,7 @@
 */Makefile
+*.sln
+*.vcxproj
+
 aes/aescrypt2
 aes/crypt_and_hash
 hash/generic_sum
diff --git a/tests/.gitignore b/tests/.gitignore
index 6590f0fca..3c9b0cf25 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,3 +1,6 @@
+*.sln
+*.vcxproj
+
 *.log
 /test_suite*
 data_files/mpi_write