Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1142985%22%20slang%3D%22en-US%22%3EBuilding%20installers%20for%20your%20Windows%20applications%20with%20Advanced%20Installer%20and%20Azure%20DevOps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1142985%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20follow%20my%20activities%2C%20like%20the%20articles%20I%20publish%20on%20this%20blog%20or%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.syncfusion.com%2Febooks%2Fmsix-succinctly%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethe%20recent%20book%20I've%20published%20about%20MSIX%3C%2FA%3E%2C%20you'll%20know%20that%20one%20of%20the%20reasons%20why%20I%20like%20MSIX%20from%20a%20developer%20perspective%20is%20that%20it%20makes%20really%20easy%20to%20enable%20a%20CI%2FCD%20pipeline%20for%20Windows%20desktop%20applications.%20Thanks%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fdesktop%2Fdesktop-to-uwp-packaging-dot-net%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ethe%20Windows%20Application%20Packaging%20Project%3C%2FA%3E%2C%20we%20can%20easily%20automate%20the%20creation%20of%20a%20MSIX%20package%20simply%20by%20adding%20it%20to%20our%20solution%20and%20running%20a%20build.%20And%20thanks%20to%20features%20like%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fapp-installer%2Fapp-installer-root%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EApp%20Installer%3C%2FA%3E%2C%20we%20can%20easily%20deploy%20the%20generated%20MSIX%20package%20to%20a%20website%20and%20support%20automatic%20updates%20without%20changing%20the%20code%20or%20having%20to%20setup%20your%20own%20service.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20in%20many%20cases%20you%20may%20already%20have%20an%20installer%20definition%20created%20with%20a%203rd%20party%20tool.%20Popular%20authoring%20tools%2C%20like%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.advancedinstaller.com%2Fmsix-packaging.html%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAdvanced%20Installer%3C%2FA%3E%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.flexerasoftware.com%2Fblog%2Fsoftware-installation%2F2019%2F04%2Fits-msix-time-announcing-installshield-2019%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EInstallShield%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.firegiant.com%2Fproducts%2Fwix-expansion-pack%2Fmsix%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWix%3C%2FA%3E%2C%20are%20able%20to%20generate%20a%20MSIX%20package%20out%20from%20an%20installer%20project%2C%20making%20easier%20to%20reuse%20the%20work%20you%20may%20already%20have%20done%20to%20generate%20MSI%20installers%20in%20the%20past.%20Additionally%2C%20thanks%20to%20these%20tools%2C%20you%20have%20the%20opportunity%20to%20use%20the%20same%20project%20to%20generate%20at%20the%20same%20time%20a%20MSI%20and%20a%20MSIX%2C%20helping%20you%20to%20support%20customers%20who%20might%20not%20have%20migrated%20yet%20to%20Windows%2010%20and%20who%20are%20unable%20to%20use%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fmsix-core%2Fmsixcore%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMSIX%20Core%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(for%20example%2C%20because%20it's%20a%20consumer%20application).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20about%20enabling%20a%20CI%2FCD%20pipeline%20in%20this%20scenario%3F%20In%20this%20blog%20post%20we're%20going%20to%20see%20an%20example%20on%20how%20to%20achieve%20this%20task%20with%20Advanced%20Installer.%20Why%20did%20I%20choose%20this%20product%3F%20Well%2C%20other%20than%20because%20it's%20a%20really%20good%20software%2C%20the%20Advanced%20Installer%20team%20has%20created%20a%20task%20for%20Azure%20DevOps%20which%20is%20able%20to%20build%20an%20Advanced%20Installer%20project%20stored%20on%20the%20repository.%20And%2C%20most%20of%20all%2C%20the%20task%20is%20able%20to%20download%20the%20most%20recent%20version%20of%20Advanced%20Installer%20and%20install%20it%20on%20the%20machine%20without%20requiring%20any%20user%20intervention.%20This%20means%20that%20we%20are%20not%20forced%20to%20create%20a%20self-hosted%20agent%20where%20to%20manually%20install%20the%20tool%2C%20but%20we%20can%20leverage%20the%20built-in%20agents%20provided%20by%20Azure%20DevOps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet's%20start!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22the-advanced-installer-project%22%20id%3D%22toc-hId-1085312121%22%20id%3D%22toc-hId-1085312124%22%3EThe%20Advanced%20Installer%20project%3C%2FH3%3E%0A%3CP%3EAs%20a%20starting%20point%2C%20I%20will%20use%20a%20simple%20Windows%20Forms%20application%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FWindows-AppConsult-Samples-DesktopBridge%2Ftree%2Fmaster%2FBlog-Scripting%2FMyEmployees%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMyEmployees%3C%2FA%3E%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fwindows-dev-appconsult%2Fmsix-how-to-copy-data-outside-the-installation-folder-during-the%2Fba-p%2F1133602%22%20target%3D%22_blank%22%3Ewhich%20I%20have%20used%20also%20in%20other%20posts%3C%2FA%3E.%20However%2C%20the%20main%20difference%20is%20that%2C%20this%20time%2C%20the%20solution%20doesn't%20have%20a%20Windows%20Application%20Packaging%20Project.%20We're%20going%20to%20use%20Advanced%20Installer%20to%20create%20a%20MSIX%20package%2C%20together%20with%20a%20MSI.%20In%20a%20real%20scenario%20probably%20you%20already%20have%20the%20setup%20created%20with%20Advanced%20Installer%20but%2C%20to%20understand%20better%20how%20it%20works%2C%20let's%20create%20a%20new%20one.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%20you%20need%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.advancedinstaller.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edownload%20and%20install%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ethe%20latest%20Advanced%20Installer%20version.%20It's%20a%20paid%20product%2C%20but%20it%20offers%20a%2030%20days%20trial%20and%20also%20a%20free%20tier.%20Once%20you%20have%20launched%20it%2C%20you%20will%20find%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ETemplates%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20one%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EVisual%20Studio%20Application%3C%2FSTRONG%3E%2C%20which%20is%20able%20to%20connect%20directly%20to%20a%20Visual%20Studio%20solution%2C%20like%20in%20our%20case.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168300iD604D83E0BE0C988%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22VisualStudioApplication.png%22%20title%3D%22VisualStudioApplication.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFirst%20you%20will%20be%20asked%20the%20name%20and%20the%20publisher%20of%20your%20application%2C%20followed%20by%20the%20distribution%20type.%20For%20the%20moment%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EMSI%20setup%20file%3C%2FSTRONG%3E.%20We're%20going%20to%20add%20the%20MSIX%20definition%20later.%20In%20the%20next%20step%20you%20will%20be%20asked%20where%20to%20save%20the%20project%2C%20using%20a%20file%20with%20.aip%20extension.%20You%20will%20need%20to%20add%20this%20file%20in%20a%20folder%20of%20your%20project%2C%20since%20we'll%20need%20to%20commit%20it%20to%20our%20repository%2C%20in%20order%20to%20use%20the%20Azure%20DevOps%20task.%20In%20my%20case%2C%20I've%20created%20a%20folder%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EProjects%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Einside%20the%20solution.%20The%20project%20output%20folder%20will%20be%20automatically%20changed%20to%20point%20to%20the%20same%20location%2C%20but%20I%20suggest%20you%20to%20choose%20a%20different%20one%2C%20outside%20the%20repository.%20This%20folder%2C%20in%20fact%2C%20will%20contain%20the%20various%20artifacts%20(like%20the%20generated%20MSI%20or%20MSIX%20package)%20and%20we%20don't%20want%20to%20include%20them%20in%20the%20source%20code.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20next%20step%2C%20you%20must%20choose%20the%20Visual%20Studio%20solution%20which%20contains%20your%20project.%20In%20my%20case%2C%20I've%20chosen%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EMyEmployees.sln%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efile.%20Advanced%20Installer%20will%20analyze%20the%20solution%20and%20it%20will%20ask%20you%20which%20configurations%20you%20want%20to%20import.%20Feel%20free%20to%20choose%20the%20ones%20that%20make%20sense%20for%20your%20project.%20In%20my%20case%2C%20for%20example%2C%20I%20want%20to%20distribute%20only%20the%2064%20bit%20version%2C%20built%20in%20Release%20mode%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20503px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168301iD355EF80AD9C892F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22BuildConfiguration.png%22%20title%3D%22BuildConfiguration.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20next%20step%20you%20will%20be%20asked%20to%20select%20which%20files%2C%20among%20the%20ones%20that%20are%20created%20as%20build%20output%2C%20belong%20to%20the%20application%20and%20must%20be%20included%20in%20the%20installer.%20The%20section%20will%20be%20split%20in%20two%20categories%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-27%22%3E%0A%3CLI%20id%3D%22pragma-line-27%22%3E%3CSTRONG%3EOutput%20files%3C%2FSTRONG%3E%2C%20which%20are%20the%20files%20created%20in%20the%20bin%20folder%20as%20part%20of%20the%20build%20process.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-28%22%3E%3CSTRONG%3EReference%20files%3C%2FSTRONG%3E%2C%20which%20are%20the%20files%20that%20are%20referenced%20by%20your%20projects%20(for%20example%2C%203rd%20party%20libraries).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EIn%20my%20case%2C%20I'm%20going%20to%20include%20all%20the%20output%20files%2C%20plus%20the%20reference%20files%20coming%20from%20NuGet%2C%20like%20JSON.net%20or%20System.Data.SQLite.%20I%20don't%20need%20to%20include%20the%20references%20related%20to%20the%20.NET%20Framework%2C%20since%20they%20are%20already%20installed%20on%20the%20machine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20666px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168302iDDBB6098F72B1F9B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22DetectedFiles.png%22%20title%3D%22DetectedFiles.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EIn%20the%20next%20step%2C%20you%20will%20need%20to%20select%20the%20main%20executable%20of%20your%20application.%20Advanced%20Installer%20should%20be%20able%20to%20automatically%20detect%20it%2C%20especially%20if%20it's%20a%20scenario%20like%20mine%20where%20the%20application%20is%20composed%20by%20a%20single%20executable.%20This%20information%20will%20be%20used%20to%20configure%20the%20shortcuts%20on%20the%20desktop%20and%2For%20the%20Start%20Menu.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20666px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168303i7D057B874062033C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Shortcuts.png%22%20title%3D%22Shortcuts.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAll%20the%20other%20steps%20are%20optional%20and%20apply%20mostly%20to%20the%20MSI%20setup%3A%20you%20can%20choose%20if%20you%20want%20to%20launch%20the%20application%20after%20having%20it%20installed%3B%20you%20can%20customize%20the%20UI%20of%20the%20installer%3B%20you%20can%20choose%20the%20languages%20you%20support%3B%20you%20can%20add%20a%20license%20agreement%20that%20will%20be%20displayed%20during%20the%20setup.%20After%20you%20have%20finished%20the%20wizard%2C%20Advanced%20Installer%20will%20bring%20you%20to%20the%20main%20UI%20of%20the%20application%2C%20where%20you%20can%20further%20customize%20the%20project.%20The%20tool%20offers%20tons%20of%20options%3A%20you%20can%20add%20support%20to%20services%20or%20custom%20actions%2C%20you%20can%20customize%20the%20manifest%20for%20the%20MSIX%20version%2C%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe're%20going%20to%20keep%20it%20simple%2C%20so%20we%20won't%20add%20any%20special%20configuration.%20However%2C%20there's%20a%20setting%20that%20is%20very%20important.%20Move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EFiles%20and%20Folders%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%2C%20which%20displays%20what%20and%20where%20the%20installer%20will%20copy%20on%20the%20user's%20machine.%20You%20will%20see%20a%20folder%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EApplication%20folder%3C%2FSTRONG%3E%2C%20which%20is%20the%20location%20where%20the%20files%20which%20compose%20the%20application%20will%20be%20copied.%20However%2C%20you%20might%20see%20that%20not%20all%20the%20files%20are%20properly%20included.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168304i9ABE3A74FA2BDE82%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22FilesAndFolders.png%22%20title%3D%22FilesAndFolders.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAdditionally%2C%20you%20will%20notice%20that%20if%20you%20update%20the%20source%20code%20of%20your%20application%20and%20you%20produce%20a%20new%20build%2C%20it%20won't%20be%20automatically%20picked%20up.%20To%20solve%20this%20problem%20we%20need%20to%20setup%20a%20sync%20between%20the%20Visual%20Studio%20project%20and%20the%20Advanced%20Installer%20project%2C%20so%20that%20during%20the%20CI%20pipeline%20we%20can%20produce%20a%20MSI%20%2F%20MSIX%20which%20reflects%20the%20most%20recent%20version.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20achieve%20this%20goal%20we%20must%20enable%20the%20sync%20feature.%20Right%20click%20on%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EApplication%20Folder%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%20tree%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EProperties%3C%2FSTRONG%3E.%20Then%20move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESynchronize%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etab%20and%20click%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ESynchronize%20content%20with%20folder%20from%20disk%3C%2FSTRONG%3E.%20As%20source%20folder%2C%20you%20must%20specify%20the%20output%20of%20the%20build%20in%20the%20bin%20folder%20of%20your%20Visual%20Studio%20project.%20For%20example%2C%20since%20in%20my%20case%20I'm%20compiling%20the%20application%20in%20Release%20mode%2C%20I'm%20picking%20up%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EMyEmployees%5Cbin%5CRelease%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efolder.%20Once%20you%20press%20Ok%2C%20you%20will%20be%20asked%20if%20you%20want%20to%20remove%20the%20files%20which%20are%20already%20included.%20Press%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EYes%3C%2FSTRONG%3E.%20You%20will%20notice%20now%20that%20all%20the%20files%20are%20correctly%20included%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168305i521F3C884DFFB6A3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22SyncEnabled.png%22%20title%3D%22SyncEnabled.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAdditionally%2C%20they're%20kept%20in%20sync%20with%20the%20folder.%20This%20means%20that%2C%20whenever%20you're%20going%20to%20launch%20a%20new%20Visual%20Studio%20build%2C%20the%20updated%20executable%20and%20DLLs%20will%20be%20copied%20over%20to%20the%20Advanced%20Installer%20project.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22test-the-msi-generation%22%20id%3D%22toc-hId--722142342%22%20id%3D%22toc-hId--722142339%22%3ETest%20the%20MSI%20generation%3C%2FH3%3E%0A%3CP%3EBefore%20working%20on%20the%20Azure%20DevOps%20side%2C%20let's%20see%20if%20the%20MSI%20is%20created%20successfully.%20Move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBuilds%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%2C%20where%20you%20will%20find%20a%20definition%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDefaultBuild%3C%2FSTRONG%3E.%20Right%20click%20on%20it%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBuild%3C%2FSTRONG%3E.%20If%20everything%20goes%20well%2C%20you%20will%20find%20in%20the%20Project%20Output%20folder%20you%20have%20set%20during%20the%20wizard%20the%20MSI.%20If%20you%20try%20to%20install%20it%20you%20will%20get%20some%20warnings%20because%20the%20file%20isn't%20signed%20with%20a%20valid%20certificate.%20Advanced%20Installer%20supports%20signing%20as%20part%20of%20the%20build%20process%2C%20but%20for%20the%20moment%20we're%20going%20to%20keep%20it%20unsigned.%20We'll%20perform%20the%20signing%20directly%20on%20Azure%20DevOps.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22create-a-msix-package%22%20id%3D%22toc-hId-1765370491%22%20id%3D%22toc-hId-1765370494%22%3ECreate%20a%20MSIX%20package%3C%2FH3%3E%0A%3CP%3ENow%20that%20we%20have%20a%20project%20up%20%26amp%3B%20running%2C%20generating%20a%20MSIX%20package%20is%20really%20simple.%20We%20just%20need%20to%20move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBuilds%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20and%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EMSIX%20%2F%20APPX%20Build%3C%2FSTRONG%3E.%20A%20new%20build%20definition%20will%20be%20created%2C%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBuild_MSIX_APPX%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168308iD1CF80BCC8DCD98F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22MSIXSettings.png%22%20title%3D%22MSIXSettings.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFrom%20the%20page%20you%20will%20be%20able%20to%20set%20different%20options%20related%20to%20MSIX%20packaging%2C%20like%20the%20minimum%20Windows%2010%20version%20you%20want%20to%20target%20or%20the%20generation%20of%20an%20App%20Installer%20file%20as%20part%20of%20the%20process.%20If%20you%20want%20to%20try%20it%2C%20just%20right%20click%20on%20this%20build%20definition%20and%20choose%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBuild%3C%2FSTRONG%3E%3CSPAN%3E.%20At%20the%20end%20of%20the%20process%2C%20you%20will%20get%20in%20the%20project%20output%20folder%20a%20MSIX%20package.%20However%2C%20in%20this%20case%20you%20will%20be%20completely%20blocked%20from%20installing%20it%2C%20since%20we%20haven't%20signed%20it.%20And%2C%20as%20you%20know%2C%20unsigned%20MSIX%20packages%20can't%20be%20installed.%20But%20don't%20worry%2C%20we're%20going%20to%20do%20this%20as%20well%20on%20Azure%20DevOps.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22putting-everything-under-source-control%22%20id%3D%22toc-hId--42083972%22%20id%3D%22toc-hId--42083969%22%3EPutting%20everything%20under%20source%20control%3C%2FH3%3E%0A%3CP%3ENow%20our%20project%20should%20look%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20386px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168309i23965C25F29BF44E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ProjectFiles.png%22%20title%3D%22ProjectFiles.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThe%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EMyEmployees%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bfolder%20contains%20the%20Windows%20Forms%20project%2C%20while%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EProjects%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bone%20includes%20the%20Advanced%20Installer%20setup%20we%20have%20just%20created.%20This%20is%20the%20folder%20you%20need%20to%20make%20sure%20to%20include%20in%20your%20repository%20on%20GitHub%2C%20Azure%20Repos%20or%20whatever%20source%20control%20provider%20you%20prefer.%20We%20need%20to%20keep%20the%20Advanced%20Installer%20project%20together%20with%20the%20source%20code%20of%20the%20project.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22setup-the-pipeline%22%20id%3D%22toc-hId--1849538435%22%20id%3D%22toc-hId--1849538432%22%3ESetup%20the%20pipeline%3C%2FH3%3E%0A%3CP%3ENow%20that%20we%20have%20everything%20we%20need%2C%20we%20can%20start%20working%20on%20the%20pipeline.%20However%2C%20first%2C%20we%20need%20to%20install%20the%20task%20by%20Advanced%20Installer%20on%20our%20Azure%20DevOps%20account.%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dcaphyon.AdvancedInstaller-BuildTask%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EThis%20is%20the%20one%20you%20need%3C%2FA%3E%2C%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdvanced%20Installer%20Build%3C%2FSTRONG%3E.%20The%20company%20provides%20also%20a%20task%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdvanced%20Installer%20Tool%20Installer%2C%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewhich%20takes%20care%20of%20installing%20Advanced%20Installer%20on%20the%20hosted%20agent.%20However%2C%20it%20isn't%20really%20needed%20because%20the%20Build%20task%20can%20do%20it%20as%20well.%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20installed%20it%2C%20you%20can%20move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EPipelines%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20of%20your%20Azure%20DevOps%20project%20and%20create%20a%20new%20pipeline.%20As%20usual%2C%20first%20you%20will%20have%20to%20choose%20the%20repository%20where%20your%20code%20is%20hosted%2C%20followed%20by%20the%20starting%20template.%20In%20my%20case%20it's%20a%20Windows%20Forms%20application%2C%20so%20I%20chose%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E.NET%20Desktop%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eone%2C%20which%20looks%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-77%22%20class%3D%22language-yaml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-comment%22%3E%23%20.NET%20Desktop%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-comment%22%3E%23%20Build%20and%20run%20tests%20for%20.NET%20Desktop%20or%20Windows%20classic%20desktop%20solutions.%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-comment%22%3E%23%20Add%20steps%20that%20publish%20symbols%2C%20save%20build%20artifacts%2C%20and%20more%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-comment%22%3E%23%20https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fdevops%2Fpipelines%2Fapps%2Fwindows%2Fdot-net%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3Etrigger%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-bullet%22%3E-%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3Emaster%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3Epool%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20vmImage%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'windows-latest'%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3Evariables%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20solution%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'**%2F*.sln'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20buildPlatform%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'Any%20CPU'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20buildConfiguration%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'Release'%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3Esteps%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3ENuGetToolInstaller%401%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3ENuGetCommand%402%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20inputs%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20restoreSolution%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(solution)'%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3EVSBuild%401%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20inputs%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20solution%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(solution)'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20platform%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(buildPlatform)'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20configuration%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(buildConfiguration)'%3C%2FSPAN%3E%0A%0A%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3EVSTest%402%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20inputs%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20platform%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(buildPlatform)'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20configuration%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(buildConfiguration)'%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EIt's%20a%20good%20starting%20point%2C%20since%20it%20already%20takes%20care%20of%20restoring%20the%20NuGet%20packages%20and%20building%20the%20code.%20The%20next%20step%20is%20to%20add%20the%20Advanced%20Installer%20tasks%2C%20so%20that%20the%20code%20can%20be%20converted%20into%20an%20installer.%20We're%20going%20to%20add%20two%20tasks%3A%20one%20to%20generate%20a%20MSI%20and%20one%20to%20generate%20a%20MSIX.%3C%2FP%3E%0A%3CP%3ELet's%20see%20the%20first%20one%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-117%22%20class%3D%22language-yaml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3EAdvancedInstaller%402%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20inputs%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20advinstLicense%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(AILicense)'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipPath%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'Projects%5CMyEmployees.aip'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipBuild%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'DefaultBuild'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipPackageName%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'MyEmployees-%24(Build.BuildNumber).msi'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipOutputFolder%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(Build.ArtifactStagingDirectory)%5CMSI'%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThe%20configuration%20is%20quite%20simple%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-129%22%3E%0A%3CLI%20id%3D%22pragma-line-129%22%3E%3CCODE%3EaiPath%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20path%2C%20starting%20from%20the%20root%20of%20the%20repository%2C%20which%20contains%20the%20Advanced%20Installer%20project.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-130%22%3E%3CCODE%3EaipBuild%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20name%20of%20the%20build%20definition%20we%20want%20to%20run.%20In%20this%20case%20we're%20creating%20the%20MSI%20first%2C%20so%20we%20use%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EDefaultBuild%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Edefinition.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-131%22%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EaipPackageName%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20is%20optional.%20However%2C%20in%20my%20case%2C%20I%20prefer%20to%20add%20a%20reference%20to%20the%20build%20number%20in%20the%20file%20name%20generated%20by%20the%20tool%2C%20so%20that%20it's%20easier%20for%20me%20to%20understand%20the%20version%20number.%20As%20such%2C%20I%20have%20added%20the%20variable%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E%24(Build.BuildNumber)%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eas%20suffix%20to%20the%20file%20name.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-132%22%3E%3CCODE%3EaipOutputFolder%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Especifies%20where%20you%20want%20to%20copy%20the%20generated%20packages.%20In%20this%20case%20I%20use%20a%20folder%20called%20MSI%2C%20which%20is%20created%20under%20the%20default%20folder%20where%20artifacts%20are%20picked%20up.%20This%20way%2C%20it%20will%20be%20easier%20for%20me%20to%20publish%20the%20generated%20MSI%20as%20build%20artifact.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3EadvinstLicense%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eparameter%20deserves%20a%20special%20mention.%20As%20anticipated%20in%20the%20beginning%20of%20the%20post%2C%20Advanced%20Installer%20is%20a%20paid%20product.%20As%20such%2C%20if%20you're%20building%20a%20project's%20type%20which%20isn't%20covered%20by%20the%20free%20license%2C%20you%20will%20need%20to%20provide%20your%20license%20key.%20Since%20YAML%20files%20are%20typically%20included%20in%20the%20repository%2C%20it%20isn't%20a%20good%20idea%20to%20store%20it%20in%20clear.%20As%20such%2C%20I%20have%20used%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EVariables%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epanel%20to%20create%20a%20variable%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAILicense%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewith%20the%20key%20and%20then%20I've%20referenced%20it%20in%20the%20YAML%20using%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E%24(AILicense)%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ekeyword.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20that%20you%20have%20seen%20how%20to%20configure%20the%20task%2C%20it%20will%20be%20very%20easy%20to%20add%20a%20new%20one%20to%20generate%20the%20MSIX%20package%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-138%22%20class%3D%22language-yaml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3EAdvancedInstaller%402%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20inputs%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20advinstLicense%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(AILicense)'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipPath%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'Projects%5CMyEmployees.aip'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipBuild%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'Build_MSIX_APPX'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipPackageName%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'MyEmployees-%24(Build.BuildNumber).msix'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20aipOutputFolder%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(Build.ArtifactStagingDirectory)%5CMSIX'%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EWe%20change%20just%20the%20name%20of%20the%20build%20definition%20to%20run%2C%20the%20name%20of%20the%20package%20(this%20time%20the%20extension%20will%20be%20.msix%20and%20not%20.msi)%20and%20the%20output%20folder.%20To%20keep%20things%20clean%2C%20in%20fact%2C%20I%20create%20the%20MSIX%20package%20in%20a%20different%20folder%2C%20called%20MSIX.%3C%2FP%3E%0A%3CP%3ENow%20the%20last%20step%20is%20to%20publish%20the%20build%20artifacts%2C%20by%20adding%20a%20publish%20task%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20id%3D%22pragma-line-152%22%20class%3D%22language-yaml%20hljs%22%3E%3CSPAN%20class%3D%22hljs-attr%22%3E-%20task%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3EPublishBuildArtifacts%401%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20inputs%3A%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20PathtoPublish%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'%24(Build.ArtifactStagingDirectory)'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20ArtifactName%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'drop'%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3E%20%20%20%20publishLocation%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E'Container'%3C%2FSPAN%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EThat's%20it!%20Now%20save%20the%20pipeline%2C%20which%20will%20automatically%20trigger%20a%20new%20build.%20Azure%20DevOps%20will%20first%20compile%20the%20Windows%20Forms%20application%20and%20then%20it%20will%20execute%20the%20Advanced%20Installer%20task%20twice%2C%20one%20for%20the%20MSI%20and%20one%20for%20the%20MSIX.%20The%20first%20task%20will%20take%20longer%2C%20because%20it%20will%20take%20care%20also%20of%20downloading%20the%20tool%20on%20the%20hosted%20agent.%20The%20second%20task%2C%20instead%2C%20will%20reuse%20the%20same%20one.%3C%2FP%3E%0A%3CP%3EAt%20the%20end%20of%20the%20process%2C%20if%20you%20explore%20the%20artifacts%20you%20should%20see%20something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20996px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168310i4E810D1282811CF5%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Artifacts.png%22%20title%3D%22Artifacts.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22create-a-release-pipeline%22%20id%3D%22toc-hId-637974398%22%20id%3D%22toc-hId-637974401%22%3ECreate%20a%20release%20pipeline%3C%2FH3%3E%0A%3CP%3ENow%20that%20you%20have%20created%20a%20CI%20pipeline%2C%20it's%20time%20to%20create%20a%20CD%20pipeline%20to%20automate%20the%20deployment%20of%20these%20packages.%20Move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EReleases%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20on%20Azure%20DevOps%20and%20press%20the%20button%20to%20create%20a%20new%20pipeline.%20You%20will%20be%20prompted%20with%20a%20series%20of%20templates.%20We're%20going%20to%20start%20from%20an%20empty%20job%2C%20so%20click%20on%20the%20related%20link.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ELet's%20start%20from%20the%20one%20to%20deploy%20the%20MSI%2C%20so%20let's%20call%20it%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDeploy%20MSI%3C%2FSTRONG%3E%3CSPAN%3E.%20But%20first%2C%20click%20on%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdd%20an%20artifact%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bin%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EArtifacts%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bsection%20and%20choose%20the%20one%20produced%20by%20the%20CI%20pipeline%20you%20have%20just%20created.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168311i643FA1DC327A41EF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ArtifactsConfiguration.png%22%20title%3D%22ArtifactsConfiguration.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20you%20can%20click%20on%20the%20link%20under%20the%20task%20name%20to%20start%20adding%20tasks.%20The%20first%20step%20is%20to%20sign%20the%20installer%2C%20to%20avoid%20the%20warnings%20by%20Windows%20that%20are%20displayed%20when%20you%20tried%20to%20install%20an%20untrusted%20installer.%20The%20easiest%20way%20to%20achieve%20this%20goal%20is%20to%20use%20an%20extension%20created%20by%20Stefan%20Kert%20called%20Code%20Signing.%20If%20you%20haven't%20already%20installed%20it%20on%20your%20Azure%20DevOps%20account%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dstefankert.codesigning%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ego%20on%20and%20install%20it%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThen%20click%20on%20the%20%2B%20symbol%20near%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAgent%20job%3C%2FSTRONG%3E%2C%20look%20for%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECode%20Signing%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etask%20and%20add%20it.%20You'll%20need%20to%20have%20a%20.pfx%20file%20with%20the%20certificate%20that%20you're%20going%20to%20use%20to%20sign%20the%20installer.%20You%20can%20acquire%20one%20from%20a%20public%20certificate%20authority%20or%20get%20it%20from%20your%20internal%20one%20if%20the%20installer%20is%20meant%20for%20enterprise%20deployment%3B%20alternatively%2C%20if%20you're%20just%20doing%20some%20tests%2C%20you%20can%20generate%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fmsix%2Fpackage%2Fcreate-certificate-package-signing%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ea%20self-signed%20certificate%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3EHere%20are%20the%20field%20to%20configure%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%20id%3D%22pragma-line-182%22%3E%0A%3CLI%20id%3D%22pragma-line-182%22%3E%3CSTRONG%3ESecure%20File%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20path%20to%20the%20file%20which%20contains%20your%20certificate.%20The%20task%20uses%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Flibrary%2Fsecure-files%3Fview%3Dazure-devops%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESecure%20Files%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efeature%20from%20Azure%20DevOps%2C%20which%20means%20that%20we%20can%20safely%20upload%20it%20by%20clicking%20on%20the%20Settings%20button%20near%20the%20field.%20The%20file%20will%20be%20available%20only%20to%20be%20used%20in%20this%20pipeline%3B%20no%20one%20will%20be%20able%20to%20download%20it%20and%20reuse%20it%2C%20blocking%20malicious%20actors%20that%20could%20be%20interested%20in%20stealing%20our%20identity.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-183%22%3E%3CSTRONG%3ESecure%20File%20Password%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20password%20you%20have%20used%20to%20protect%20your%20certificate.%20Since%20it's%20better%20to%20not%20store%20the%20password%20in%20clear%2C%20I%20have%20setup%20a%20variable%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E%24(PfxPassword)%3C%2FCODE%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EVariables%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Etab.%3C%2FLI%3E%0A%3CLI%20id%3D%22pragma-line-184%22%3E%3CSTRONG%3EFile(s)%20to%20sign%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eis%20the%20path%20of%20the%20file%20to%20sign.%20In%20this%20case%2C%20we%20just%20set%20it%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3E**%2F*.msi%3C%2FCODE%3E.%20We%20generically%20sign%20every%20file%20with%20.msi%20extension%20in%20the%20artifacts%20folder.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20460px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168312i5402CC2182AB1C1B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22CodeSigning.png%22%20title%3D%22CodeSigning.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat's%20it.%20The%20next%20step%20is...%20well%2C%20it's%20up%20to%20you%20%3D)%3C%2Fimg%3E%20Now%20that%20the%20installer%20has%20been%20signed%2C%20you%20can%20add%20a%20task%20to%20deploy%20it%20in%20the%20place%20which%20makes%20more%20sense%20for%20you.%20For%20example%2C%20you%20can%20deploy%20it%20to%20a%20storage%20or%20a%20FTP%2C%20where%20the%20file%20will%20be%20linked%20by%20a%20web%20page.%20In%20my%20scenario%2C%20I'm%20using%20Azure%20Storage%20to%20store%20the%20file%20in%20a%20blob%2C%20so%20I'm%20using%20the%20task%20called%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fdevops%2Fpipelines%2Ftasks%2Fdeploy%2Fazure-file-copy%3Fview%3Dazure-devops%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20File%20Copy%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you've%20completed%20the%20task%2C%20you%20can%20click%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EPipeline%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20go%20back%20to%20setup%20the%20MSIX%20package%20deployment.%20In%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EStages%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20click%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAdd%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%20choose%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ENew%20stage%3C%2FSTRONG%3E.%20Also%20in%20this%20case%20choose%20to%20create%20an%20empty%20job%20and%20give%20it%20a%20meaningful%20name%2C%20like%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EDeploy%20MSIX%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20is%20how%20your%20pipeline%20should%20look%20like%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20675px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168313i9B95B0355DC3B45C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ReleasePipeline.png%22%20title%3D%22ReleasePipeline.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EClick%20on%20the%20link%20under%20the%20new%20stage%20to%20start%20adding%20tasks.%20Also%20in%20this%20case%20the%20required%20one%20is%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ECode%20Signing%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Btasks%2C%20which%20you%20need%20to%20sign%20the%20MSIX%20package.%20The%20configuration%20is%20exactly%20the%20same%20as%20we%20did%20for%20the%20MSI%2C%20as%20long%20as%20you're%20using%20the%20same%20certificate.%20The%20only%20difference%20is%20that%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EFile(s)%20to%20sign%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bfield%20must%20be%20changed%20to%3C%2FSPAN%3E%26nbsp%3B%3CCODE%3E**%2F*.msix%3C%2FCODE%3E%3CSPAN%3E%2C%20as%20in%20the%20following%20image%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20466px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168315i39EB9E7DCD169160%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22CodeSigningMSIX.png%22%20title%3D%22CodeSigningMSIX.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EPay%20attention%20that%2C%20in%20order%20for%20the%20signing%20to%20complete%20successful%2C%20the%20subject%20of%20the%20certificate%20must%20match%20the%20publisher%20declared%20in%20the%20manifest.%20You%20can%20check%20this%20in%20Advanced%20Installer.%20Move%20to%20the%26nbsp%3B%3CSTRONG%3EPackage%20Information%3C%2FSTRONG%3E%26nbsp%3Btab%20under%20the%26nbsp%3B%3CSTRONG%3EUniversal%20Windows%3C%2FSTRONG%3E%26nbsp%3Bsection%20and%20look%20for%26nbsp%3B%3CSTRONG%3EPublisher%3C%2FSTRONG%3E%26nbsp%3Bsection%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168316i080774FDD2EB1FAA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Publisher.png%22%20title%3D%22Publisher.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThe%20value%20that%20must%20match%20the%20subject%20of%20your%20certificate%20is%20the%20one%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EID%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efield.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20you're%20ready%20for%20the%20deployment.%20Also%20in%20this%20case%20you%20can%20choose%20the%20task%20which%20fits%20best%20your%20scenario.%20For%20example%2C%20you%20can%20deploy%20the%20MSIX%20package%20to%20Azure%20Storage%20and%20leverage%20the%20App%20Installer%20technology%20to%20handle%20the%20installation%20and%20automatic%20updates.%20If%20you%20want%20to%20generate%20an%20App%20Installer%20file%20as%20part%20of%20the%20build%20process%2C%20you%20can%20leverage%20again%20Advanced%20Installer.%20Move%20to%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EBuilds%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20of%20your%20project%20and%2C%20in%20the%20MSIX%20build%20definition%2C%20look%20for%20the%20section%20titled%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EAppInstaller%3C%2FSTRONG%3E.%20There%20you%20will%20be%20able%20to%20provide%20all%20the%20relevant%20information%2C%20like%20the%20URL%20where%20you're%20going%20to%20deploy%20the%20package%2C%20the%20frequency%20check%20for%20automatic%20updates%2C%20etc.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168317iF94B6707A944C502%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22AppInstaller.png%22%20title%3D%22AppInstaller.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERemember%20that%20some%20options%20might%20be%20disabled%2C%20based%20on%20the%20Windows%2010%20version%20you're%20targeting%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3ETarget%20Platforms%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection.%20For%20example%2C%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EShow%20Prompt%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eoption%20is%20supported%20starting%20from%20Windows%2010%201903%2C%20so%20if%20you're%20targeting%20a%20lower%20version%20the%20option%20will%20be%20disabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERemember%20to%20commit%20the%20updated%20.ai%20file%20to%20your%20repository%20every%20time%20you%20make%20any%20change%20to%20the%20Advanced%20Installer%20project.%20This%20way%2C%20you%20will%20trigger%20a%20new%20build%20and%20a%20new%20generation%20of%20the%20MSI%20and%20MSIX%20installers.%20As%20last%20step%2C%20if%20you%20truly%20want%20to%20enable%20a%20full%20CI%2FCD%20experience%2C%20remember%20to%20click%2C%20in%20the%20Release%20pipeline%2C%20on%20the%20lighting%20symbol%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EArtifacts%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Esection%20and%20set%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEnabled%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ethe%20Continuous%20Deployment%20Trigger.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20995px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F168318iB8A3073D083501C0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ContinuousDeployment.png%22%20title%3D%22ContinuousDeployment.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EThis%20way%2C%20Azure%20DevOps%20will%20automatically%20trigger%20the%20Release%20pipeline%20every%20time%20the%20build%20pipeline%20completes%20successfully.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22wrapping-up%22%20id%3D%22toc-hId--1169480065%22%20id%3D%22toc-hId--1169480062%22%3EWrapping%20up%3C%2FH3%3E%0A%3CP%3EIn%20this%20blog%20post%20we%20have%20seen%20how%2C%20with%20Advanced%20Installer%2C%20we%20can%20enable%20a%20CI%2FCD%20pipeline%20on%20Azure%20DevOps%20that%20automatically%20generates%20both%20a%20MSI%20and%20a%20MSIX%20package%20out%20from%20the%20code%20of%20our%20application.%20This%20way%2C%20we%20can%20keep%20supporting%20customers%20who%20aren't%20using%20Windows%2010%20yet%20but%2C%20at%20the%20same%20time%2C%20provide%20a%20much%20better%20deployment%20experience%20for%20the%20ones%20who%20already%20doing%20it.%20Hopefully%2C%20over%20time%2C%20you%20will%20be%20able%20to%20stop%20creating%20a%20MSI%20and%20focus%20only%20on%20MSIX%20%3D)%3C%2Fimg%3E%3C%2FP%3E%0A%3CP%3EThere%20are%20many%20great%203rd%20party%20tools%20on%20the%20market%20that%20can%20help%20you%20in%20the%20process%20of%20creating%20installers%20and%20packages%20for%20your%20applications.%20Advanced%20Installer%20is%20one%20of%20them%20and%20one%20thing%20I%20have%20appreciated%20is%20the%20availability%20of%20an%20Azure%20DevOps%20task%2C%20which%20allows%20me%20to%20use%20one%20of%20the%20built-in%20hosted%20agents%2C%20without%20forcing%20me%20to%20maintain%20a%20dedicated%20agent%20with%20the%20required%20tools.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20find%20the%20sample%20used%20in%20this%20project%2C%20together%20with%20the%20full%20pipeline%20definition%2C%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2FWindows-AppConsult-Samples-DesktopBridge%2Ftree%2Fmaster%2FBlog-AdvancedInstaller%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EGitHub%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHappy%20packaging!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1142985%22%20slang%3D%22en-US%22%3E%3CP%3ELearn%20how%20you%20can%20use%20Advanced%20Installer%20and%20Azure%20DevOps%20to%20enable%20CI%2FCD%20for%20your%20Windows%20applications%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

