[wix-users] Bundle Update Element
Stephen Downard
stephen.downard at medfusion.com
Wed May 18 09:05:24 PDT 2016
Jacob,
Thank you for the information! I have build issues with the project. I executed with success the initial msbuild command from a Visual Studio Command Prompt. After loading the Setup project within VS the solution fails to build. I manually added the Core project to the WixBA solution that resolved some errors. What am I missing?
Severity Code Description Project File Line Suppression State
Error CA1811 'WixDistribution.ReplacePlaceholders(string, Assembly)' appears to have no upstream public or protected callers. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\common\WixDistribution.cs 47 Active
Error CA1811 'WixDistribution.TryGetAttribute<T>(Assembly, out T)' appears to have no upstream public or protected callers. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\common\WixDistribution.cs 101 Active
Error CA1305 Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Engine.NormalizeVersion(Version)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 624 Active
Error CA1305 Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Engine.NormalizeVersion(Version)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 628 Active
Error CA1305 Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Engine.NormalizeVersion(Version)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 632 Active
Error CA1305 Because the behavior of 'string.Format(string, object)' could vary based on the current user's locale settings, replace this call in 'Engine.NormalizeVersion(Version)' with a call to 'string.Format(IFormatProvider, string, params object[])'. If the result of 'string.Format(IFormatProvider, string, params object[])' will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 640 Active
Error CA1720 Consider replacing the language-specific data type identifier 'Long' in member name 'Engine.VersionToLong(Version)' with either a language-independent equivalent or a more generic term, such as 'value'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 585 Active
Error CA1062 In externally visible method 'Engine.VersionToLong(Version)', validate parameter 'version' before using it. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 588 Active
Error CA1704 In method 'BootstrapperException.BootstrapperException(int)', correct the spelling of 'hr' in parameter name 'hr' or remove it entirely if it represents any sort of Hungarian notation. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Exceptions.cs 18 Active
Error CA2000 In method 'Engine.convertToSecureString(IntPtr, int)', object 'value' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'value' before all references to it are out of scope. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 570 Active
Error CA1704 In method 'Engine.Detect(IntPtr)', correct the spelling of 'hwnd' in parameter name 'hwndParent' or remove it entirely if it represents any sort of Hungarian notation. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 244 Active
Error CA1704 In method 'Engine.LaunchApprovedExe(IntPtr, string, string)', correct the spelling of 'hwnd' in parameter name 'hwndParent' or remove it entirely if it represents any sort of Hungarian notation. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 346 Active
Error CA1704 In method 'Engine.LaunchApprovedExe(IntPtr, string, string, int)', correct the spelling of 'hwnd' in parameter name 'hwndParent' or remove it entirely if it represents any sort of Hungarian notation. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 358 Active
Error CA1823 It appears that field 'WixDistribution.TelemetryUrlFormat' is never used or is only ever assigned to. Use this field or remove it. core Active
Error CA5122 P/Invoke method 'NativeMethods.CommandLineToArgvW(string, out int)' is marked safe-critical. Since P/Invokes may only be called by critical code, this declaration should either be marked as security critical, or have its annotation removed entirely to avoid being misleading. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\NativeMethods.cs 25 Active
Error CA5122 P/Invoke method 'NativeMethods.LocalFree(IntPtr)' is marked safe-critical. Since P/Invokes may only be called by critical code, this declaration should either be marked as security critical, or have its annotation removed entirely to avoid being misleading. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\NativeMethods.cs 31 Active
Error CA1710 Rename 'ApplyPhaseCountArgs' to end in 'EventArgs'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\EventArgs.cs 1156 Active
Error CA1710 Rename 'LaunchApprovedExeBeginArgs' to end in 'EventArgs'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\EventArgs.cs 2222 Active
Error CA1710 Rename 'LaunchApprovedExeCompleteArgs' to end in 'EventArgs'. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\EventArgs.cs 2233 Active
Error CA1822 The 'this' parameter (or 'Me' in Visual Basic) of 'Engine.convertToSecureString(IntPtr, int)' is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate. core C:\github\https---github.com-wixtoolset-wix3.git\wix3-develop\src\ext\BalExtension\mba\core\Engine.cs 564 Active
Thanks,
Steve
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Tuesday, May 17, 2016 12:19 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Bundle Update Element
This topic really deserves a blog post, but as of yet there isn't one.
Bundles need the <Update location="URL" /> in order for the engine to trigger a call to DetectUpdate* methods. WiX BA has a MBA example of doing self-updates, and I have a slightly modified WixStdBA that shows how it's possible to get WixStdBA to do it. https://github.com/wixtoolset/wix3/compare/develop...jchoover:develop-3.10-WixStdBA
The brief version is WiX can take and parse an Atom feed (Ex: http://wixtoolset.org/releases/feed/v3.10 ) and then notify the BA of the data to allow the BA to decide if it's an update or not. My changes to WixStdBA are to respond to those events, though the WixBA also has a managed implementation here: https://github.com/wixtoolset/wix3/blob/develop/src/Setup/WixBA/UpdateViewModel.cs
You are looking for DetectUpdateBegin / DetectUpdate / DetectUpdateComplete events.
>From an application point of view, as I needed it to check for updates on startup, I passed the bundle upgrade code to my application during installation. On startup of the application, I use that upgrade code to query for the bundles cached location via a light weight wrapper DLL around https://github.com/wixtoolset/wix3/blob/develop/src/libs/dutil/butil.cpp and querying for the ModifyPath "well known" bundle property. From there, I manually stripped off the /modify and added /checkupdate.
Users can also alternatively go into ARP, select modify on the install, and then manually hit the button to check for updates.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Stephen Downard
Sent: Tuesday, May 17, 2016 9:58 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Bundle Update Element
I have been reading posts trying to understand how the Bundle supports automatic updating. I have read that the Update Element does not work by default. So my question is does the Bundle inherently support automatically updating? If yes, how is the bundle configured to query endpoint and what's the formatting of the endpoint data? How is the query triggered? If no, is there any documentation that details how design the bootstrapper?
Thanks!
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list