diff --git a/openrct2.sln b/openrct2.sln
index a9f6803221..37c5ec1170 100644
--- a/openrct2.sln
+++ b/openrct2.sln
@@ -7,6 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "openrct2", "openrct2.vcxpro
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testpaint", "test\testpaint\testpaint.vcxproj", "{57E60BA1-FB76-4316-909E-C1449C142327}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tests", "test\tests\tests.vcxproj", "{62B020FA-E4FB-4C6E-B32A-DC999470F155}"
+ ProjectSection(ProjectDependencies) = postProject
+ {D24D94F6-2A74-480C-B512-629C306CE92F} = {D24D94F6-2A74-480C-B512-629C306CE92F}
+ EndProjectSection
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2202A816-377D-4FA0-A7AF-7D4105F8A4FB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{480B577D-4E4A-4757-9A42-28A9AD33E6B0}"
@@ -33,6 +38,14 @@ Global
{57E60BA1-FB76-4316-909E-C1449C142327}.Release|Win32.ActiveCfg = Release|Win32
{57E60BA1-FB76-4316-909E-C1449C142327}.Release|Win32.Build.0 = Release|Win32
{57E60BA1-FB76-4316-909E-C1449C142327}.Release|x64.ActiveCfg = Release|Win32
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.ActiveCfg = Debug|Win32
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|Win32.Build.0 = Debug|Win32
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.ActiveCfg = Debug|x64
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Debug|x64.Build.0 = Debug|x64
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.ActiveCfg = Release|Win32
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|Win32.Build.0 = Release|Win32
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.ActiveCfg = Release|x64
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -40,5 +53,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{D24D94F6-2A74-480C-B512-629C306CE92F} = {2202A816-377D-4FA0-A7AF-7D4105F8A4FB}
{57E60BA1-FB76-4316-909E-C1449C142327} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0}
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155} = {480B577D-4E4A-4757-9A42-28A9AD33E6B0}
EndGlobalSection
EndGlobal
diff --git a/openrct2.vcxproj b/openrct2.vcxproj
index 2e3bfde9eb..202974fbd1 100644
--- a/openrct2.vcxproj
+++ b/openrct2.vcxproj
@@ -563,6 +563,9 @@
true
MultiByte
+
+ StaticLibrary
+
@@ -600,9 +603,10 @@
$(SolutionDir)obj\$(ProjectName)\$(Configuration)_$(Platform)\
$(ProjectName)
-
+
- USE_BREAKPAD;%(PreprocessorDefinitions)
+ USE_BREAKPAD;%(PreprocessorDefinitions)
+ __NOENTRYPOINT__;%(PreprocessorDefinitions)
diff --git a/src/platform/windows.c b/src/platform/windows.c
index bdeb7abd57..8fda6936cd 100644
--- a/src/platform/windows.c
+++ b/src/platform/windows.c
@@ -52,7 +52,7 @@ utf8 **windows_get_command_line_args(int *outNumArgs);
static HMODULE _dllModule = NULL;
-#ifdef NO_RCT2
+#if defined(NO_RCT2) && !defined(__NOENTRYPOINT__)
/**
* Windows entry point to OpenRCT2 without a console window.
diff --git a/test/tests/sawyercoding_test.cpp b/test/tests/sawyercoding_test.cpp
index 2dce17f261..c7105416c5 100644
--- a/test/tests/sawyercoding_test.cpp
+++ b/test/tests/sawyercoding_test.cpp
@@ -1,3 +1,6 @@
+// Make MSVC shut up about M_PI
+#include
+
extern "C" {
#include "util/sawyercoding.h"
}
diff --git a/test/tests/tests.cpp b/test/tests/tests.cpp
new file mode 100644
index 0000000000..bba7cb7be3
--- /dev/null
+++ b/test/tests/tests.cpp
@@ -0,0 +1,13 @@
+// This serves as the entry point when building for MSVC which compiles gtest
+// directly into the test binary.
+#ifdef _MSC_VER
+
+#include
+
+int main(int argc, char * * argv)
+{
+ testing::InitGoogleTest(&argc, argv);
+ RUN_ALL_TESTS();
+}
+
+#endif
diff --git a/test/tests/tests.vcxproj b/test/tests/tests.vcxproj
new file mode 100644
index 0000000000..01c1504b55
--- /dev/null
+++ b/test/tests/tests.vcxproj
@@ -0,0 +1,101 @@
+
+
+
+ ..\..\
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ {62B020FA-E4FB-4C6E-B32A-DC999470F155}
+ tests
+
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+ $(SolutionDir)bin\tests\
+ $(SolutionDir)obj\$(ProjectName)\$(Configuration)\
+ tests
+ $(GTestDir)\googletest;$(GTestDir)\googletest\include;$(SolutionDir)src;$(SolutionDir)lib\include;$(SolutionDir)lib\include\breakpad;$(SolutionDir)lib\include\libspeex;$(SolutionDir)lib\include\sdl;$(SolutionDir)lib\include\jansson;$(SolutionDir)lib\include\sdl_ttf;$(SolutionDir)lib\include\libpng;$(SolutionDir)lib\include\zlib;$(IncludePath)
+ $(SolutionDir)bin;$(SolutionDir)lib;$(LibraryPath)
+
+
+
+ Level3
+ Disabled
+ true
+ DEBUG;OPENGL_NO_LINK;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
+ MultiThreaded
+ true
+ true
+ 4200
+ true
+ false
+
+
+ openrct2.lib;openrct2-libs-vs2015-x64.lib;imm32.lib;version.lib;winmm.lib;crypt32.lib;%(AdditionalDependencies)
+ /OPT:NOLBR /ignore:4099 %(AdditionalOptions)
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ true
+ DEBUG;OPENGL_NO_LINK;_CRT_SECURE_NO_WARNINGS;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
+ true
+ 4200
+ true
+
+
+ true
+ true
+ openrct2.lib;%(AdditionalDependencies)
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file