If you follow my activities, like the articles I publish on this blog or the recent book I've published about MSIX, you'll know that one of the reasons why I like MSIX from a developer perspective is that it makes really easy to enable a CI/CD pipeline for Windows desktop applications. Thanks to the Windows Application Packaging Project, we can easily automate the creation of a MSIX package simply by adding it to our solution and running a build. And thanks to features like App Installer, we can easily deploy the generated MSIX package to a website and support automatic updates without changing the code or having to setup your own service.

 

However, in many cases you may already have an installer definition created with a 3rd party tool. Popular authoring tools, like Advanced Installer, InstallShield or Wix, are able to generate a MSIX package out from an installer project, making easier to reuse the work you may already have done to generate MSI installers in the past. Additionally, thanks to these tools, you have the opportunity to use the same project to generate at the same time a MSI and a MSIX, helping you to support customers who might not have migrated yet to Windows 10 and who are unable to use MSIX Core (for example, because it's a consumer application).

 

What about enabling a CI/CD pipeline in this scenario? In this blog post we're going to see an example on how to achieve this task with Advanced Installer. Why did I choose this product? Well, other than because it's a really good software, the Advanced Installer team has created a task for Azure DevOps which is able to build an Advanced Installer project stored on the repository. And, most of all, the task is able to download the most recent version of Advanced Installer and install it on the machine without requiring any user intervention. This means that we are not forced to create a self-hosted agent where to manually install the tool, but we can leverage the built-in agents provided by Azure DevOps.

 

Let's start!

 

The Advanced Installer project

As a starting point, I will use a simple Windows Forms application called MyEmployees, which I have used also in other posts. However, the main difference is that, this time, the solution doesn't have a Windows Application Packaging Project. We're going to use Advanced Installer to create a MSIX package, together with a MSI. In a real scenario probably you already have the setup created with Advanced Installer but, to understand better how it works, let's create a new one.

 

First you need to download and install the latest Advanced Installer version. It's a paid product, but it offers a 30 days trial and also a free tier. Once you have launched it, you will find in the Templates section one called Visual Studio Application, which is able to connect directly to a Visual Studio solution, like in our case.

 

VisualStudioApplication.png

 

First you will be asked the name and the publisher of your application, followed by the distribution type. For the moment choose MSI setup file. We're going to add the MSIX definition later. In the next step you will be asked where to save the project, using a file with .aip extension. You will need to add this file in a folder of your project, since we'll need to commit it to our repository, in order to use the Azure DevOps task. In my case, I've created a folder called Projects inside the solution. The project output folder will be automatically changed to point to the same location, but I suggest you to choose a different one, outside the repository. This folder, in fact, will contain the various artifacts (like the generated MSI or MSIX package) and we don't want to include them in the source code.

 

As next step, you must choose the Visual Studio solution which contains your project. In my case, I've chosen the MyEmployees.sln file. Advanced Installer will analyze the solution and it will ask you which configurations you want to import. Feel free to choose the ones that make sense for your project. In my case, for example, I want to distribute only the 64 bit version, built in Release mode:

 

BuildConfiguration.png

 

In the next step you will be asked to select which files, among the ones that are created as build output, belong to the application and must be included in the installer. The section will be split in two categories:

 

  • Output files, which are the files created in the bin folder as part of the build process.
  • Reference files, which are the files that are referenced by your projects (for example, 3rd party libraries).

In my case, I'm going to include all the output files, plus the reference files coming from NuGet, like JSON.net or System.Data.SQLite. I don't need to include the references related to the .NET Framework, since they are already installed on the machine.

 

DetectedFiles.png

 

In the next step, you will need to select the main executable of your application. Advanced Installer should be able to automatically detect it, especially if it's a scenario like mine where the application is composed by a single executable. This information will be used to configure the shortcuts on the desktop and/or the Start Menu.

 

Shortcuts.png

 

All the other steps are optional and apply mostly to the MSI setup: you can choose if you want to launch the application after having it installed; you can customize the UI of the installer; you can choose the languages you support; you can add a license agreement that will be displayed during the setup. After you have finished the wizard, Advanced Installer will bring you to the main UI of the application, where you can further customize the project. The tool offers tons of options: you can add support to services or custom actions, you can customize the manifest for the MSIX version, etc.

 

We're going to keep it simple, so we won't add any special configuration. However, there's a setting that is very important. Move to the Files and Folders section, which displays what and where the installer will copy on the user's machine. You will see a folder called Application folder, which is the location where the files which compose the application will be copied. However, you might see that not all the files are properly included.

 

FilesAndFolders.png

 

Additionally, you will notice that if you update the source code of your application and you produce a new build, it won't be automatically picked up. To solve this problem we need to setup a sync between the Visual Studio project and the Advanced Installer project, so that during the CI pipeline we can produce a MSI / MSIX which reflects the most recent version.

 

To achieve this goal we must enable the sync feature. Right click on the Application Folder in the tree and choose Properties. Then move to the Synchronize tab and click on Synchronize content with folder from disk. As source folder, you must specify the output of the build in the bin folder of your Visual Studio project. For example, since in my case I'm compiling the application in Release mode, I'm picking up the MyEmployees\bin\Release folder. Once you press Ok, you will be asked if you want to remove the files which are already included. Press Yes. You will notice now that all the files are correctly included:

 

SyncEnabled.png

 

Additionally, they're kept in sync with the folder. This means that, whenever you're going to launch a new Visual Studio build, the updated executable and DLLs will be copied over to the Advanced Installer project.

 

Test the MSI generation

Before working on the Azure DevOps side, let's see if the MSI is created successfully. Move to the Builds section, where you will find a definition called DefaultBuild. Right click on it and choose Build. If everything goes well, you will find in the Project Output folder you have set during the wizard the MSI. If you try to install it you will get some warnings because the file isn't signed with a valid certificate. Advanced Installer supports signing as part of the build process, but for the moment we're going to keep it unsigned. We'll perform the signing directly on Azure DevOps.

 

Create a MSIX package

Now that we have a project up & running, generating a MSIX package is really simple. We just need to move to the Builds section and choose MSIX / APPX Build. A new build definition will be created, called Build_MSIX_APPX.

 

MSIXSettings.png

 

From the page you will be able to set different options related to MSIX packaging, like the minimum Windows 10 version you want to target or the generation of an App Installer file as part of the process. If you want to try it, just right click on this build definition and choose Build. At the end of the process, you will get in the project output folder a MSIX package. However, in this case you will be completely blocked from installing it, since we haven't signed it. And, as you know, unsigned MSIX packages can't be installed. But don't worry, we're going to do this as well on Azure DevOps.

 

Putting everything under source control

Now our project should look like this:

 

ProjectFiles.png

 

The MyEmployees folder contains the Windows Forms project, while the Projects one includes the Advanced Installer setup we have just created. This is the folder you need to make sure to include in your repository on GitHub, Azure Repos or whatever source control provider you prefer. We need to keep the Advanced Installer project together with the source code of the project.

 

Setup the pipeline

Now that we have everything we need, we can start working on the pipeline. However, first, we need to install the task by Advanced Installer on our Azure DevOps account. This is the one you need, called Advanced Installer Build. The company provides also a task called Advanced Installer Tool Installer, which takes care of installing Advanced Installer on the hosted agent. However, it isn't really needed because the Build task can do it as well.

Once you have installed it, you can move to the Pipelines section of your Azure DevOps project and create a new pipeline. As usual, first you will have to choose the repository where your code is hosted, followed by the starting template. In my case it's a Windows Forms application, so I chose the .NET Desktop one, which looks like this:

 

# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

It's a good starting point, since it already takes care of restoring the NuGet packages and building the code. The next step is to add the Advanced Installer tasks, so that the code can be converted into an installer. We're going to add two tasks: one to generate a MSI and one to generate a MSIX.

Let's see the first one:

 

- task: AdvancedInstaller@2
  inputs:
    advinstLicense: '$(AILicense)'
    aipPath: 'Projects\MyEmployees.aip'
    aipBuild: 'DefaultBuild'
    aipPackageName: 'MyEmployees-$(Build.BuildNumber).msi'
    aipOutputFolder: '$(Build.ArtifactStagingDirectory)\MSI'

The configuration is quite simple:

 

  • aiPath is the path, starting from the root of the repository, which contains the Advanced Installer project.
  • aipBuild is the name of the build definition we want to run. In this case we're creating the MSI first, so we use the DefaultBuild definition.
  • The aipPackageName parameter is optional. However, in my case, I prefer to add a reference to the build number in the file name generated by the tool, so that it's easier for me to understand the version number. As such, I have added the variable $(Build.BuildNumber) as suffix to the file name.
  • aipOutputFolder specifies where you want to copy the generated packages. In this case I use a folder called MSI, which is created under the default folder where artifacts are picked up. This way, it will be easier for me to publish the generated MSI as build artifact.

The advinstLicense parameter deserves a special mention. As anticipated in the beginning of the post, Advanced Installer is a paid product. As such, if you're building a project's type which isn't covered by the free license, you will need to provide your license key. Since YAML files are typically included in the repository, it isn't a good idea to store it in clear. As such, I have used the Variables panel to create a variable called AILicense with the key and then I've referenced it in the YAML using the $(AILicense) keyword.

 

Now that you have seen how to configure the task, it will be very easy to add a new one to generate the MSIX package:

 

- task: AdvancedInstaller@2
  inputs:
    advinstLicense: '$(AILicense)'
    aipPath: 'Projects\MyEmployees.aip'
    aipBuild: 'Build_MSIX_APPX'
    aipPackageName: 'MyEmployees-$(Build.BuildNumber).msix'
    aipOutputFolder: '$(Build.ArtifactStagingDirectory)\MSIX'

We change just the name of the build definition to run, the name of the package (this time the extension will be .msix and not .msi) and the output folder. To keep things clean, in fact, I create the MSIX package in a different folder, called MSIX.

Now the last step is to publish the build artifacts, by adding a publish task:

 

- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)'
    ArtifactName: 'drop'
    publishLocation: 'Container'

