diff --git a/.gitignore b/.gitignore
index efc8375b2cdcbcfb6770613c9aea03b2e63f3e51..e4fc440bfbecdf10aa52ac7c5d1d40cfd77654c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,9 @@ libtool
 *.1
 *-glue.h
 
+# Ignored folders
+build-local/
+
 # Ignore rendered docs
 doc/doxygen/core-doc
 doc/doxygen/gtk-gui-doc
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21166b7f615c78bddeb8595f3ee9ca11e0c2ddbb..b492285d68d1671b21dc99879390d9f4fe3e4682 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,9 +6,9 @@ project(ring-daemon C CXX)
 # Source groups
 ################################################################################
 
-# MSVC, src source group
+# compat, src source group
 
-add_subdirectory("MSVC")
+add_subdirectory("compat")
 add_subdirectory("src")
 
 source_group("Source Files" FILES ${Source_Files})
@@ -100,7 +100,7 @@ if(MSVC)
    ################################################################################
    if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
        set_target_properties(${PROJECT_NAME} PROPERTIES
-           OUTPUT_DIRECTORY_RELEASELIB_WIN32 "${CMAKE_CURRENT_SOURCE_DIR}/MSVC/${CMAKE_VS_PLATFORM_NAME}/$<CONFIG>/bin/"
+           OUTPUT_DIRECTORY_RELEASELIB_WIN32 "${CMAKE_CURRENT_SOURCE_DIR}/build-local/${CMAKE_VS_PLATFORM_NAME}/$<CONFIG>/bin/"
        )
    endif()
    if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
@@ -125,7 +125,6 @@ if(MSVC)
                "${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/natpmp"
            ">"
            "${CMAKE_CURRENT_SOURCE_DIR}/.;"
-           "${CMAKE_CURRENT_SOURCE_DIR}/MSVC;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/client;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/config;"
@@ -136,6 +135,7 @@ if(MSVC)
            "${CMAKE_CURRENT_SOURCE_DIR}/src/jamidht;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/security;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/sip;"
+           "${CMAKE_CURRENT_SOURCE_DIR}/compat/msvc;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/upnp;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/upnp/igd;"
            "${CMAKE_CURRENT_SOURCE_DIR}/src/upnp/protocol;"
diff --git a/MSVC/.gitignore b/MSVC/.gitignore
deleted file mode 100644
index 9f5069da6dc8c483b57f00c4b0f9fdbcce58380a..0000000000000000000000000000000000000000
--- a/MSVC/.gitignore
+++ /dev/null
@@ -1,247 +0,0 @@
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-
-#output directories
-DebugLib/
-Debug/
-ReleaseLib/
-Release/
-.config/
-# User-specific files
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-*.VC.VC.opendb
-*.VC.db
-*.db
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-x64/
-x86/
-bld/
-[Bb]in/
-[Oo]bj/
-
-# Visual Studio 2015 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUNIT
-*.VisualState.xml
-TestResult.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# DNX
-project.lock.json
-artifacts/
-
-*_i.c
-*_p.c
-*_i.h
-*.ilk
-*.meta
-*.obj
-*.pch
-*.pdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# JustCode is a .NET coding add-in
-.JustCode
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# NuGet Packages
-*.nupkg
-# The packages folder can be ignored because of Package Restore
-**/packages/*
-# except build/, which is used as an MSBuild target.
-!**/packages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
-# NuGet v3's project.json files produces more ignoreable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Microsoft Azure ApplicationInsights config file
-ApplicationInsights.config
-
-# Windows Store app package directory
-AppPackages/
-BundleArtifacts/
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.pfx
-*.publishsettings
-node_modules/
-orleans.codegen.cs
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-
-# SQL Server files
-*.mdf
-*.ldf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-
-# FAKE - F# Make
-.fake/
-
-!config.h
\ No newline at end of file
diff --git a/compat/CMakeLists.txt b/compat/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e2cb2b4a85d5d37668d984a3866ae7006ed21758
--- /dev/null
+++ b/compat/CMakeLists.txt
@@ -0,0 +1,7 @@
+################################################################################
+# Source groups - compat
+################################################################################
+
+add_subdirectory(msvc)
+
+set (Source_Files ${Source_Files} PARENT_SCOPE)
\ No newline at end of file
diff --git a/MSVC/CMakeLists.txt b/compat/msvc/CMakeLists.txt
similarity index 94%
rename from MSVC/CMakeLists.txt
rename to compat/msvc/CMakeLists.txt
index 1a74044d4950657d7b544a9fc62835ace3ed4dc0..5ee1e72ad300bbca030bfda4a48c056cd4e1e721 100644
--- a/MSVC/CMakeLists.txt
+++ b/compat/msvc/CMakeLists.txt
@@ -1,6 +1,7 @@
 ################################################################################
-# Source groups - MSVC
+# Source groups - msvc
 ################################################################################
