From c9d14eb51e4b8458fd5e2738fcc7d1c1129ad22e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sun, 18 Oct 2020 22:37:12 -0500 Subject: WIXFEAT:6210 Change data type of versions to strings. --- src/WixToolset.Mba.Core/BootstrapperApplication.cs | 24 +++--- src/WixToolset.Mba.Core/Engine.cs | 86 +++++++++++++++++++--- src/WixToolset.Mba.Core/EventArgs.cs | 36 ++++----- .../IBootstrapperApplication.cs | 12 +-- src/WixToolset.Mba.Core/IBootstrapperEngine.cs | 5 +- src/WixToolset.Mba.Core/IEngine.cs | 19 ++--- src/WixToolset.Mba.Core/PackageInfo.cs | 4 +- 7 files changed, 121 insertions(+), 65 deletions(-) (limited to 'src/WixToolset.Mba.Core') diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs index 9ee909dc..472c553a 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs @@ -1130,9 +1130,9 @@ namespace WixToolset.Mba.Core return args.HResult; } - int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, long version, ref bool fCancel, ref bool fIgnoreBundle) + int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, ref bool fCancel, ref bool fIgnoreBundle) { - DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, version, fCancel, fIgnoreBundle); + DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fCancel, fIgnoreBundle); this.OnDetectForwardCompatibleBundle(args); fCancel = args.Cancel; @@ -1150,9 +1150,9 @@ namespace WixToolset.Mba.Core return args.HResult; } - int IBootstrapperApplication.OnDetectUpdate(string wzUpdateLocation, long dw64Size, long dw64Version, string wzTitle, string wzSummary, string wzContentType, string wzContent, ref bool fCancel, ref bool fStopProcessingUpdates) + int IBootstrapperApplication.OnDetectUpdate(string wzUpdateLocation, long dw64Size, string wzVersion, string wzTitle, string wzSummary, string wzContentType, string wzContent, ref bool fCancel, ref bool fStopProcessingUpdates) { - DetectUpdateEventArgs args = new DetectUpdateEventArgs(wzUpdateLocation, dw64Size, dw64Version, wzTitle, wzSummary, wzContentType, wzContent, fCancel, fStopProcessingUpdates); + DetectUpdateEventArgs args = new DetectUpdateEventArgs(wzUpdateLocation, dw64Size, wzVersion, wzTitle, wzSummary, wzContentType, wzContent, fCancel, fStopProcessingUpdates); this.OnDetectUpdate(args); fCancel = args.Cancel; @@ -1169,9 +1169,9 @@ namespace WixToolset.Mba.Core return args.HResult; } - int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, long version, RelatedOperation operation, ref bool fCancel) + int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, RelatedOperation operation, ref bool fCancel) { - DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, version, operation, fCancel); + DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, wzVersion, operation, fCancel); this.OnDetectRelatedBundle(args); fCancel = args.Cancel; @@ -1187,18 +1187,18 @@ namespace WixToolset.Mba.Core return args.HResult; } - int IBootstrapperApplication.OnDetectCompatibleMsiPackage(string wzPackageId, string wzCompatiblePackageId, long dw64CompatiblePackageVersion, ref bool fCancel) + int IBootstrapperApplication.OnDetectCompatibleMsiPackage(string wzPackageId, string wzCompatiblePackageId, string wzCompatiblePackageVersion, ref bool fCancel) { - DetectCompatibleMsiPackageEventArgs args = new DetectCompatibleMsiPackageEventArgs(wzPackageId, wzCompatiblePackageId, dw64CompatiblePackageVersion, fCancel); + DetectCompatibleMsiPackageEventArgs args = new DetectCompatibleMsiPackageEventArgs(wzPackageId, wzCompatiblePackageId, wzCompatiblePackageVersion, fCancel); this.OnDetectCompatibleMsiPackage(args); fCancel = args.Cancel; return args.HResult; } - int IBootstrapperApplication.OnDetectRelatedMsiPackage(string wzPackageId, string wzUpgradeCode, string wzProductCode, bool fPerMachine, long version, RelatedOperation operation, ref bool fCancel) + int IBootstrapperApplication.OnDetectRelatedMsiPackage(string wzPackageId, string wzUpgradeCode, string wzProductCode, bool fPerMachine, string wzVersion, RelatedOperation operation, ref bool fCancel) { - DetectRelatedMsiPackageEventArgs args = new DetectRelatedMsiPackageEventArgs(wzPackageId, wzUpgradeCode, wzProductCode, fPerMachine, version, operation, fCancel); + DetectRelatedMsiPackageEventArgs args = new DetectRelatedMsiPackageEventArgs(wzPackageId, wzUpgradeCode, wzProductCode, fPerMachine, wzVersion, operation, fCancel); this.OnDetectRelatedMsiPackage(args); fCancel = args.Cancel; @@ -1268,9 +1268,9 @@ namespace WixToolset.Mba.Core return args.HResult; } - int IBootstrapperApplication.OnPlanCompatibleMsiPackageBegin(string wzPackageId, string wzCompatiblePackageId, long dw64CompatiblePackageVersion, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + int IBootstrapperApplication.OnPlanCompatibleMsiPackageBegin(string wzPackageId, string wzCompatiblePackageId, string wzCompatiblePackageVersion, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) { - PlanCompatibleMsiPackageBeginEventArgs args = new PlanCompatibleMsiPackageBeginEventArgs(wzPackageId, wzCompatiblePackageId, dw64CompatiblePackageVersion, recommendedState, pRequestedState, fCancel); + PlanCompatibleMsiPackageBeginEventArgs args = new PlanCompatibleMsiPackageBeginEventArgs(wzPackageId, wzCompatiblePackageId, wzCompatiblePackageVersion, recommendedState, pRequestedState, fCancel); this.OnPlanCompatibleMsiPackageBegin(args); pRequestedState = args.State; diff --git a/src/WixToolset.Mba.Core/Engine.cs b/src/WixToolset.Mba.Core/Engine.cs index 98427cfa..e3ad097a 100644 --- a/src/WixToolset.Mba.Core/Engine.cs +++ b/src/WixToolset.Mba.Core/Engine.cs @@ -178,15 +178,21 @@ namespace WixToolset.Mba.Core } } - public Version GetVariableVersion(string name) + public string GetVariableVersion(string name) { - int ret = this.engine.GetVariableVersion(name, out long value); - if (NativeMethods.S_OK != ret) + int length; + IntPtr pUniString = this.getVersionVariable(name, out length); + try { - throw new Win32Exception(ret); + return Marshal.PtrToStringUni(pUniString, length); + } + finally + { + if (IntPtr.Zero != pUniString) + { + Marshal.FreeCoTaskMem(pUniString); + } } - - return LongToVersion(value); } public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments) @@ -224,12 +230,12 @@ namespace WixToolset.Mba.Core this.engine.SetDownloadSource(packageOrContainerId, payloadId, url, user, password); } - public void SetVariable(string name, long value) + public void SetVariableNumeric(string name, long value) { this.engine.SetVariableNumeric(name, value); } - public void SetVariable(string name, SecureString value, bool formatted) + public void SetVariableString(string name, SecureString value, bool formatted) { IntPtr pValue = Marshal.SecureStringToCoTaskMemUnicode(value); try @@ -242,7 +248,7 @@ namespace WixToolset.Mba.Core } } - public void SetVariable(string name, string value, bool formatted) + public void SetVariableString(string name, string value, bool formatted) { IntPtr pValue = Marshal.StringToCoTaskMemUni(value); try @@ -255,10 +261,17 @@ namespace WixToolset.Mba.Core } } - public void SetVariable(string name, Version value) + public void SetVariableVersion(string name, string value) { - long version = VersionToLong(value); - this.engine.SetVariableVersion(name, version); + IntPtr pValue = Marshal.StringToCoTaskMemUni(value); + try + { + this.engine.SetVariableVersion(name, pValue); + } + finally + { + Marshal.FreeCoTaskMem(pValue); + } } public int SendEmbeddedError(int errorCode, string message, int uiHint) @@ -329,6 +342,55 @@ namespace WixToolset.Mba.Core } } + /// + /// Gets the variable given by as a version string. + /// + /// The name of the variable to get. + /// The length of the Unicode string. + /// The value by a pointer to a Unicode string. Must be freed by Marshal.FreeCoTaskMem. + /// An error occurred getting the variable. + internal IntPtr getVersionVariable(string name, out int length) + { + int capacity = InitialBufferSize; + bool success = false; + IntPtr pValue = Marshal.AllocCoTaskMem(capacity * UnicodeEncoding.CharSize); + try + { + // Get the size of the buffer. + int ret = this.engine.GetVariableVersion(name, pValue, ref capacity); + if (NativeMethods.E_INSUFFICIENT_BUFFER == ret || NativeMethods.E_MOREDATA == ret) + { + // Don't need to add 1 for the null terminator, the engine already includes that. + pValue = Marshal.ReAllocCoTaskMem(pValue, capacity * UnicodeEncoding.CharSize); + ret = this.engine.GetVariableVersion(name, pValue, ref capacity); + } + + if (NativeMethods.S_OK != ret) + { + throw Marshal.GetExceptionForHR(ret); + } + + // The engine only returns the exact length of the string if the buffer was too small, so calculate it ourselves. + for (length = 0; length < capacity; ++length) + { + if (0 == Marshal.ReadInt16(pValue, length * UnicodeEncoding.CharSize)) + { + break; + } + } + + success = true; + return pValue; + } + finally + { + if (!success && IntPtr.Zero != pValue) + { + Marshal.FreeCoTaskMem(pValue); + } + } + } + /// /// Initialize a SecureString with the given Unicode string. /// diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs index e739a853..71bd15e1 100644 --- a/src/WixToolset.Mba.Core/EventArgs.cs +++ b/src/WixToolset.Mba.Core/EventArgs.cs @@ -241,14 +241,14 @@ namespace WixToolset.Mba.Core /// The version of the forward compatible bundle detected. /// The cancel recommendation from the engine. /// The ignore recommendation from the engine. - public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, long version, bool cancelRecommendation, bool ignoreBundleRecommendation) + public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool cancelRecommendation, bool ignoreBundleRecommendation) : base(cancelRecommendation) { this.BundleId = bundleId; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; - this.Version = Engine.LongToVersion(version); + this.Version = version; this.IgnoreBundle = ignoreBundleRecommendation; } @@ -275,7 +275,7 @@ namespace WixToolset.Mba.Core /// /// Gets the version of the forward compatible bundle detected. /// - public Version Version { get; private set; } + public string Version { get; private set; } /// /// Instructs the engine whether to use the forward compatible bundle. @@ -330,12 +330,12 @@ namespace WixToolset.Mba.Core /// The content of the updated bundle. /// The recommendation from the engine. /// The recommendation from the engine. - public DetectUpdateEventArgs(string updateLocation, long size, long version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) + public DetectUpdateEventArgs(string updateLocation, long size, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) : base(cancelRecommendation) { this.UpdateLocation = updateLocation; this.Size = size; - this.Version = Engine.LongToVersion(version); + this.Version = version; this.Title = title; this.Summary = summary; this.ContentType = contentType; @@ -356,7 +356,7 @@ namespace WixToolset.Mba.Core /// /// Gets the version of the updated bundle. /// - public Version Version { get; private set; } + public string Version { get; private set; } /// /// Gets the title of the the updated bundle. @@ -423,14 +423,14 @@ namespace WixToolset.Mba.Core /// The version of the related bundle detected. /// The operation that will be taken on the detected bundle. /// The recommendation from the engine. - public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, long version, RelatedOperation operation, bool cancelRecommendation) + public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) : base(cancelRecommendation) { this.ProductCode = productCode; this.RelationType = relationType; this.BundleTag = bundleTag; this.PerMachine = perMachine; - this.Version = Engine.LongToVersion(version); + this.Version = version; this.Operation = operation; } @@ -457,7 +457,7 @@ namespace WixToolset.Mba.Core /// /// Gets the version of the related bundle detected. /// - public Version Version { get; private set; } + public string Version { get; private set; } /// /// Gets the operation that will be taken on the detected bundle. @@ -501,12 +501,12 @@ namespace WixToolset.Mba.Core /// The identity of the compatible package that was detected. /// The version of the compatible package that was detected. /// The recommendation from the engine. - public DetectCompatibleMsiPackageEventArgs(string packageId, string compatiblePackageId, long compatiblePackageVersion, bool cancelRecommendation) + public DetectCompatibleMsiPackageEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.CompatiblePackageId = compatiblePackageId; - this.CompatiblePackageVersion = Engine.LongToVersion(compatiblePackageVersion); + this.CompatiblePackageVersion = compatiblePackageVersion; } /// @@ -522,7 +522,7 @@ namespace WixToolset.Mba.Core /// /// Gets the version of the compatible package that was detected. /// - public Version CompatiblePackageVersion { get; private set; } + public string CompatiblePackageVersion { get; private set; } } /// @@ -541,14 +541,14 @@ namespace WixToolset.Mba.Core /// The version of the related package detected. /// The operation that will be taken on the detected package. /// The recommendation from the engine. - public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, long version, RelatedOperation operation, bool cancelRecommendation) + public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.UpgradeCode = upgradeCode; this.ProductCode = productCode; this.PerMachine = perMachine; - this.Version = Engine.LongToVersion(version); + this.Version = version; this.Operation = operation; } @@ -575,7 +575,7 @@ namespace WixToolset.Mba.Core /// /// Gets the version of the related package detected. /// - public Version Version { get; private set; } + public string Version { get; private set; } /// /// Gets the operation that will be taken on the detected package. @@ -813,12 +813,12 @@ namespace WixToolset.Mba.Core /// The recommended request state for the compatible package. /// The requested state for the compatible package. /// The recommendation from the engine. - public PlanCompatibleMsiPackageBeginEventArgs(string packageId, string compatiblePackageId, long compatiblePackageVersion, RequestState recommendedState, RequestState state, bool cancelRecommendation) + public PlanCompatibleMsiPackageBeginEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, RequestState recommendedState, RequestState state, bool cancelRecommendation) : base(cancelRecommendation) { this.PackageId = packageId; this.CompatiblePackageId = compatiblePackageId; - this.CompatiblePackageVersion = Engine.LongToVersion(compatiblePackageVersion); + this.CompatiblePackageVersion = compatiblePackageVersion; this.RecommendedState = recommendedState; this.State = state; } @@ -836,7 +836,7 @@ namespace WixToolset.Mba.Core /// /// Gets the version of the compatible package detected. /// - public Version CompatiblePackageVersion { get; private set; } + public string CompatiblePackageVersion { get; private set; } /// /// Gets the recommended state to use for the compatible package for planning. diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs index fa655282..0d79122d 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs @@ -45,7 +45,7 @@ namespace WixToolset.Mba.Core [MarshalAs(UnmanagedType.U4)] RelationType relationType, [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.U8)] long dw64Version, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle ); @@ -63,7 +63,7 @@ namespace WixToolset.Mba.Core int OnDetectUpdate( [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, [MarshalAs(UnmanagedType.U8)] long dw64Size, - [MarshalAs(UnmanagedType.U8)] long dw64Version, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, [MarshalAs(UnmanagedType.LPWStr)] string wzTitle, [MarshalAs(UnmanagedType.LPWStr)] string wzSummary, [MarshalAs(UnmanagedType.LPWStr)] string wzContentType, @@ -86,7 +86,7 @@ namespace WixToolset.Mba.Core [MarshalAs(UnmanagedType.U4)] RelationType relationType, [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.U8)] long dw64Version, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, [MarshalAs(UnmanagedType.U4)] RelatedOperation operation, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel ); @@ -103,7 +103,7 @@ namespace WixToolset.Mba.Core int OnDetectCompatibleMsiPackage( [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, - [MarshalAs(UnmanagedType.U8)] long dw64CompatiblePackageVersion, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageVersion, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel ); @@ -114,7 +114,7 @@ namespace WixToolset.Mba.Core [MarshalAs(UnmanagedType.LPWStr)] string wzUpgradeCode, [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.U8)] long dw64Version, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, [MarshalAs(UnmanagedType.U4)] RelatedOperation operation, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel ); @@ -181,7 +181,7 @@ namespace WixToolset.Mba.Core int OnPlanCompatibleMsiPackageBegin( [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, - [MarshalAs(UnmanagedType.U8)] long dw64CompatiblePackageVersion, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageVersion, [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, [MarshalAs(UnmanagedType.Bool)] ref bool fCancel diff --git a/src/WixToolset.Mba.Core/IBootstrapperEngine.cs b/src/WixToolset.Mba.Core/IBootstrapperEngine.cs index 85ca8693..584e0f6d 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperEngine.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperEngine.cs @@ -36,7 +36,8 @@ namespace WixToolset.Mba.Core [PreserveSig] int GetVariableVersion( [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - [MarshalAs(UnmanagedType.U8)] out long pqwValue + IntPtr wzValue, + [MarshalAs(UnmanagedType.U4)] ref int pcchValue ); [PreserveSig] @@ -112,7 +113,7 @@ namespace WixToolset.Mba.Core void SetVariableVersion( [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - [MarshalAs(UnmanagedType.U8)] long qwValue + IntPtr wzValue ); void CloseSplashScreen(); diff --git a/src/WixToolset.Mba.Core/IEngine.cs b/src/WixToolset.Mba.Core/IEngine.cs index 84d93bb0..b486e51d 100644 --- a/src/WixToolset.Mba.Core/IEngine.cs +++ b/src/WixToolset.Mba.Core/IEngine.cs @@ -96,7 +96,7 @@ namespace WixToolset.Mba.Core /// Gets variables for the engine. /// /// The name of the variable. - Version GetVariableVersion(string name); + string GetVariableVersion(string name); /// /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. @@ -161,7 +161,7 @@ namespace WixToolset.Mba.Core /// /// The name of the variable. /// The value to set. - void SetVariable(string name, long value); + void SetVariableNumeric(string name, long value); /// /// Sets string variables for the engine using SecureStrings. @@ -169,7 +169,7 @@ namespace WixToolset.Mba.Core /// The name of the variable. /// The value to set. /// False if the value is a literal string. - void SetVariable(string name, SecureString value, bool formatted); + void SetVariableString(string name, SecureString value, bool formatted); /// /// Sets string variables for the engine. @@ -177,21 +177,14 @@ namespace WixToolset.Mba.Core /// The name of the variable. /// The value to set. /// False if the value is a literal string. - void SetVariable(string name, string value, bool formatted); + void SetVariableString(string name, string value, bool formatted); /// - /// Sets variables for the engine. - /// - /// The class can keep track of when the build and revision fields are undefined, but the engine can't. - /// Therefore, the build and revision fields must be defined when setting a variable. - /// Use the NormalizeVersion method to make sure the engine can accept the Version. - /// - /// To keep track of versions without build or revision fields, use StringVariables instead. + /// Sets version variables for the engine. /// /// The name of the variable. /// The value to set. - /// The given was invalid. - void SetVariable(string name, Version value); + void SetVariableVersion(string name, string value); /// /// Sends error message when embedded. diff --git a/src/WixToolset.Mba.Core/PackageInfo.cs b/src/WixToolset.Mba.Core/PackageInfo.cs index d3199c08..d54438f5 100644 --- a/src/WixToolset.Mba.Core/PackageInfo.cs +++ b/src/WixToolset.Mba.Core/PackageInfo.cs @@ -159,11 +159,11 @@ namespace WixToolset.Mba.Core } } - public static IPackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, Version version) + public static IPackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, string version) { PackageInfo package = new PackageInfo(); package.Id = id; - package.Version = version.ToString(); + package.Version = version; switch (relationType) { -- cgit v1.2.3-55-g6feb