That's it! Now save the pipeline, which will automatically trigger a new build. Azure DevOps will first compile the Windows Forms application and then it will execute the Advanced Installer task twice, one for the MSI and one for the MSIX. The first task will take longer, because it will take care also of downloading the tool on the hosted agent. The second task, instead, will reuse the same one.

At the end of the process, if you explore the artifacts you should see something like this:

 

Artifacts.png

 

Create a release pipeline

Now that you have created a CI pipeline, it's time to create a CD pipeline to automate the deployment of these packages. Move to the Releases section on Azure DevOps and press the button to create a new pipeline. You will be prompted with a series of templates. We're going to start from an empty job, so click on the related link.

 

Let's start from the one to deploy the MSI, so let's call it Deploy MSI. But first, click on Add an artifact in the Artifacts section and choose the one produced by the CI pipeline you have just created.

 

ArtifactsConfiguration.png

 

Now you can click on the link under the task name to start adding tasks. The first step is to sign the installer, to avoid the warnings by Windows that are displayed when you tried to install an untrusted installer. The easiest way to achieve this goal is to use an extension created by Stefan Kert called Code Signing. If you haven't already installed it on your Azure DevOps account, go on and install it.

 

Then click on the + symbol near Agent job, look for the Code Signing task and add it. You'll need to have a .pfx file with the certificate that you're going to use to sign the installer. You can acquire one from a public certificate authority or get it from your internal one if the installer is meant for enterprise deployment; alternatively, if you're just doing some tests, you can generate a self-signed certificate.