+
 if(MSVC)
    list (APPEND Source_Files
          "${CMAKE_CURRENT_SOURCE_DIR}/config.h"
diff --git a/MSVC/config.h b/compat/msvc/config.h
similarity index 100%
rename from MSVC/config.h
rename to compat/msvc/config.h
diff --git a/MSVC/dlfcn.c b/compat/msvc/dlfcn.c
similarity index 100%
rename from MSVC/dlfcn.c
rename to compat/msvc/dlfcn.c
diff --git a/MSVC/dlfcn.h b/compat/msvc/dlfcn.h
similarity index 100%
rename from MSVC/dlfcn.h
rename to compat/msvc/dlfcn.h
diff --git a/MSVC/package.json b/compat/msvc/package.json
similarity index 95%
rename from MSVC/package.json
rename to compat/msvc/package.json
index 851eeba1fe6680edf6e6a37d499cdf8a85aa8c55..591abff160ffb376a0f701bd9346bb43e89dc4fa 100644
--- a/MSVC/package.json
+++ b/compat/msvc/package.json
@@ -1,16 +1,16 @@
-{
-    "name": "daemon",
-    "deps": [
-        "asio",
-        "ffmpeg",
-        "natpmp",
-        "opendht",
-        "pjproject",
-        "portaudio",
-        "secp256k1",
-        "upnp",
-        "yaml-cpp"
-    ],
-    "configuration": "ReleaseLib_win32",
-    "project_paths": ["ring-daemon.vcxproj"]
+{
+    "name": "daemon",
+    "deps": [
+        "asio",
+        "ffmpeg",
+        "natpmp",
+        "opendht",
+        "pjproject",
+        "portaudio",
+        "secp256k1",
+        "upnp",
+        "yaml-cpp"
+    ],
+    "configuration": "ReleaseLib_win32",
+    "project_paths": ["ring-daemon.vcxproj"]
 }
\ No newline at end of file
diff --git a/MSVC/sys_time.h b/compat/msvc/sys_time.h
similarity index 100%
rename from MSVC/sys_time.h
rename to compat/msvc/sys_time.h
diff --git a/MSVC/unistd.h b/compat/msvc/unistd.h
similarity index 100%
rename from MSVC/unistd.h
rename to compat/msvc/unistd.h
diff --git a/MSVC/winmake.py b/compat/msvc/winmake.py
similarity index 99%
rename from MSVC/winmake.py
rename to compat/msvc/winmake.py
index d76c6dbd49a1d464c29204db19b89de29d4a5800..5364e31063bcd1178107a1b96f92698162f4e837 100644
--- a/MSVC/winmake.py
+++ b/compat/msvc/winmake.py
@@ -25,7 +25,8 @@ log = None
 
 # project paths
 daemon_msvc_dir = os.path.dirname(os.path.realpath(__file__))
-daemon_dir = os.path.dirname(daemon_msvc_dir)
+daemon_dir = os.path.dirname(os.path.dirname(daemon_msvc_dir))
+daemon_msvc_build_local_dir = daemon_dir + r'\build-local'
 contrib_src_dir = daemon_dir + r'\contrib\src'
 contrib_build_dir = daemon_dir + r'\contrib\build'
 contrib_tmp_dir = daemon_dir + r'\contrib\tarballs'
@@ -126,7 +127,7 @@ def getVSEnvCmd(arch='x64', platform='', version=''):
 
 
 def make_daemon(pkg_info, force, sdk_version, toolset):
-    cmake_script = 'cmake -DCMAKE_CONFIGURATION_TYPES="ReleaseLib_win32" -DCMAKE_VS_PLATFORM_NAME="x64" -G ' + getCMakeGenerator(getLatestVSVersion()) + ' -T $(DefaultPlatformToolset) ..'
+    cmake_script = 'cmake -DCMAKE_CONFIGURATION_TYPES="ReleaseLib_win32" -DCMAKE_VS_PLATFORM_NAME="x64" -G ' + getCMakeGenerator(getLatestVSVersion()) + ' -T $(DefaultPlatformToolset) -S ../../ -B ../../build-local'
     root_logger.warning("Cmake generating vcxproj files")
     result = getSHrunner().exec_batch(cmake_script)
     if result[0] is not 0:
@@ -138,7 +139,7 @@ def make_daemon(pkg_info, force, sdk_version, toolset):
         "Building daemon with preferred sdk version %s and toolset %s", sdk_version, toolset)
     env_set = 'false' if pkg_info.get('with_env', '') == '' else 'true'
     sdk_to_use = sdk_version if env_set == 'false' else pkg_info.get('with_env', '')
-    build('daemon', daemon_msvc_dir,
+    build('daemon', daemon_msvc_build_local_dir,
           pkg_info.get('project_paths', []),
           pkg_info.get('custom_scripts', {}),
           env_set,