diff --git a/win/win32/.gitignore b/win/win32/.gitignore
index e4eff42d6..3f210da5d 100644
--- a/win/win32/.gitignore
+++ b/win/win32/.gitignore
@@ -6,3 +6,4 @@ record
*.user
*.opendb
*.log
+*.aps
diff --git a/win/win32/nethack.rc b/win/win32/nethack.rc
index 0877532d2..72ce4e0df 100644
--- a/win/win32/nethack.rc
+++ b/win/win32/nethack.rc
@@ -1,6 +1,48 @@
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
-#include "resource.h"
+#include "nhresource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "nhresource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
/////////////////////////////////////////////////////////////////////////////
//
@@ -9,6 +51,57 @@
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_NETHACKW ICON DISCARDABLE "NETHACK.ICO"
+IDI_ICON1 ICON "nethack.ico"
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 3,6,1,0
+ PRODUCTVERSION 3,6,1,0
+ FILEFLAGSMASK 0x1fL
+#ifdef _DEBUG
+ FILEFLAGS 0x9L
+#else
+ FILEFLAGS 0x8L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "NetHack for Windows - TTY Interface"
+ VALUE "FileVersion", "3.6.1"
+ VALUE "InternalName", "NetHack"
+ VALUE "LegalCopyright", "Copyright (C) 1985 - 2017. By Stichting Mathematisch Centrum and M. Stephenson. See license for details."
+ VALUE "OriginalFilename", "NetHack.exe"
+ VALUE "ProductName", "NetHack"
+ VALUE "ProductVersion", "3.6.1"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
diff --git a/win/win32/nhresource.h b/win/win32/nhresource.h
new file mode 100644
index 000000000..119608c0d
--- /dev/null
+++ b/win/win32/nhresource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by NetHack.rc
+//
+#define IDI_ICON1 101
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/win/win32/vs2015/NetHack.sln b/win/win32/vs2015/NetHack.sln
index 63617e5f0..2c2e78230 100755
--- a/win/win32/vs2015/NetHack.sln
+++ b/win/win32/vs2015/NetHack.sln
@@ -160,10 +160,12 @@ Global
{63F9B82B-F589-4082-ABE5-D4F0682050AB}.Release|x64.Build.0 = Release|x64
{609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|Win32.ActiveCfg = Debug|Win32
{609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|Win32.Build.0 = Debug|Win32
- {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.ActiveCfg = Debug|Win32
+ {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.ActiveCfg = Debug|x64
+ {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.Build.0 = Debug|x64
{609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|Win32.ActiveCfg = Release|Win32
{609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|Win32.Build.0 = Release|Win32
- {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.ActiveCfg = Release|Win32
+ {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.ActiveCfg = Release|x64
+ {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.Build.0 = Release|x64
{6813477F-64B6-4B97-B230-438D0D233385}.Debug|Win32.ActiveCfg = Debug|Win32
{6813477F-64B6-4B97-B230-438D0D233385}.Debug|Win32.Build.0 = Debug|Win32
{6813477F-64B6-4B97-B230-438D0D233385}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/win/win32/vs2015/NetHack.vcxproj b/win/win32/vs2015/NetHack.vcxproj
index 306f74ae7..3c0ce9911 100755
--- a/win/win32/vs2015/NetHack.vcxproj
+++ b/win/win32/vs2015/NetHack.vcxproj
@@ -13,11 +13,9 @@
-
$(BinDir)
-
/Gs /Oi- %(AdditionalOptions)
@@ -214,9 +212,13 @@
+
-
+
+
+
+
diff --git a/win/win32/vs2015/build.bat b/win/win32/vs2015/build.bat
index 512b4f22d..c2798cf1b 100644
--- a/win/win32/vs2015/build.bat
+++ b/win/win32/vs2015/build.bat
@@ -1,4 +1,4 @@
-msbuild NetHack.sln /t:Build /p:Configuration=Debug;Platform=Win32
-msbuild NetHack.sln /t:Build /p:Configuration=Debug;Platform=x64
-msbuild NetHack.sln /t:Build /p:Configuration=Release;Platform=Win32
-msbuild NetHack.sln /t:Build /p:Configuration=Release;Platform=x64
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=Win32
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Debug;Platform=x64
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=Win32
+msbuild NetHack.sln /t:Clean;Build /p:Configuration=Release;Platform=x64
diff --git a/win/win32/vs2015/nh340key.vcxproj b/win/win32/vs2015/nh340key.vcxproj
index 7b5c06a4f..8b2068662 100644
--- a/win/win32/vs2015/nh340key.vcxproj
+++ b/win/win32/vs2015/nh340key.vcxproj
@@ -21,12 +21,14 @@
$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)
-
$(ToolsDir)$(TargetName).lib
+
+
+ nh340key.def
+
+
diff --git a/win/win32/vs2015/nhdefkey.vcxproj b/win/win32/vs2015/nhdefkey.vcxproj
index 3b0c0f675..84fdf2fd3 100755
--- a/win/win32/vs2015/nhdefkey.vcxproj
+++ b/win/win32/vs2015/nhdefkey.vcxproj
@@ -21,9 +21,6 @@
$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)
-
$(ToolsDir)$(TargetName).lib
diff --git a/win/win32/vs2015/nhraykey.vcxproj b/win/win32/vs2015/nhraykey.vcxproj
index f2e7890b6..0017f4a49 100644
--- a/win/win32/vs2015/nhraykey.vcxproj
+++ b/win/win32/vs2015/nhraykey.vcxproj
@@ -21,12 +21,14 @@
$(IncDir);$(SysWinntDir);%(AdditionalIncludeDirectories)
-
$(ToolsDir)$(TargetName).lib
+
+
+ nhraykey.def
+
+