Here are the field to configure:

 

  • Secure File is the path to the file which contains your certificate. The task uses the Secure Files feature from Azure DevOps, which means that we can safely upload it by clicking on the Settings button near the field. The file will be available only to be used in this pipeline; no one will be able to download it and reuse it, blocking malicious actors that could be interested in stealing our identity.
  • Secure File Password is the password you have used to protect your certificate. Since it's better to not store the password in clear, I have setup a variable called $(PfxPassword) in the Variables tab.
  • File(s) to sign is the path of the file to sign. In this case, we just set it to **/*.msi. We generically sign every file with .msi extension in the artifacts folder.

 

CodeSigning.png

 

That's it. The next step is... well, it's up to you =) Now that the installer has been signed, you can add a task to deploy it in the place which makes more sense for you. For example, you can deploy it to a storage or a FTP, where the file will be linked by a web page. In my scenario, I'm using Azure Storage to store the file in a blob, so I'm using the task called Azure File Copy.

 

Once you've completed the task, you can click on Pipeline and go back to setup the MSIX package deployment. In the Stages section click on Add and choose New stage. Also in this case choose to create an empty job and give it a meaningful name, like Deploy MSIX.

 

This is how your pipeline should look like:

 

ReleasePipeline.png

 

Click on the link under the new stage to start adding tasks. Also in this case the required one is the Code Signing tasks, which you need to sign the MSIX package. The configuration is exactly the same as we did for the MSI, as long as you're using the same certificate. The only difference is that the File(s) to sign field must be changed to **/*.msix, as in the following image:

 

