@joebigelow / wix / commits / 43fb611e

Move the entry point from Mba.Core to Mba.Host.

Sean Hall committed Dec 21, 2019 at 18:33 UTC 43fb611edc680a74d229e8f1eeacb30adad8e3c7
26 files changed +620 -62
Bal.wixext.sln
+12 -2
@@ -1,7 +1,7 @@
1 
2 Microsoft Visual Studio Solution File, Format Version 12.00
3 -# Visual Studio 15
4 -VisualStudioVersion = 15.0.28010.2016
3 +# Visual Studio Version 16
4 +VisualStudioVersion = 16.0.29503.13
5 MinimumVisualStudioVersion = 10.0.40219.1
6 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bafunctions", "src\Samples\bafunctions\bafunctions.vcxproj", "{EB0A7D51-2133-4EE7-B6CA-87DBEAC67E02}"
7 EndProject
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Bal.wixext", "sr
15 EndProject
16 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WixToolsetTest.MbaHost", "src\test\WixToolsetTest.MbaHost\WixToolsetTest.MbaHost.vcxproj", "{8C131CB9-7B1C-4B06-A328-E69CE9EDC763}"
17 EndProject
18 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Mba.Host", "src\WixToolset.Mba.Host\WixToolset.Mba.Host.csproj", "{F2BA1935-70FA-4156-B161-FD03850B4FAA}"
19 +EndProject
20 Global
21 GlobalSection(SolutionConfigurationPlatforms) = preSolution
22 Debug|Any CPU = Debug|Any CPU
@@ -71,6 +73,14 @@ Global
73 {8C131CB9-7B1C-4B06-A328-E69CE9EDC763}.Release|Any CPU.Build.0 = Release|Win32
74 {8C131CB9-7B1C-4B06-A328-E69CE9EDC763}.Release|x86.ActiveCfg = Release|Win32
75 {8C131CB9-7B1C-4B06-A328-E69CE9EDC763}.Release|x86.Build.0 = Release|Win32
76 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
78 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|x86.ActiveCfg = Debug|Any CPU
79 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Debug|x86.Build.0 = Debug|Any CPU
80 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
81 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|Any CPU.Build.0 = Release|Any CPU
82 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|x86.ActiveCfg = Release|Any CPU
83 + {F2BA1935-70FA-4156-B161-FD03850B4FAA}.Release|x86.Build.0 = Release|Any CPU
84 EndGlobalSection
85 GlobalSection(SolutionProperties) = preSolution
86 HideSolutionNode = FALSE
appveyor.cmd
+1
@@ -8,6 +8,7 @@ msbuild -p:Configuration=Release -t:Restore
8 msbuild -p:Configuration=Release
9
10 msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Bal.wixext.csproj
11 +msbuild -p:Configuration=Release -t:Pack src\WixToolset.Mba.Host\WixToolset.Mba.Host.csproj
12
13 @popd
14 @endlocal
\ No newline at end of file
src/Samples/bafunctions/bafunctions.vcxproj
+4 -4
@@ -2,8 +2,8 @@
2 <!-- 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. -->
3
4 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 - <Import Project="..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props" Condition="Exists('..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" />
6 - <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" />
5 + <Import Project="..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props" Condition="Exists('..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" />
6 + <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" />
7 <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" />
8
9 <ItemGroup Label="ProjectConfigurations">
@@ -57,8 +57,8 @@
57 <PropertyGroup>
58 <ErrorText>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}.</ErrorText>
59 </PropertyGroup>
60 - <Error Condition="!Exists('..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props'))" />
61 - <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props'))" />
60 + <Error Condition="!Exists('..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props'))" />
61 + <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props'))" />
62 <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" />
63 <Error Condition="!Exists('..\..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
64 </Target>
src/Samples/bafunctions/packages.config
+2 -2
@@ -1,7 +1,7 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <packages>
3 <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4 - <package id="WixToolset.BootstrapperCore.Native" version="4.0.8" targetFramework="native" />
5 - <package id="WixToolset.BalUtil" version="4.0.9" targetFramework="native" />
4 + <package id="WixToolset.BootstrapperCore.Native" version="4.0.10" targetFramework="native" />
5 + <package id="WixToolset.BalUtil" version="4.0.12" targetFramework="native" />
6 <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" />
7 </packages>
\ No newline at end of file
src/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs new
+85
@@ -0,0 +1,85 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Configuration;
7 + using System.Reflection;
8 + using System.Runtime.InteropServices;
9 + using WixToolset.Mba.Core;
10 +
11 + /// <summary>
12 + /// Entry point for the MBA host to create and return the BA to the engine.
13 + /// </summary>
14 + [ClassInterface(ClassInterfaceType.None)]
15 + public sealed class BootstrapperApplicationFactory : MarshalByRefObject, IBootstrapperApplicationFactory
16 + {
17 + /// <summary>
18 + /// Creates a new instance of the <see cref="BootstrapperApplicationFactory"/> class.
19 + /// </summary>
20 + public BootstrapperApplicationFactory()
21 + {
22 + }
23 +
24 + /// <summary>
25 + /// Loads the bootstrapper application assembly and calls its IBootstrapperApplicationFactory.Create method.
26 + /// </summary>
27 + /// <param name="pArgs">Pointer to BOOTSTRAPPER_CREATE_ARGS struct.</param>
28 + /// <param name="pResults">Pointer to BOOTSTRAPPER_CREATE_RESULTS struct.</param>
29 + /// <exception cref="MissingAttributeException">The bootstrapper application assembly
30 + /// does not define the <see cref="BootstrapperApplicationFactoryAttribute"/>.</exception>
31 + public void Create(IntPtr pArgs, IntPtr pResults)
32 + {
33 + // Get the wix.boostrapper section group to get the name of the bootstrapper application assembly to host.
34 + var section = ConfigurationManager.GetSection("wix.bootstrapper/host") as HostSection;
35 + if (null == section)
36 + {
37 + throw new MissingAttributeException(); // TODO: throw a more specific exception than this.
38 + }
39 +
40 + // Load the BA's IBootstrapperApplicationFactory.
41 + var baFactoryType = BootstrapperApplicationFactory.GetBAFactoryTypeFromAssembly(section.AssemblyName);
42 + var baFactory = (IBootstrapperApplicationFactory)Activator.CreateInstance(baFactoryType);
43 + if (null == baFactory)
44 + {
45 + throw new InvalidBootstrapperApplicationFactoryException();
46 + }
47 +
48 + baFactory.Create(pArgs, pResults);
49 + }
50 +
51 + /// <summary>
52 + /// Locates the <see cref="BootstrapperApplicationFactoryAttribute"/> and returns the specified type.
53 + /// </summary>
54 + /// <param name="assemblyName">The assembly that defines the IBootstrapperApplicationFactory implementation.</param>
55 + /// <returns>The bootstrapper application factory <see cref="Type"/>.</returns>
56 + private static Type GetBAFactoryTypeFromAssembly(string assemblyName)
57 + {
58 + Type baFactoryType = null;
59 +
60 + // Load the requested assembly.
61 + Assembly asm = AppDomain.CurrentDomain.Load(assemblyName);
62 +
63 + // If an assembly was loaded and is not the current assembly, check for the required attribute.
64 + // This is done to avoid using the BootstrapperApplicationFactoryAttribute which we use at build time
65 + // to specify the BootstrapperApplicationFactory assembly in the manifest.
66 + if (!Assembly.GetExecutingAssembly().Equals(asm))
67 + {
68 + // There must be one and only one BootstrapperApplicationFactoryAttribute.
69 + // The attribute prevents multiple declarations already.
70 + var attrs = (BootstrapperApplicationFactoryAttribute[])asm.GetCustomAttributes(typeof(BootstrapperApplicationFactoryAttribute), false);
71 + if (null != attrs)
72 + {
73 + baFactoryType = attrs[0].BootstrapperApplicationFactoryType;
74 + }
75 + }
76 +
77 + if (null == baFactoryType)
78 + {
79 + throw new MissingAttributeException();
80 + }
81 +
82 + return baFactoryType;
83 + }
84 + }
85 +}
src/WixToolset.Mba.Host/BootstrapperSectionGroup.cs new
+29
@@ -0,0 +1,29 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Configuration;
7 +
8 + /// <summary>
9 + /// Handler for the wix.bootstrapper configuration section group.
10 + /// </summary>
11 + public class BootstrapperSectionGroup : ConfigurationSectionGroup
12 + {
13 + /// <summary>
14 + /// Creates a new instance of the <see cref="BootstrapperSectionGroup"/> class.
15 + /// </summary>
16 + public BootstrapperSectionGroup()
17 + {
18 + }
19 +
20 + /// <summary>
21 + /// Gets the <see cref="HostSection"/> handler for the mba configuration section.
22 + /// </summary>
23 + [ConfigurationProperty("host")]
24 + public HostSection Host
25 + {
26 + get { return (HostSection)base.Sections["host"]; }
27 + }
28 + }
29 +}
src/WixToolset.Mba.Host/Exceptions.cs new
+145
@@ -0,0 +1,145 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Runtime.Serialization;
7 +
8 + /// <summary>
9 + /// Base class for exception returned to the bootstrapper application host.
10 + /// </summary>
11 + [Serializable]
12 + public abstract class BootstrapperException : Exception
13 + {
14 + /// <summary>
15 + /// Creates an instance of the <see cref="BootstrapperException"/> base class with the given HRESULT.
16 + /// </summary>
17 + /// <param name="hr">The HRESULT for the exception that is used by the bootstrapper application host.</param>
18 + public BootstrapperException(int hr)
19 + {
20 + this.HResult = hr;
21 + }
22 +
23 + /// <summary>
24 + /// Initializes a new instance of the <see cref="BootstrapperException"/> class.
25 + /// </summary>
26 + /// <param name="message">Exception message.</param>
27 + public BootstrapperException(string message)
28 + : base(message)
29 + {
30 + }
31 +
32 + /// <summary>
33 + /// Initializes a new instance of the <see cref="BootstrapperException"/> class.
34 + /// </summary>
35 + /// <param name="message">Exception message</param>
36 + /// <param name="innerException">Inner exception associated with this one</param>
37 + public BootstrapperException(string message, Exception innerException)
38 + : base(message, innerException)
39 + {
40 + }
41 +
42 + /// <summary>
43 + /// Initializes a new instance of the <see cref="BootstrapperException"/> class.
44 + /// </summary>
45 + /// <param name="info">Serialization information for this exception</param>
46 + /// <param name="context">Streaming context to serialize to</param>
47 + protected BootstrapperException(SerializationInfo info, StreamingContext context)
48 + : base(info, context)
49 + {
50 + }
51 + }
52 +
53 + /// <summary>
54 + /// The bootstrapper application assembly loaded by the host does not contain exactly one instance of the
55 + /// <see cref="Core.BootstrapperApplicationFactoryAttribute"/> class.
56 + /// </summary>
57 + /// <seealso cref="Core.BootstrapperApplicationFactoryAttribute"/>
58 + [Serializable]
59 + public class MissingAttributeException : BootstrapperException
60 + {
61 + /// <summary>
62 + /// Creates a new instance of the <see cref="MissingAttributeException"/> class.
63 + /// </summary>
64 + public MissingAttributeException()
65 + : base(NativeMethods.E_NOTFOUND)
66 + {
67 + }
68 +
69 + /// <summary>
70 + /// Initializes a new instance of the <see cref="MissingAttributeException"/> class.
71 + /// </summary>
72 + /// <param name="message">Exception message.</param>
73 + public MissingAttributeException(string message)
74 + : base(message)
75 + {
76 + }
77 +
78 + /// <summary>
79 + /// Initializes a new instance of the <see cref="MissingAttributeException"/> class.
80 + /// </summary>
81 + /// <param name="message">Exception message</param>
82 + /// <param name="innerException">Inner exception associated with this one</param>
83 + public MissingAttributeException(string message, Exception innerException)
84 + : base(message, innerException)
85 + {
86 + }
87 +
88 + /// <summary>
89 + /// Initializes a new instance of the <see cref="MissingAttributeException"/> class.
90 + /// </summary>
91 + /// <param name="info">Serialization information for this exception</param>
92 + /// <param name="context">Streaming context to serialize to</param>
93 + protected MissingAttributeException(SerializationInfo info, StreamingContext context)
94 + : base(info, context)
95 + {
96 + }
97 + }
98 +
99 + /// <summary>
100 + /// The bootstrapper application factory specified by the <see cref="Core.BootstrapperApplicationFactoryAttribute"/>
101 + /// does not extend the <see cref="Core.IBootstrapperApplicationFactory"/> base class.
102 + /// </summary>
103 + /// <seealso cref="Core.BaseBootstrapperApplicationFactory"/>
104 + /// <seealso cref="Core.BootstrapperApplicationFactoryAttribute"/>
105 + [Serializable]
106 + public class InvalidBootstrapperApplicationFactoryException : BootstrapperException
107 + {
108 + /// <summary>
109 + /// Creates a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class.
110 + /// </summary>
111 + public InvalidBootstrapperApplicationFactoryException()
112 + : base(NativeMethods.E_UNEXPECTED)
113 + {
114 + }
115 +
116 + /// <summary>
117 + /// Initializes a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class.
118 + /// </summary>
119 + /// <param name="message">Exception message.</param>
120 + public InvalidBootstrapperApplicationFactoryException(string message)
121 + : base(message)
122 + {
123 + }
124 +
125 + /// <summary>
126 + /// Initializes a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class.
127 + /// </summary>
128 + /// <param name="message">Exception message</param>
129 + /// <param name="innerException">Inner exception associated with this one</param>
130 + public InvalidBootstrapperApplicationFactoryException(string message, Exception innerException)
131 + : base(message, innerException)
132 + {
133 + }
134 +
135 + /// <summary>
136 + /// Initializes a new instance of the <see cref="InvalidBootstrapperApplicationFactoryException"/> class.
137 + /// </summary>
138 + /// <param name="info">Serialization information for this exception</param>
139 + /// <param name="context">Streaming context to serialize to</param>
140 + protected InvalidBootstrapperApplicationFactoryException(SerializationInfo info, StreamingContext context)
141 + : base(info, context)
142 + {
143 + }
144 + }
145 +}
src/WixToolset.Mba.Host/HostSection.cs new
+47
@@ -0,0 +1,47 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Configuration;
7 +
8 + /// <summary>
9 + /// Handler for the Host configuration section.
10 + /// </summary>
11 + public sealed class HostSection : ConfigurationSection
12 + {
13 + private static readonly ConfigurationProperty assemblyNameProperty = new ConfigurationProperty("assemblyName", typeof(string), null, ConfigurationPropertyOptions.IsRequired);
14 + private static readonly ConfigurationProperty supportedFrameworksProperty = new ConfigurationProperty("", typeof(SupportedFrameworkElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection);
15 +
16 + /// <summary>
17 + /// Creates a new instance of the <see cref="HostSection"/> class.
18 + /// </summary>
19 + public HostSection()
20 + {
21 + }
22 +
23 + /// <summary>
24 + /// Gets the name of the assembly that contians the <see cref="Core.IBootstrapperApplicationFactory"/> child class.
25 + /// </summary>
26 + /// <remarks>
27 + /// The assembly specified by this name must contain the <see cref="Core.BootstrapperApplicationFactoryAttribute"/> to identify
28 + /// the type of the <see cref="Core.IBootstrapperApplicationFactory"/> child class.
29 + /// </remarks>
30 + [ConfigurationProperty("assemblyName", IsRequired = true)]
31 + public string AssemblyName
32 + {
33 + get { return (string)base[assemblyNameProperty]; }
34 + set { base[assemblyNameProperty] = value; }
35 + }
36 +
37 + /// <summary>
38 + /// Gets the <see cref="SupportedFrameworkElementCollection"/> of supported frameworks for the host configuration.
39 + /// </summary>
40 + [ConfigurationProperty("", IsDefaultCollection = true)]
41 + [ConfigurationCollection(typeof(SupportedFrameworkElement))]
42 + public SupportedFrameworkElementCollection SupportedFrameworks
43 + {
44 + get { return (SupportedFrameworkElementCollection)base[supportedFrameworksProperty]; }
45 + }
46 + }
47 +}
src/WixToolset.Mba.Host/NativeMethods.cs new
+18
@@ -0,0 +1,18 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Runtime.InteropServices;
7 +
8 + /// <summary>
9 + /// Contains native constants, functions, and structures for this assembly.
10 + /// </summary>
11 + internal static class NativeMethods
12 + {
13 + #region Error Constants
14 + internal const int E_NOTFOUND = unchecked((int)0x80070490);
15 + internal const int E_UNEXPECTED = unchecked((int)0x8000ffff);
16 + #endregion
17 + }
18 +}
src/WixToolset.Mba.Host/Properties/AssemblyInfo.cs new
+17
@@ -0,0 +1,17 @@
1 +// 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.
2 +
3 +using System;
4 +using System.Reflection;
5 +using System.Runtime.InteropServices;
6 +
7 +[assembly: AssemblyTitle("Managed Bootstrapper Application Host (WiX)")]
8 +[assembly: AssemblyDescription("Managed Bootstrapper Application Host")]
9 +[assembly: AssemblyProduct("WiX Toolset")]
10 +[assembly: AssemblyCompany("WiX Toolset Team")]
11 +[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")]
12 +
13 +// Types should not be visible to COM by default.
14 +[assembly: ComVisible(false)]
15 +[assembly: Guid("6f4e0cc9-8ad4-4b5a-a669-3aafff67a76f")]
16 +
17 +[assembly: CLSCompliantAttribute(true)]
src/WixToolset.Mba.Host/SupportedFrameworkElement.cs new
+47
@@ -0,0 +1,47 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Configuration;
7 +
8 + /// <summary>
9 + /// Handler for the supportedFramework configuration section.
10 + /// </summary>
11 + public sealed class SupportedFrameworkElement : ConfigurationElement
12 + {
13 + private static readonly ConfigurationProperty versionProperty = new ConfigurationProperty("version", typeof(string), null, ConfigurationPropertyOptions.IsRequired);
14 + private static readonly ConfigurationProperty runtimeVersionProperty = new ConfigurationProperty("runtimeVersion", typeof(string));
15 +
16 + /// <summary>
17 + /// Creates a new instance of the <see cref="SupportedFrameworkElement"/> class.
18 + /// </summary>
19 + public SupportedFrameworkElement()
20 + {
21 + }
22 +
23 + /// <summary>
24 + /// Gets the version of the supported framework.
25 + /// </summary>
26 + /// <remarks>
27 + /// The assembly specified by this name must contain a value matching the NETFX version registry key under
28 + /// "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP".
29 + /// </remarks>
30 + [ConfigurationProperty("version", IsRequired = true)]
31 + public string Version
32 + {
33 + get { return (string)base[versionProperty]; }
34 + set { base[versionProperty] = value; }
35 + }
36 +
37 + /// <summary>
38 + /// Gets the runtime version required by this supported framework.
39 + /// </summary>
40 + [ConfigurationProperty("runtimeVersion", IsRequired = false)]
41 + public string RuntimeVersion
42 + {
43 + get { return (string)base[runtimeVersionProperty]; }
44 + set { base[runtimeVersionProperty] = value; }
45 + }
46 + }
47 +}
src/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs new
+36
@@ -0,0 +1,36 @@
1 +// 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.
2 +
3 +namespace WixToolset.Mba.Host
4 +{
5 + using System;
6 + using System.Configuration;
7 + using System.Diagnostics.CodeAnalysis;
8 +
9 + /// <summary>
10 + /// Handler for the supportedFramework collection.
11 + /// </summary>
12 + [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")]
13 + [ConfigurationCollection(typeof(SupportedFrameworkElement), AddItemName = "supportedFramework", CollectionType = ConfigurationElementCollectionType.BasicMap)]
14 + public sealed class SupportedFrameworkElementCollection : ConfigurationElementCollection
15 + {
16 + public override ConfigurationElementCollectionType CollectionType
17 + {
18 + get { return ConfigurationElementCollectionType.BasicMap; }
19 + }
20 +
21 + protected override string ElementName
22 + {
23 + get { return "supportedFramework"; }
24 + }
25 +
26 + protected override ConfigurationElement CreateNewElement()
27 + {
28 + return new SupportedFrameworkElement();
29 + }
30 +
31 + protected override object GetElementKey(ConfigurationElement element)
32 + {
33 + return (element as SupportedFrameworkElement).Version;
34 + }
35 + }
36 +}
src/WixToolset.Mba.Host/WixToolset.Mba.Host.config new
+26
@@ -0,0 +1,26 @@
1 +<?xml version="1.0" encoding="utf-8" ?>
2 +<!-- 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. -->
3 +
4 +
5 +<configuration>
6 + <configSections>
7 + <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host">
8 + <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" />
9 + </sectionGroup>
10 + </configSections>
11 + <startup useLegacyV2RuntimeActivationPolicy="true">
12 + <supportedRuntime version="v4.0" />
13 + <supportedRuntime version="v2.0.50727" />
14 + </startup>
15 + <wix.bootstrapper>
16 + <!-- Example only. Use only if the startup/supportedRuntime above cannot discern supported frameworks. -->
17 + <!--
18 + <supportedFramework version="v4\Client" />
19 + <supportedFramework version="v3.5" />
20 + <supportedFramework version="v3.0" />
21 + -->
22 +
23 + <!-- Example only. Replace the host/@assemblyName attribute with assembly that implements IBootstrapperApplicationFactory. -->
24 + <host assemblyName="AssemblyWithClassThatInheritsFromBootstrapperApplicationFactory" />
25 + </wix.bootstrapper>
26 +</configuration>
src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj new
+89
@@ -0,0 +1,89 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +
5 +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 + <PropertyGroup>
7 + <ProjectGuid>{F2BA1935-70FA-4156-B161-FD03850B4FAA}</ProjectGuid>
8 + <AssemblyName>WixToolset.Mba.Host</AssemblyName>
9 + <OutputType>Library</OutputType>
10 + <RootNamespace>WixToolset.Mba.Host</RootNamespace>
11 + <NoWarn>0693;1591</NoWarn>
12 + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
13 + <Description>Managed Bootstrapper Application entry point</Description>
14 + </PropertyGroup>
15 + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
16 + <DebugSymbols>true</DebugSymbols>
17 + <Optimize>false</Optimize>
18 + <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
19 + </PropertyGroup>
20 + <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
21 + <DebugSymbols>true</DebugSymbols>
22 + <Optimize>true</Optimize>
23 + <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
24 + </PropertyGroup>
25 + <ItemGroup>
26 + <Compile Include="BootstrapperApplicationFactory.cs" />
27 + <Compile Include="BootstrapperSectionGroup.cs" />
28 + <Compile Include="Exceptions.cs" />
29 + <Compile Include="HostSection.cs" />
30 + <Compile Include="NativeMethods.cs" />
31 + <Compile Include="Properties\AssemblyInfo.cs" />
32 + <Compile Include="SupportedFrameworkElementCollection.cs" />
33 + <Compile Include="SupportedFrameworkElement.cs" />
34 + </ItemGroup>
35 + <ItemGroup>
36 + <None Include="WixToolset.Mba.Host.config" />
37 + </ItemGroup>
38 + <ItemGroup>
39 + <None Include="packages.config" />
40 + </ItemGroup>
41 + <ItemGroup>
42 + <Reference Include="System" />
43 + <Reference Include="System.Configuration" />
44 + <Reference Include="System.Data" />
45 + <Reference Include="System.Xml" />
46 + <Reference Include="WixToolset.Mba.Core">
47 + <HintPath>..\..\packages\WixToolset.Mba.Core.4.0.12\lib\net20\WixToolset.Mba.Core.dll</HintPath>
48 + </Reference>
49 + </ItemGroup>
50 + <ItemGroup>
51 + <HeaderPath Include="$(BaseOutputPath)obj\$(AssemblyName).h">
52 + <Visible>False</Visible>
53 + </HeaderPath>
54 + </ItemGroup>
55 +
56 + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
57 +
58 + <Target Name="GenerateIdentityHeader" AfterTargets="Build" Inputs="$(TargetPath)" Outputs="@(HeaderPath)">
59 + <GetAssemblyIdentity AssemblyFiles="$(TargetPath)">
60 + <Output TaskParameter="Assemblies" ItemName="AssemblyIdentity" />
61 + </GetAssemblyIdentity>
62 + <ItemGroup>
63 + <Line Include="#define MBA_ASSEMBLY_FULL_NAME L&quot;%(AssemblyIdentity.Identity)&quot;" />
64 + <Line Include="#define MBA_CONFIG_FILE_NAME L&quot;$(AssemblyName).config&quot;" />
65 + <Line Include="#define MBA_ENTRY_TYPE L&quot;$(RootNamespace).BootstrapperApplicationFactory&quot;" />
66 + </ItemGroup>
67 + <Message Importance="normal" Text="Generating identity definitions into @(HeaderPath->'%(FullPath)')" />
68 + <WriteLinesToFile File="@(HeaderPath)" Lines="@(Line)" Overwrite="True" />
69 + <ItemGroup>
70 + <FileWrites Include="@(HeaderPath)" />
71 + </ItemGroup>
72 + </Target>
73 +
74 + <Target Name="Pack" DependsOnTargets="GetBuildVersion">
75 + <Exec Command='nuget pack $(AssemblyName).nuspec -OutputDirectory "$(BaseOutputPath)$(Configuration)" -Properties Configuration=$(Configuration);Id=$(AssemblyName);Version="$(BuildVersionSimple)";Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)"' />
76 + </Target>
77 +
78 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
79 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
80 + <PropertyGroup>
81 + <ErrorText>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}.</ErrorText>
82 + </PropertyGroup>
83 + <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
84 + </Target>
85 +
86 + <PropertyGroup Condition=" '$(CreateDocumentation)'!='false' ">
87 + <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
88 + </PropertyGroup>
89 +</Project>
\ No newline at end of file
src/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec new
+20
@@ -0,0 +1,20 @@
1 +<?xml version="1.0"?>
2 +<package >
3 + <metadata>
4 + <id>$id$</id>
5 + <version>$version$</version>
6 + <authors>WiX Toolset Team</authors>
7 + <owners>WiX Toolset Team</owners>
8 + <!-- <license type="expression">MS-RL</license> -->
9 + <licenseUrl>https://licenses.nuget.org/MS-RL</licenseUrl>
10 + <projectUrl>https://github.com/wixtoolset/Bal.wixext</projectUrl>
11 + <requireLicenseAcceptance>false</requireLicenseAcceptance>
12 + <description>$description$</description>
13 + <copyright>$copyright$</copyright>
14 + </metadata>
15 +
16 + <files>
17 + <file src="$id$.config" target="samples" />
18 + <file src="..\..\build\$configuration$\$id$.dll" target="lib\net20" />
19 + </files>
20 +</package>
src/WixToolset.Mba.Host/packages.config new
+5
@@ -0,0 +1,5 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="net20" developmentDependency="true" />
4 + <package id="WixToolset.Mba.Core" version="4.0.12" targetFramework="net20" />
5 +</packages>
\ No newline at end of file
src/mbahost/mbahost.cpp
+5 -14
@@ -1,8 +1,7 @@
1 // 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.
2
3 #include "precomp.h"
4 -#include <WixToolset.Mba.Core.h> // includes the generated assembly name macros.
5 -#include "BalBaseBootstrapperApplicationProc.h"
4 +#include <WixToolset.Mba.Host.h> // includes the generated assembly name macros.
5
6 static const DWORD NET452_RELEASE = 379893;
7
@@ -50,7 +49,6 @@ static HRESULT GetCLRHost(
49 );
50 static HRESULT CreateManagedBootstrapperApplication(
51 __in _AppDomain* pAppDomain,
53 - __in IBootstrapperEngine* pEngine,
52 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
53 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
54 );
@@ -109,7 +107,7 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
107 {
108 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading managed bootstrapper application.");
109
112 - hr = CreateManagedBootstrapperApplication(vpAppDomain, pEngine, pArgs, pResults);
110 + hr = CreateManagedBootstrapperApplication(vpAppDomain, pArgs, pResults);
111 BalExitOnFailure(hr, "Failed to create the managed bootstrapper application.");
112 }
113 else // fallback to the prerequisite BA.
@@ -185,7 +183,7 @@ static HRESULT GetAppDomain(
183 hr = GetAppBase(&sczAppBase);
184 ExitOnFailure(hr, "Failed to get the host base path.");
185
188 - hr = PathConcat(sczAppBase, L"WixToolset.Mba.Core.config", &sczConfigPath);
186 + hr = PathConcat(sczAppBase, MBA_CONFIG_FILE_NAME, &sczConfigPath);
187 ExitOnFailure(hr, "Failed to get the full path to the application configuration file.");
188
189 // Check that the supported framework is installed.
@@ -514,27 +512,20 @@ LExit:
512 // Creates the bootstrapper app and returns it for the engine.
513 static HRESULT CreateManagedBootstrapperApplication(
514 __in _AppDomain* pAppDomain,
517 - __in IBootstrapperEngine* pEngine,
515 __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
516 __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
517 )
518 {
519 HRESULT hr = S_OK;
520 IBootstrapperApplicationFactory* pAppFactory = NULL;
524 - IBootstrapperApplication* pApp = NULL;
521
522 hr = CreateManagedBootstrapperApplicationFactory(pAppDomain, &pAppFactory);
523 ExitOnFailure(hr, "Failed to create the factory to create the bootstrapper application.");
524
529 - hr = pAppFactory->Create(pEngine, pArgs->pCommand, &pApp);
525 + hr = pAppFactory->Create(pArgs, pResults);
526 ExitOnFailure(hr, "Failed to create the bootstrapper application.");
527
532 - pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc;
533 - pResults->pvBootstrapperApplicationProcContext = pApp;
534 - pApp = NULL;
535 -
528 LExit:
537 - ReleaseNullObject(pApp);
529 ReleaseNullObject(pAppFactory);
530
531 return hr;
@@ -557,7 +548,7 @@ static HRESULT CreateManagedBootstrapperApplicationFactory(
548 bstrAssemblyName = ::SysAllocString(MBA_ASSEMBLY_FULL_NAME);
549 ExitOnNull(bstrAssemblyName, hr, E_OUTOFMEMORY, "Failed to allocate the full assembly name for the bootstrapper application factory.");
550
560 - bstrTypeName = ::SysAllocString(L"WixToolset.Mba.Core.BootstrapperApplicationFactory");
551 + bstrTypeName = ::SysAllocString(MBA_ENTRY_TYPE);
552 ExitOnNull(bstrTypeName, hr, E_OUTOFMEMORY, "Failed to allocate the full type name for the BA factory.");
553
554 hr = pAppDomain->CreateInstance(bstrAssemblyName, bstrTypeName, &pObj);
src/mbahost/mbahost.vcxproj
+9 -12
@@ -2,8 +2,8 @@
2 <!-- 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. -->
3
4 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 - <Import Project="..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props" Condition="Exists('..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" />
6 - <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" />
5 + <Import Project="..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props" Condition="Exists('..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" />
6 + <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" />
7 <Import Project="..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" />
8
9 <ItemGroup Label="ProjectConfigurations">
@@ -52,13 +52,14 @@
52
53 <ItemDefinitionGroup>
54 <ClCompile>
55 - <AdditionalIncludeDirectories>..\..\packages\WixToolset.Mba.Core.4.0.9\build\native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
55 + <AdditionalIncludeDirectories>$(BaseOutputPath)obj;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
56 </ClCompile>
57 </ItemDefinitionGroup>
58
59 <ItemGroup>
60 - <MbaHostDependency Include="..\..\packages\WixToolset.BootstrapperCore.4.0.8\lib\net20\WixToolset.BootstrapperCore.dll" />
61 - <MbaHostDependency Include="..\..\packages\WixToolset.Mba.Core.4.0.9\lib\net20\WixToolset.Mba.Core.dll" />
60 + <ProjectReference Include="..\WixToolset.Mba.Host\WixToolset.Mba.Host.csproj">
61 + <Project>{f2ba1935-70fa-4156-b161-fd03850b4faa}</Project>
62 + </ProjectReference>
63 </ItemGroup>
64
65 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
@@ -67,13 +68,9 @@
68 <PropertyGroup>
69 <ErrorText>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}.</ErrorText>
70 </PropertyGroup>
70 - <Error Condition="!Exists('..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props'))" />
71 - <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props'))" />
71 + <Error Condition="!Exists('..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props'))" />
72 + <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props'))" />
73 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" />
74 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
75 </Target>
75 -
76 - <Target Name="CopyMbaHostDependencies" AfterTargets="Build">
77 - <Copy DestinationFolder="$(OutputPath)" SourceFiles="@(MbaHostDependency)" SkipUnchangedFiles="true" />
78 - </Target>
79 -</Project>
76 +</Project>
\ No newline at end of file
src/mbahost/packages.config
+2 -4
@@ -1,9 +1,7 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <packages>
3 <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4 - <package id="WixToolset.BootstrapperCore" version="4.0.8" targetFramework="native" />
5 - <package id="WixToolset.BootstrapperCore.Native" version="4.0.8" targetFramework="native" />
6 - <package id="WixToolset.BalUtil" version="4.0.9" targetFramework="native" />
4 + <package id="WixToolset.BootstrapperCore.Native" version="4.0.10" targetFramework="native" />
5 + <package id="WixToolset.BalUtil" version="4.0.12" targetFramework="native" />
6 <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" />
8 - <package id="WixToolset.Mba.Core" version="4.0.9" targetFramework="native" />
7 </packages>
\ No newline at end of file
src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h
-1
@@ -8,7 +8,6 @@ namespace MbaHost
8 namespace Native
9 {
10 using namespace System;
11 - using namespace WixToolset::BootstrapperCore;
11 using namespace WixToolset::Mba::Core;
12
13 public ref class TestManagedBootstrapperApplication : BootstrapperApplication
src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Host.config renamed
+2 -2
@@ -4,8 +4,8 @@
4
5 <configuration>
6 <configSections>
7 - <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Core.BootstrapperSectionGroup, WixToolset.Mba.Core">
8 - <section name="host" type="WixToolset.Mba.Core.HostSection, WixToolset.Mba.Core" />
7 + <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host">
8 + <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" />
9 </sectionGroup>
10 </configSections>
11 <startup useLegacyV2RuntimeActivationPolicy="true">
src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj
+9 -9
@@ -1,8 +1,8 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- 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. -->
3 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4 - <Import Project="..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props" Condition="Exists('..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" />
5 - <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" />
4 + <Import Project="..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props" Condition="Exists('..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" />
5 + <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" />
6 <Import Project="..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props" Condition="Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props')" />
7 <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" />
8 <ItemGroup Label="ProjectConfigurations">
@@ -48,7 +48,10 @@
48 <ItemGroup>
49 <None Include="packages.config" />
50 <Content Include="BootstrapperApplicationData.xml" CopyToOutputDirectory="PreserveNewest" />
51 - <Content Include="WixToolset.Mba.Core.config" CopyToOutputDirectory="PreserveNewest" />
51 + <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" />
52 + <Content Include="..\..\..\packages\WixToolset.Mba.Core.4.0.12\build\native\x86\mbanative.dll" Condition="Exists('..\..\..\packages\WixToolset.Mba.Core.4.0.12\build\native\x86\mbanative.dll')" CopyToOutputDirectory="PreserveNewest">
53 + <Visible>False</Visible>
54 + </Content>
55 </ItemGroup>
56 <ItemGroup>
57 <Reference Include="System" />
@@ -65,11 +68,8 @@
68 <Reference Include="xunit.execution.desktop">
69 <HintPath>..\..\..\packages\xunit.extensibility.execution.2.4.0\lib\net452\xunit.execution.desktop.dll</HintPath>
70 </Reference>
68 - <Reference Include="WixToolset.BootstrapperCore">
69 - <HintPath>..\..\..\packages\WixToolset.BootstrapperCore.4.0.8\lib\net20\WixToolset.BootstrapperCore.dll</HintPath>
70 - </Reference>
71 <Reference Include="WixToolset.Mba.Core">
72 - <HintPath>..\..\..\packages\WixToolset.Mba.Core.4.0.9\lib\net20\WixToolset.Mba.Core.dll</HintPath>
72 + <HintPath>..\..\..\packages\WixToolset.Mba.Core.4.0.12\lib\net20\WixToolset.Mba.Core.dll</HintPath>
73 </Reference>
74 </ItemGroup>
75 <ItemGroup>
@@ -85,8 +85,8 @@
85 <PropertyGroup>
86 <ErrorText>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}.</ErrorText>
87 </PropertyGroup>
88 - <Error Condition="!Exists('..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props'))" />
89 - <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props'))" />
88 + <Error Condition="!Exists('..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props'))" />
89 + <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props'))" />
90 <Error Condition="!Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\xunit.core.2.4.0\build\xunit.core.props'))" />
91 <Error Condition="!Exists('..\..\..\packages\xunit.core.2.4.0\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\xunit.core.2.4.0\build\xunit.core.targets'))" />
92 <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" />
src/test/WixToolsetTest.MbaHost/packages.config
+3 -4
@@ -8,9 +8,8 @@
8 <package id="xunit.extensibility.core" version="2.4.0" targetFramework="net461" />
9 <package id="xunit.extensibility.execution" version="2.4.0" targetFramework="net461" />
10 <package id="xunit.runner.visualstudio" version="2.4.0" targetFramework="net461" />
11 - <package id="WixToolset.BalUtil" version="4.0.9" targetFramework="native" />
12 - <package id="WixToolset.BootstrapperCore" version="4.0.8" targetFramework="net461" />
13 - <package id="WixToolset.BootstrapperCore.Native" version="4.0.8" targetFramework="native" />
11 + <package id="WixToolset.BalUtil" version="4.0.12" targetFramework="native" />
12 + <package id="WixToolset.BootstrapperCore.Native" version="4.0.10" targetFramework="native" />
13 <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" />
15 - <package id="WixToolset.Mba.Core" version="4.0.9" targetFramework="net461" />
14 + <package id="WixToolset.Mba.Core" version="4.0.12" targetFramework="net461" />
15 </packages>
\ No newline at end of file
src/wixlib/Mba.wxs
+1 -2
@@ -40,8 +40,7 @@
40
41 <Fragment>
42 <PayloadGroup Id='Mba'>
43 - <Payload Compressed='yes' SourceFile='WixToolset.BootstrapperCore.dll' />
44 - <Payload Compressed='yes' SourceFile='WixToolset.Mba.Core.dll' />
43 + <Payload Compressed='yes' SourceFile='WixToolset.Mba.Host.dll' />
44 <Payload Compressed='yes' SourceFile='wixstdba.dll' Name='mbapreq.dll' />
45 </PayloadGroup>
46 </Fragment>
src/wixstdba/packages.config
+2 -2
@@ -1,7 +1,7 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <packages>
3 <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="native" developmentDependency="true" />
4 - <package id="WixToolset.BootstrapperCore.Native" version="4.0.8" targetFramework="native" />
5 - <package id="WixToolset.BalUtil" version="4.0.9" targetFramework="native" />
4 + <package id="WixToolset.BootstrapperCore.Native" version="4.0.10" targetFramework="native" />
5 + <package id="WixToolset.BalUtil" version="4.0.12" targetFramework="native" />
6 <package id="WixToolset.DUtil" version="4.0.18" targetFramework="native" />
7 </packages>
\ No newline at end of file
src/wixstdba/wixstdba.vcxproj
+4 -4
@@ -2,8 +2,8 @@
2 <!-- 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. -->
3
4 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 - <Import Project="..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props" Condition="Exists('..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" />
6 - <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" />
5 + <Import Project="..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props" Condition="Exists('..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" />
6 + <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" />
7 <Import Project="..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" />
8
9 <ItemGroup Label="ProjectConfigurations">
@@ -107,8 +107,8 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc"</Command>
107 <PropertyGroup>
108 <ErrorText>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}.</ErrorText>
109 </PropertyGroup>
110 - <Error Condition="!Exists('..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BalUtil.4.0.9\build\WixToolset.BalUtil.props'))" />
111 - <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.8\build\WixToolset.BootstrapperCore.Native.props'))" />
110 + <Error Condition="!Exists('..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BalUtil.4.0.12\build\WixToolset.BalUtil.props'))" />
111 + <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.10\build\WixToolset.BootstrapperCore.Native.props'))" />
112 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.18\build\WixToolset.DUtil.props'))" />
113 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
114 </Target>