From 43fb611edc680a74d229e8f1eeacb30adad8e3c7 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 21 Dec 2019 18:33:23 +1100 Subject: Move the entry point from Mba.Core to Mba.Host. --- src/Samples/bafunctions/bafunctions.vcxproj | 8 +- src/Samples/bafunctions/packages.config | 4 +- .../BootstrapperApplicationFactory.cs | 85 ++++++++++++ .../BootstrapperSectionGroup.cs | 29 +++++ src/WixToolset.Mba.Host/Exceptions.cs | 145 +++++++++++++++++++++ src/WixToolset.Mba.Host/HostSection.cs | 47 +++++++ src/WixToolset.Mba.Host/NativeMethods.cs | 18 +++ src/WixToolset.Mba.Host/Properties/AssemblyInfo.cs | 17 +++ .../SupportedFrameworkElement.cs | 47 +++++++ .../SupportedFrameworkElementCollection.cs | 36 +++++ src/WixToolset.Mba.Host/WixToolset.Mba.Host.config | 26 ++++ src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj | 89 +++++++++++++ src/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec | 20 +++ src/WixToolset.Mba.Host/packages.config | 5 + src/mbahost/mbahost.cpp | 19 +-- src/mbahost/mbahost.vcxproj | 21 ++- src/mbahost/packages.config | 6 +- .../TestManagedBootstrapperApplication.h | 1 - .../WixToolset.Mba.Core.config | 26 ---- .../WixToolset.Mba.Host.config | 26 ++++ .../WixToolsetTest.MbaHost.vcxproj | 18 +-- src/test/WixToolsetTest.MbaHost/packages.config | 7 +- src/wixlib/Mba.wxs | 3 +- src/wixstdba/packages.config | 4 +- src/wixstdba/wixstdba.vcxproj | 8 +- 25 files changed, 631 insertions(+), 84 deletions(-) create mode 100644 src/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs create mode 100644 src/WixToolset.Mba.Host/BootstrapperSectionGroup.cs create mode 100644 src/WixToolset.Mba.Host/Exceptions.cs create mode 100644 src/WixToolset.Mba.Host/HostSection.cs create mode 100644 src/WixToolset.Mba.Host/NativeMethods.cs create mode 100644 src/WixToolset.Mba.Host/Properties/AssemblyInfo.cs create mode 100644 src/WixToolset.Mba.Host/SupportedFrameworkElement.cs create mode 100644 src/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs create mode 100644 src/WixToolset.Mba.Host/WixToolset.Mba.Host.config create mode 100644 src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj create mode 100644 src/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec create mode 100644 src/WixToolset.Mba.Host/packages.config delete mode 100644 src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Core.config create mode 100644 src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Host.config (limited to 'src') diff --git a/src/Samples/bafunctions/bafunctions.vcxproj b/src/Samples/bafunctions/bafunctions.vcxproj index 5550ff60..22be1a35 100644 --- a/src/Samples/bafunctions/bafunctions.vcxproj +++ b/src/Samples/bafunctions/bafunctions.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -57,8 +57,8 @@ 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/Samples/bafunctions/packages.config b/src/Samples/bafunctions/packages.config index 7c46d4c5..f209d5fb 100644 --- a/src/Samples/bafunctions/packages.config +++ b/src/Samples/bafunctions/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs b/src/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs new file mode 100644 index 00000000..9385d1d1 --- /dev/null +++ b/src/WixToolset.Mba.Host/BootstrapperApplicationFactory.cs @@ -0,0 +1,85 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Configuration; + using System.Reflection; + using System.Runtime.InteropServices; + using WixToolset.Mba.Core; + + /// + /// Entry point for the MBA host to create and return the BA to the engine. + /// + [ClassInterface(ClassInterfaceType.None)] + public sealed class BootstrapperApplicationFactory : MarshalByRefObject, IBootstrapperApplicationFactory + { + /// + /// Creates a new instance of the class. + /// + public BootstrapperApplicationFactory() + { + } + + /// + /// Loads the bootstrapper application assembly and calls its IBootstrapperApplicationFactory.Create method. + /// + /// Pointer to BOOTSTRAPPER_CREATE_ARGS struct. + /// Pointer to BOOTSTRAPPER_CREATE_RESULTS struct. + /// The bootstrapper application assembly + /// does not define the . + public void Create(IntPtr pArgs, IntPtr pResults) + { + // Get the wix.boostrapper section group to get the name of the bootstrapper application assembly to host. + var section = ConfigurationManager.GetSection("wix.bootstrapper/host") as HostSection; + if (null == section) + { + throw new MissingAttributeException(); // TODO: throw a more specific exception than this. + } + + // Load the BA's IBootstrapperApplicationFactory. + var baFactoryType = BootstrapperApplicationFactory.GetBAFactoryTypeFromAssembly(section.AssemblyName); + var baFactory = (IBootstrapperApplicationFactory)Activator.CreateInstance(baFactoryType); + if (null == baFactory) + { + throw new InvalidBootstrapperApplicationFactoryException(); + } + + baFactory.Create(pArgs, pResults); + } + + /// + /// Locates the and returns the specified type. + /// + /// The assembly that defines the IBootstrapperApplicationFactory implementation. + /// The bootstrapper application factory . + private static Type GetBAFactoryTypeFromAssembly(string assemblyName) + { + Type baFactoryType = null; + + // Load the requested assembly. + Assembly asm = AppDomain.CurrentDomain.Load(assemblyName); + + // If an assembly was loaded and is not the current assembly, check for the required attribute. + // This is done to avoid using the BootstrapperApplicationFactoryAttribute which we use at build time + // to specify the BootstrapperApplicationFactory assembly in the manifest. + if (!Assembly.GetExecutingAssembly().Equals(asm)) + { + // There must be one and only one BootstrapperApplicationFactoryAttribute. + // The attribute prevents multiple declarations already. + var attrs = (BootstrapperApplicationFactoryAttribute[])asm.GetCustomAttributes(typeof(BootstrapperApplicationFactoryAttribute), false); + if (null != attrs) + { + baFactoryType = attrs[0].BootstrapperApplicationFactoryType; + } + } + + if (null == baFactoryType) + { + throw new MissingAttributeException(); + } + + return baFactoryType; + } + } +} diff --git a/src/WixToolset.Mba.Host/BootstrapperSectionGroup.cs b/src/WixToolset.Mba.Host/BootstrapperSectionGroup.cs new file mode 100644 index 00000000..5cf1bc9c --- /dev/null +++ b/src/WixToolset.Mba.Host/BootstrapperSectionGroup.cs @@ -0,0 +1,29 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Configuration; + + /// + /// Handler for the wix.bootstrapper configuration section group. + /// + public class BootstrapperSectionGroup : ConfigurationSectionGroup + { + /// + /// Creates a new instance of the class. + /// + public BootstrapperSectionGroup() + { + } + + /// + /// Gets the handler for the mba configuration section. + /// + [ConfigurationProperty("host")] + public HostSection Host + { + get { return (HostSection)base.Sections["host"]; } + } + } +} diff --git a/src/WixToolset.Mba.Host/Exceptions.cs b/src/WixToolset.Mba.Host/Exceptions.cs new file mode 100644 index 00000000..c68951f0 --- /dev/null +++ b/src/WixToolset.Mba.Host/Exceptions.cs @@ -0,0 +1,145 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Runtime.Serialization; + + /// + /// Base class for exception returned to the bootstrapper application host. + /// + [Serializable] + public abstract class BootstrapperException : Exception + { + /// + /// Creates an instance of the base class with the given HRESULT. + /// + /// The HRESULT for the exception that is used by the bootstrapper application host. + public BootstrapperException(int hr) + { + this.HResult = hr; + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + public BootstrapperException(string message) + : base(message) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message + /// Inner exception associated with this one + public BootstrapperException(string message, Exception innerException) + : base(message, innerException) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Serialization information for this exception + /// Streaming context to serialize to + protected BootstrapperException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } + + /// + /// The bootstrapper application assembly loaded by the host does not contain exactly one instance of the + /// class. + /// + /// + [Serializable] + public class MissingAttributeException : BootstrapperException + { + /// + /// Creates a new instance of the class. + /// + public MissingAttributeException() + : base(NativeMethods.E_NOTFOUND) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + public MissingAttributeException(string message) + : base(message) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message + /// Inner exception associated with this one + public MissingAttributeException(string message, Exception innerException) + : base(message, innerException) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Serialization information for this exception + /// Streaming context to serialize to + protected MissingAttributeException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } + + /// + /// The bootstrapper application factory specified by the + /// does not extend the base class. + /// + /// + /// + [Serializable] + public class InvalidBootstrapperApplicationFactoryException : BootstrapperException + { + /// + /// Creates a new instance of the class. + /// + public InvalidBootstrapperApplicationFactoryException() + : base(NativeMethods.E_UNEXPECTED) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message. + public InvalidBootstrapperApplicationFactoryException(string message) + : base(message) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Exception message + /// Inner exception associated with this one + public InvalidBootstrapperApplicationFactoryException(string message, Exception innerException) + : base(message, innerException) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Serialization information for this exception + /// Streaming context to serialize to + protected InvalidBootstrapperApplicationFactoryException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + } +} diff --git a/src/WixToolset.Mba.Host/HostSection.cs b/src/WixToolset.Mba.Host/HostSection.cs new file mode 100644 index 00000000..632025c7 --- /dev/null +++ b/src/WixToolset.Mba.Host/HostSection.cs @@ -0,0 +1,47 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Configuration; + + /// + /// Handler for the Host configuration section. + /// + public sealed class HostSection : ConfigurationSection + { + private static readonly ConfigurationProperty assemblyNameProperty = new ConfigurationProperty("assemblyName", typeof(string), null, ConfigurationPropertyOptions.IsRequired); + private static readonly ConfigurationProperty supportedFrameworksProperty = new ConfigurationProperty("", typeof(SupportedFrameworkElementCollection), null, ConfigurationPropertyOptions.IsDefaultCollection); + + /// + /// Creates a new instance of the class. + /// + public HostSection() + { + } + + /// + /// Gets the name of the assembly that contians the child class. + /// + /// + /// The assembly specified by this name must contain the to identify + /// the type of the child class. + /// + [ConfigurationProperty("assemblyName", IsRequired = true)] + public string AssemblyName + { + get { return (string)base[assemblyNameProperty]; } + set { base[assemblyNameProperty] = value; } + } + + /// + /// Gets the of supported frameworks for the host configuration. + /// + [ConfigurationProperty("", IsDefaultCollection = true)] + [ConfigurationCollection(typeof(SupportedFrameworkElement))] + public SupportedFrameworkElementCollection SupportedFrameworks + { + get { return (SupportedFrameworkElementCollection)base[supportedFrameworksProperty]; } + } + } +} diff --git a/src/WixToolset.Mba.Host/NativeMethods.cs b/src/WixToolset.Mba.Host/NativeMethods.cs new file mode 100644 index 00000000..b9fc85a0 --- /dev/null +++ b/src/WixToolset.Mba.Host/NativeMethods.cs @@ -0,0 +1,18 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Runtime.InteropServices; + + /// + /// Contains native constants, functions, and structures for this assembly. + /// + internal static class NativeMethods + { + #region Error Constants + internal const int E_NOTFOUND = unchecked((int)0x80070490); + internal const int E_UNEXPECTED = unchecked((int)0x8000ffff); + #endregion + } +} diff --git a/src/WixToolset.Mba.Host/Properties/AssemblyInfo.cs b/src/WixToolset.Mba.Host/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..8cee0ae9 --- /dev/null +++ b/src/WixToolset.Mba.Host/Properties/AssemblyInfo.cs @@ -0,0 +1,17 @@ +// 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. + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Managed Bootstrapper Application Host (WiX)")] +[assembly: AssemblyDescription("Managed Bootstrapper Application Host")] +[assembly: AssemblyProduct("WiX Toolset")] +[assembly: AssemblyCompany("WiX Toolset Team")] +[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")] + +// Types should not be visible to COM by default. +[assembly: ComVisible(false)] +[assembly: Guid("6f4e0cc9-8ad4-4b5a-a669-3aafff67a76f")] + +[assembly: CLSCompliantAttribute(true)] diff --git a/src/WixToolset.Mba.Host/SupportedFrameworkElement.cs b/src/WixToolset.Mba.Host/SupportedFrameworkElement.cs new file mode 100644 index 00000000..fe7fd2eb --- /dev/null +++ b/src/WixToolset.Mba.Host/SupportedFrameworkElement.cs @@ -0,0 +1,47 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Configuration; + + /// + /// Handler for the supportedFramework configuration section. + /// + public sealed class SupportedFrameworkElement : ConfigurationElement + { + private static readonly ConfigurationProperty versionProperty = new ConfigurationProperty("version", typeof(string), null, ConfigurationPropertyOptions.IsRequired); + private static readonly ConfigurationProperty runtimeVersionProperty = new ConfigurationProperty("runtimeVersion", typeof(string)); + + /// + /// Creates a new instance of the class. + /// + public SupportedFrameworkElement() + { + } + + /// + /// Gets the version of the supported framework. + /// + /// + /// The assembly specified by this name must contain a value matching the NETFX version registry key under + /// "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP". + /// + [ConfigurationProperty("version", IsRequired = true)] + public string Version + { + get { return (string)base[versionProperty]; } + set { base[versionProperty] = value; } + } + + /// + /// Gets the runtime version required by this supported framework. + /// + [ConfigurationProperty("runtimeVersion", IsRequired = false)] + public string RuntimeVersion + { + get { return (string)base[runtimeVersionProperty]; } + set { base[runtimeVersionProperty] = value; } + } + } +} diff --git a/src/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs b/src/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs new file mode 100644 index 00000000..12c7cf3e --- /dev/null +++ b/src/WixToolset.Mba.Host/SupportedFrameworkElementCollection.cs @@ -0,0 +1,36 @@ +// 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. + +namespace WixToolset.Mba.Host +{ + using System; + using System.Configuration; + using System.Diagnostics.CodeAnalysis; + + /// + /// Handler for the supportedFramework collection. + /// + [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")] + [ConfigurationCollection(typeof(SupportedFrameworkElement), AddItemName = "supportedFramework", CollectionType = ConfigurationElementCollectionType.BasicMap)] + public sealed class SupportedFrameworkElementCollection : ConfigurationElementCollection + { + public override ConfigurationElementCollectionType CollectionType + { + get { return ConfigurationElementCollectionType.BasicMap; } + } + + protected override string ElementName + { + get { return "supportedFramework"; } + } + + protected override ConfigurationElement CreateNewElement() + { + return new SupportedFrameworkElement(); + } + + protected override object GetElementKey(ConfigurationElement element) + { + return (element as SupportedFrameworkElement).Version; + } + } +} diff --git a/src/WixToolset.Mba.Host/WixToolset.Mba.Host.config b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.config new file mode 100644 index 00000000..a19b66f1 --- /dev/null +++ b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.config @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + + + + + + + + + + + diff --git a/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj new file mode 100644 index 00000000..ccdd67cf --- /dev/null +++ b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj @@ -0,0 +1,89 @@ + + + + + + + {F2BA1935-70FA-4156-B161-FD03850B4FAA} + WixToolset.Mba.Host + Library + WixToolset.Mba.Host + 0693;1591 + v2.0 + Managed Bootstrapper Application entry point + + + true + false + $(DefineConstants);DEBUG;TRACE + + + true + true + $(DefineConstants);TRACE + + + + + + + + + + + + + + + + + + + + + + + + ..\..\packages\WixToolset.Mba.Core.4.0.12\lib\net20\WixToolset.Mba.Core.dll + + + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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}. + + + + + + $(OutputPath)\$(AssemblyName).xml + + \ No newline at end of file diff --git a/src/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec new file mode 100644 index 00000000..101a6671 --- /dev/null +++ b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.nuspec @@ -0,0 +1,20 @@ + + + + $id$ + $version$ + WiX Toolset Team + WiX Toolset Team + + https://licenses.nuget.org/MS-RL + https://github.com/wixtoolset/Bal.wixext + false + $description$ + $copyright$ + + + + + + + diff --git a/src/WixToolset.Mba.Host/packages.config b/src/WixToolset.Mba.Host/packages.config new file mode 100644 index 00000000..eee20511 --- /dev/null +++ b/src/WixToolset.Mba.Host/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/mbahost/mbahost.cpp b/src/mbahost/mbahost.cpp index 444a95a8..7916ec9a 100644 --- a/src/mbahost/mbahost.cpp +++ b/src/mbahost/mbahost.cpp @@ -1,8 +1,7 @@ // 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" -#include // includes the generated assembly name macros. -#include "BalBaseBootstrapperApplicationProc.h" +#include // includes the generated assembly name macros. static const DWORD NET452_RELEASE = 379893; @@ -50,7 +49,6 @@ static HRESULT GetCLRHost( ); static HRESULT CreateManagedBootstrapperApplication( __in _AppDomain* pAppDomain, - __in IBootstrapperEngine* pEngine, __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, __inout BOOTSTRAPPER_CREATE_RESULTS* pResults ); @@ -109,7 +107,7 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate( { BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading managed bootstrapper application."); - hr = CreateManagedBootstrapperApplication(vpAppDomain, pEngine, pArgs, pResults); + hr = CreateManagedBootstrapperApplication(vpAppDomain, pArgs, pResults); BalExitOnFailure(hr, "Failed to create the managed bootstrapper application."); } else // fallback to the prerequisite BA. @@ -185,7 +183,7 @@ static HRESULT GetAppDomain( hr = GetAppBase(&sczAppBase); ExitOnFailure(hr, "Failed to get the host base path."); - hr = PathConcat(sczAppBase, L"WixToolset.Mba.Core.config", &sczConfigPath); + hr = PathConcat(sczAppBase, MBA_CONFIG_FILE_NAME, &sczConfigPath); ExitOnFailure(hr, "Failed to get the full path to the application configuration file."); // Check that the supported framework is installed. @@ -514,27 +512,20 @@ LExit: // Creates the bootstrapper app and returns it for the engine. static HRESULT CreateManagedBootstrapperApplication( __in _AppDomain* pAppDomain, - __in IBootstrapperEngine* pEngine, __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, __inout BOOTSTRAPPER_CREATE_RESULTS* pResults ) { HRESULT hr = S_OK; IBootstrapperApplicationFactory* pAppFactory = NULL; - IBootstrapperApplication* pApp = NULL; hr = CreateManagedBootstrapperApplicationFactory(pAppDomain, &pAppFactory); ExitOnFailure(hr, "Failed to create the factory to create the bootstrapper application."); - hr = pAppFactory->Create(pEngine, pArgs->pCommand, &pApp); + hr = pAppFactory->Create(pArgs, pResults); ExitOnFailure(hr, "Failed to create the bootstrapper application."); - pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; - pResults->pvBootstrapperApplicationProcContext = pApp; - pApp = NULL; - LExit: - ReleaseNullObject(pApp); ReleaseNullObject(pAppFactory); return hr; @@ -557,7 +548,7 @@ static HRESULT CreateManagedBootstrapperApplicationFactory( bstrAssemblyName = ::SysAllocString(MBA_ASSEMBLY_FULL_NAME); ExitOnNull(bstrAssemblyName, hr, E_OUTOFMEMORY, "Failed to allocate the full assembly name for the bootstrapper application factory."); - bstrTypeName = ::SysAllocString(L"WixToolset.Mba.Core.BootstrapperApplicationFactory"); + bstrTypeName = ::SysAllocString(MBA_ENTRY_TYPE); ExitOnNull(bstrTypeName, hr, E_OUTOFMEMORY, "Failed to allocate the full type name for the BA factory."); hr = pAppDomain->CreateInstance(bstrAssemblyName, bstrTypeName, &pObj); diff --git a/src/mbahost/mbahost.vcxproj b/src/mbahost/mbahost.vcxproj index c7a0b69f..30bffb54 100644 --- a/src/mbahost/mbahost.vcxproj +++ b/src/mbahost/mbahost.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -52,13 +52,14 @@ - ..\..\packages\WixToolset.Mba.Core.4.0.9\build\native\include\;%(AdditionalIncludeDirectories) + $(BaseOutputPath)obj;%(AdditionalIncludeDirectories) - - + + {f2ba1935-70fa-4156-b161-fd03850b4faa} + @@ -67,13 +68,9 @@ 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}. - - + + - - - - - + \ No newline at end of file diff --git a/src/mbahost/packages.config b/src/mbahost/packages.config index c616685e..f209d5fb 100644 --- a/src/mbahost/packages.config +++ b/src/mbahost/packages.config @@ -1,9 +1,7 @@  - - - + + - \ No newline at end of file diff --git a/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h index 8142b26c..d2b53718 100644 --- a/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h +++ b/src/test/WixToolsetTest.MbaHost/TestManagedBootstrapperApplication.h @@ -8,7 +8,6 @@ namespace MbaHost namespace Native { using namespace System; - using namespace WixToolset::BootstrapperCore; using namespace WixToolset::Mba::Core; public ref class TestManagedBootstrapperApplication : BootstrapperApplication diff --git a/src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Core.config b/src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Core.config deleted file mode 100644 index 18bfbfc2..00000000 --- a/src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Core.config +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - -
- - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Host.config b/src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Host.config new file mode 100644 index 00000000..53a3d29e --- /dev/null +++ b/src/test/WixToolsetTest.MbaHost/WixToolset.Mba.Host.config @@ -0,0 +1,26 @@ + + + + + + + +
+ + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj index b82f9194..d8143880 100644 --- a/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj +++ b/src/test/WixToolsetTest.MbaHost/WixToolsetTest.MbaHost.vcxproj @@ -1,8 +1,8 @@ - - + + @@ -48,7 +48,10 @@ - + + + False + @@ -65,11 +68,8 @@ ..\..\..\packages\xunit.extensibility.execution.2.4.0\lib\net452\xunit.execution.desktop.dll - - ..\..\..\packages\WixToolset.BootstrapperCore.4.0.8\lib\net20\WixToolset.BootstrapperCore.dll - - ..\..\..\packages\WixToolset.Mba.Core.4.0.9\lib\net20\WixToolset.Mba.Core.dll + ..\..\..\packages\WixToolset.Mba.Core.4.0.12\lib\net20\WixToolset.Mba.Core.dll @@ -85,8 +85,8 @@ 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/test/WixToolsetTest.MbaHost/packages.config b/src/test/WixToolsetTest.MbaHost/packages.config index c0615f19..4e9838f6 100644 --- a/src/test/WixToolsetTest.MbaHost/packages.config +++ b/src/test/WixToolsetTest.MbaHost/packages.config @@ -8,9 +8,8 @@ - - - + + - + \ No newline at end of file diff --git a/src/wixlib/Mba.wxs b/src/wixlib/Mba.wxs index 05b57100..a99b41d8 100644 --- a/src/wixlib/Mba.wxs +++ b/src/wixlib/Mba.wxs @@ -40,8 +40,7 @@ - - + diff --git a/src/wixstdba/packages.config b/src/wixstdba/packages.config index 7c46d4c5..f209d5fb 100644 --- a/src/wixstdba/packages.config +++ b/src/wixstdba/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/wixstdba/wixstdba.vcxproj b/src/wixstdba/wixstdba.vcxproj index c3d3ede7..b0f767fb 100644 --- a/src/wixstdba/wixstdba.vcxproj +++ b/src/wixstdba/wixstdba.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -107,8 +107,8 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc" 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}. - - + + -- cgit v1.2.3-55-g6feb