CodeSigningMSIX.png

 

Pay attention that, in order for the signing to complete successful, the subject of the certificate must match the publisher declared in the manifest. You can check this in Advanced Installer. Move to the Package Information tab under the Universal Windows section and look for Publisher section:

 

Publisher.png

The value that must match the subject of your certificate is the one in the ID field.

 

Now you're ready for the deployment. Also in this case you can choose the task which fits best your scenario. For example, you can deploy the MSIX package to Azure Storage and leverage the App Installer technology to handle the installation and automatic updates. If you want to generate an App Installer file as part of the build process, you can leverage again Advanced Installer. Move to the Builds section of your project and, in the MSIX build definition, look for the section titled AppInstaller. There you will be able to provide all the relevant information, like the URL where you're going to deploy the package, the frequency check for automatic updates, etc.

 

AppInstaller.png

 

Remember that some options might be disabled, based on the Windows 10 version you're targeting in the Target Platforms section. For example, the Show Prompt option is supported starting from Windows 10 1903, so if you're targeting a lower version the option will be disabled.

 

Remember to commit the updated .ai file to your repository every time you make any change to the Advanced Installer project. This way, you will trigger a new build and a new generation of the MSI and MSIX installers. As last step, if you truly want to enable a full CI/CD experience, remember to click, in the Release pipeline, on the lighting symbol in the Artifacts section and set to Enabled the Continuous Deployment Trigger.

 

ContinuousDeployment.png

 

This way, Azure DevOps will automatically trigger the Release pipeline every time the build pipeline completes successfully.

 

Wrapping up

In this blog post we have seen how, with Advanced Installer, we can enable a CI/CD pipeline on Azure DevOps that automatically generates both a MSI and a MSIX package out from the code of our application. This way, we can keep supporting customers who aren't using Windows 10 yet but, at the same time, provide a much better deployment experience for the ones who already doing it. Hopefully, over time, you will be able to stop creating a MSI and focus only on MSIX =)

There are many great 3rd party tools on the market that can help you in the process of creating installers and packages for your applications. Advanced Installer is one of them and one thing I have appreciated is the availability of an Azure DevOps task, which allows me to use one of the built-in hosted agents, without forcing me to maintain a dedicated agent with the required tools.

 

You can find the sample used in this project, together with the full pipeline definition, on GitHub.

 

Happy packaging!