diff --git a/src/Core/ServiceWrapper_dotNET4/Main.cs b/src/Core/ServiceWrapper_dotNET4/Main.cs
new file mode 100644
index 0000000..f7b80bf
--- /dev/null
+++ b/src/Core/ServiceWrapper_dotNET4/Main.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace winsw.dotNET4
+{
+ ///
+ /// Just a wrapper class, which redirects the Main entry point to the WinSW main method.
+ ///
+ public class dotNET4Support
+ {
+ public static int Main(string[] args)
+ {
+ return winsw.WrapperService.Main(args);
+ }
+ }
+}
diff --git a/src/Core/ServiceWrapper_dotNET4/Properties/AssemblyInfo.cs b/src/Core/ServiceWrapper_dotNET4/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..700ae0a
--- /dev/null
+++ b/src/Core/ServiceWrapper_dotNET4/Properties/AssemblyInfo.cs
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Windows Service Wrapper for .NET4")]
+[assembly: AssemblyDescription("Allows arbitrary process to run as a Windows service by wrapping it")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("CloudBees, Inc.")]
+[assembly: AssemblyProduct("Windows Service Wrapper")]
+[assembly: AssemblyCopyright("Copyright 2008-2016 Oleg Nenashev, CloudBees, Inc. and other contributors")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("59ce18df-cacb-4360-bb80-798bd6459ca3")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.0.*")]
+[assembly: AssemblyFileVersion("2.0.*")]
diff --git a/src/Core/ServiceWrapper_dotNET4/packages.config b/src/Core/ServiceWrapper_dotNET4/packages.config
new file mode 100644
index 0000000..c8fd6c4
--- /dev/null
+++ b/src/Core/ServiceWrapper_dotNET4/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/Core/ServiceWrapper_dotNET4/winsw_dotNET4.csproj b/src/Core/ServiceWrapper_dotNET4/winsw_dotNET4.csproj
new file mode 100644
index 0000000..378b024
--- /dev/null
+++ b/src/Core/ServiceWrapper_dotNET4/winsw_dotNET4.csproj
@@ -0,0 +1,183 @@
+
+
+
+ Debug
+ AnyCPU
+ 9.0.21022
+ 2.0
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}
+ Exe
+ Properties
+ winsw.dotNET4
+ WindowsService_dotNET4
+ v4.0
+ 512
+
+
+ false
+ true
+ $(SolutionDir)..\winsw_key.snk
+
+
+
+
+ 3.5
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.%2a
+ false
+ false
+ true
+ ..\..\
+ true
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ TRACE;DEBUG
+ prompt
+ 4
+ true
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ true
+
+
+
+
+
+ ..\..\packages\log4net.2.0.3\lib\net20-full\log4net.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+ Designer
+
+
+
+
+
+ False
+ .NET Framework 3.5 SP1 Client Profile
+ false
+
+
+ False
+ .NET Framework 3.5 SP1
+ true
+
+
+
+
+ {57284b7a-82a4-407a-b706-ebea6bf8ea13}
+ RunawayProcessKiller
+
+
+ {ca5c71db-c5a8-4c27-bf83-8e6daed9d6b5}
+ SharedDirectoryMapper
+
+
+ {0de77f55-ade5-43c1-999a-0bc81153b039}
+ winsw
+
+
+ {9d0c63e2-b6ff-4a85-bd36-b3e5d7f27d06}
+ WinSWCore
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(OutDir)winsw.exe
+ $(AssemblyOriginatorKeyFile)
+
+
+
+ $(OutputPath)sn-path.txt
+
+
+
+
+
+
+
+
+
+
+
+ $([System.Text.RegularExpressions.Regex]::Replace('$(SNPath)', ';.*', ''))
+
+
+
+
+
+ $(SolutionDir)packages\ilmerge.2.14.1208\tools
+ $(OutputPath)winsw_cert.pub
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/winsw.sln b/src/winsw.sln
index 6880679..f3ef241 100644
--- a/src/winsw.sln
+++ b/src/winsw.sln
@@ -31,6 +31,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".build", ".build", "{D88064
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RunawayProcessKiller", "Plugins\RunawayProcessKiller\RunawayProcessKiller.csproj", "{57284B7A-82A4-407A-B706-EBEA6BF8EA13}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "winsw_dotNET4", "Core\ServiceWrapper_dotNET4\winsw_dotNET4.csproj", "{419AEEA7-E7DE-4A76-B001-76DB5F98C838}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -99,6 +101,16 @@ Global
{57284B7A-82A4-407A-B706-EBEA6BF8EA13}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{57284B7A-82A4-407A-B706-EBEA6BF8EA13}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{57284B7A-82A4-407A-B706-EBEA6BF8EA13}.Release|Win32.ActiveCfg = Release|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Debug|Win32.ActiveCfg = Debug|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Release|Any CPU.Build.0 = Release|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838}.Release|Win32.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -109,5 +121,6 @@ Global
{CA5C71DB-C5A8-4C27-BF83-8E6DAED9D6B5} = {BC4AD891-E87E-4F30-867C-FD8084A29E5D}
{9D0C63E2-B6FF-4A85-BD36-B3E5D7F27D06} = {5297623A-1A95-4F89-9AAE-DA634081EC86}
{57284B7A-82A4-407A-B706-EBEA6BF8EA13} = {BC4AD891-E87E-4F30-867C-FD8084A29E5D}
+ {419AEEA7-E7DE-4A76-B001-76DB5F98C838} = {5297623A-1A95-4F89-9AAE-DA634081EC86}
EndGlobalSection
EndGlobal