diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..1d72e68
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,37 @@
+# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
+#
+# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig
+# then update all of the repos.
+
+root = true
+
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.{cs,vb}]
+dotnet_sort_system_directives_first = true
+
+[*.cs]
+csharp_indent_case_contents = true : error
+csharp_indent_switch_labels = true : error
+csharp_new_line_before_open_brace = all
+csharp_prefer_braces = true : error
+csharp_style_expression_bodied_methods = when_on_single_line : suggestion
+csharp_style_expression_bodied_constructors = when_on_single_line : suggestion
+csharp_style_expression_bodied_operators = when_on_single_line : suggestion
+csharp_style_expression_bodied_properties = when_on_single_line : suggestion
+csharp_style_expression_bodied_indexers = when_on_single_line : suggestion
+csharp_style_expression_bodied_accessors = when_on_single_line : suggestion
+csharp_style_var_elsewhere = true : suggestion
+csharp_style_var_for_built_in_types = true : suggestion
+csharp_style_var_when_type_is_apparent = true : suggestion
+dotnet_style_qualification_for_event = true : error
+dotnet_style_qualification_for_field = true : error
+dotnet_style_qualification_for_method = true : error
+dotnet_style_qualification_for_property = true : error
+
+[*.targets]
+indent_size = 2
diff --git a/appveyor.cmd b/appveyor.cmd
new file mode 100644
index 0000000..dbe8e24
--- /dev/null
+++ b/appveyor.cmd
@@ -0,0 +1,11 @@
+@setlocal
+@pushd %~dp0
+
+nuget restore
+
+msbuild -p:Configuration=Release;Platform=x86
+
+msbuild -p:Configuration=Release -t:Pack src\stub\stub.vcxproj
+
+@popd
+@endlocal
\ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..d55322d
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,35 @@
+# Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
+#
+# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml
+# then update all of the repos.
+
+image: Visual Studio 2017
+
+version: 0.0.0.{build}
+configuration: Release
+
+environment:
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+ DOTNET_CLI_TELEMETRY_OPTOUT: 1
+ NUGET_XMLDOC_MODE: skip
+
+build_script:
+ - appveyor.cmd
+
+pull_requests:
+ do_not_increment_build_number: true
+
+nuget:
+ disable_publish_on_pr: true
+
+skip_branch_with_pr: true
+skip_tags: true
+
+artifacts:
+- path: build\Release\**\*.nupkg
+ name: nuget
+
+notifications:
+- provider: Slack
+ incoming_webhook:
+ secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
diff --git a/burn.sln b/burn.sln
new file mode 100644
index 0000000..0bdee49
--- /dev/null
+++ b/burn.sln
@@ -0,0 +1,41 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.12
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "engine", "src\engine\engine.vcxproj", "{8119537D-E1D9-6591-D51A-49768A2F9C37}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stub", "src\stub\stub.vcxproj", "{C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Debug|x64.ActiveCfg = Debug|x64
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Debug|x64.Build.0 = Debug|x64
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Debug|x86.ActiveCfg = Debug|Win32
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Debug|x86.Build.0 = Debug|Win32
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Release|x64.ActiveCfg = Release|x64
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Release|x64.Build.0 = Release|x64
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Release|x86.ActiveCfg = Release|Win32
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}.Release|x86.Build.0 = Release|Win32
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Debug|x64.ActiveCfg = Debug|x64
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Debug|x64.Build.0 = Debug|x64
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Debug|x86.ActiveCfg = Debug|Win32
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Debug|x86.Build.0 = Debug|Win32
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x64.ActiveCfg = Release|x64
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x64.Build.0 = Release|x64
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x86.ActiveCfg = Release|Win32
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A35910C5-8A89-473E-9578-E084172DD3C9}
+ EndGlobalSection
+EndGlobal
diff --git a/nuget.config b/nuget.config
new file mode 100644
index 0000000..790be2b
--- /dev/null
+++ b/nuget.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props
new file mode 100644
index 0000000..296b36c
--- /dev/null
+++ b/src/Cpp.Build.props
@@ -0,0 +1,100 @@
+
+
+
+
+
+ Win32
+ $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\
+ $(OutputPath)$(Platform)\
+
+
+
+
+ $(DisableSpecificCompilerWarnings)
+ Level4
+ $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)
+ Use
+ precomp.h
+ StdCall
+ true
+ false
+ -YlprecompDefine
+ /Zc:threadSafeInit- %(AdditionalOptions)
+ true
+
+
+ $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)
+ $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)
+
+
+ $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)
+
+
+ $(ProjectSubSystem)
+ $(ProjectModuleDefinitionFile)
+ $(ResourceOnlyDll)
+ true
+ $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)
+ $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)
+ /IGNORE:4099 %(AdditionalOptions)
+
+
+
+
+
+ NoExtensions
+
+
+
+
+ CDecl
+
+
+
+
+ OldStyle
+ true
+ true
+
+
+
+
+ Disabled
+ EnableFastChecks
+ _DEBUG;DEBUG;%(PreprocessorDefinitions)
+ MultiThreadedDebug
+
+
+
+
+
+ MultiThreadedDebugDll
+
+
+
+
+ MinSpace
+ NDEBUG;%(PreprocessorDefinitions)
+ true
+ true
+ MultiThreaded
+
+
+ true
+ true
+
+
+
+
+
+ MultiThreadedDll
+
+
+
+
+ $(LinkKeyFile)
+ $(LinkDelaySign)
+
+
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 0000000..e853e22
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,26 @@
+
+
+
+
+
+ Debug
+ false
+
+ $(MSBuildProjectName)
+ $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\))
+ $(BaseOutputPath)obj\$(ProjectName)\
+ $(BaseOutputPath)$(Configuration)\
+
+ WiX Toolset Team
+ WiX Toolset
+ Copyright (c) .NET Foundation and contributors. All rights reserved.
+ MS-RL
+ WiX Toolset
+
+
+
+
+
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
new file mode 100644
index 0000000..dac7452
--- /dev/null
+++ b/src/Directory.Build.targets
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ true
+ $(SolutionPath)
+ $(NCrunchOriginalSolutionPath)
+
+
+
+
+
+
+ $([System.IO.File]::ReadAllText($(TheSolutionPath)))
+ $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) ))
+ (?<="[PackageName]", ")(.*)(?=", ")
+
+
+
+
+
+ %(Identity)
+ $(SolutionFileContent.Contains('\%(Identity).csproj'))
+
+
+
+
+ $(RegexPattern.Replace('[PackageName]','%(PackageName)') )
+ $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)'))
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index 3c0f09c..190c327 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -144,6 +144,7 @@ extern "C" HRESULT EngineRun(
fXmlInitialized = TRUE;
ovix.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
+ #pragma warning(suppress: 4996)
if (!::GetVersionExW((LPOSVERSIONINFOW)&ovix))
{
ExitWithLastError(hr, "Failed to get OS info.");
diff --git a/src/engine/engine.vcxproj b/src/engine/engine.vcxproj
new file mode 100644
index 0000000..169c47f
--- /dev/null
+++ b/src/engine/engine.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+ {8119537D-E1D9-6591-D51A-49768A2F9C37}
+ StaticLibrary
+ engine
+ v141
+ Unicode
+ Native component of WixToolset.Burn
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)..\inc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compiling message file...
+ mc.exe -h "$(IntDir)." -r "$(IntDir)." -A -c -z engine.messages "$(InputDir)engine.mc"
+rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"
+ $(IntDir)engine.messages.h;$(OutDir)engine.messages.rc
+
+
+
+
+
+
+
+ rmj=4;rmm=0;rup=$(BuildNumber);szVerMajorMinorBuild="$(BuildVersion)";%(PreprocessorDefinitions)
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
+
diff --git a/src/engine/packages.config b/src/engine/packages.config
new file mode 100644
index 0000000..52c84cf
--- /dev/null
+++ b/src/engine/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/engine/precomp.cpp b/src/engine/precomp.cpp
new file mode 100644
index 0000000..37664a1
--- /dev/null
+++ b/src/engine/precomp.cpp
@@ -0,0 +1,3 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
+
+#include "precomp.h"
diff --git a/src/engine/precomp.h b/src/engine/precomp.h
index d3ebe35..477dc31 100644
--- a/src/engine/precomp.h
+++ b/src/engine/precomp.h
@@ -4,12 +4,15 @@
#define ExitTrace LogErrorString
-#include
-
#include
#include
#include
+
+#pragma warning(push)
+#pragma warning(disable:4458) // declaration of 'xxx' hides class member
#include
+#pragma warning(pop)
+
#include
#include
#include
diff --git a/src/engine/variable.cpp b/src/engine/variable.cpp
index ed4abea..7377b11 100644
--- a/src/engine/variable.cpp
+++ b/src/engine/variable.cpp
@@ -1698,6 +1698,7 @@ static HRESULT InitializeVariableOsInfo(
BURN_VARIANT value = { };
ovix.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXW);
+ #pragma warning(suppress: 4996)
if (!::GetVersionExW((LPOSVERSIONINFOW)&ovix))
{
ExitWithLastError(hr, "Failed to get OS info.");
diff --git a/src/stub/packages.config b/src/stub/packages.config
new file mode 100644
index 0000000..883e8d9
--- /dev/null
+++ b/src/stub/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/stub/precomp.cpp b/src/stub/precomp.cpp
new file mode 100644
index 0000000..37664a1
--- /dev/null
+++ b/src/stub/precomp.cpp
@@ -0,0 +1,3 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
+
+#include "precomp.h"
diff --git a/src/stub/runtime.win.WixToolset.Burn.nuspec b/src/stub/runtime.win.WixToolset.Burn.nuspec
new file mode 100644
index 0000000..e296bf8
--- /dev/null
+++ b/src/stub/runtime.win.WixToolset.Burn.nuspec
@@ -0,0 +1,20 @@
+
+
+
+ $id$
+ $version$
+ $authors$
+ $authors$
+
+ https://licenses.nuget.org/MS-RL
+ https://github.com/wixtoolset/burn
+ false
+ $description$
+ $copyright$
+
+
+
+
+
+
+
diff --git a/src/stub/stub.rc b/src/stub/stub.rc
index 5601703..80e1aac 100644
--- a/src/stub/stub.rc
+++ b/src/stub/stub.rc
@@ -1,14 +1,3 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
-#define VER_APP
-#define VER_ORIGINAL_FILENAME "setup.exe"
-#define VER_INTERNAL_NAME "setup"
-#define VER_FILE_DESCRIPTION "WiX Toolset Bootstrapper"
-#include "wix.rc"
-
1 ICON "stub.ico"
-
-//#define MANIFEST_RESOURCE_ID 1
-#ifndef ARM // the ARM manifest is automatically injected but other platforms need it done manually.
-//MANIFEST_RESOURCE_ID RT_MANIFEST "stub.manifest"
-#endif
diff --git a/src/stub/stub.vcxproj b/src/stub/stub.vcxproj
new file mode 100644
index 0000000..89b811c
--- /dev/null
+++ b/src/stub/stub.vcxproj
@@ -0,0 +1,104 @@
+
+
+
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+ x86
+ amd64
+
+
+
+ {C38373AA-882F-4F55-B03F-2AAB4BFBE3F1}
+ Application
+ Windows
+ burn.$(NameSuffix)
+ v141
+ Unicode
+ Native component of WixToolset.Burn
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)..\engine\inc
+ cabinet.lib;crypt32.lib;gdiplus.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;wuguid.lib;engine.lib;engine.res
+
+
+
+
+ true
+ true
+ cabinet.dll;crypt32.dll;gdiplus.dll;msi.dll;shlwapi.dll;version.dll;wininet.dll;wintrust.dll
+
+
+
+
+
+
+
+
+ Create
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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}.
+
+
+
+
+
diff --git a/version.json b/version.json
new file mode 100644
index 0000000..5f85777
--- /dev/null
+++ b/version.json
@@ -0,0 +1,11 @@
+{
+ "version": "4.0",
+ "publicReleaseRefSpec": [
+ "^refs/heads/master$"
+ ],
+ "cloudBuild": {
+ "buildNumber": {
+ "enabled": true
+ }
+ }
+}