Posts

Showing posts with the label MSI

Azure Pipeline YAML for API that requires MSI

 variables: - name: buildConfiguration   value: 'Release' - name: buildPlatform   value: 'Any CPU' - name: major   value: 2 - name: minor   value: 0 - name: patch   value: $[counter(format('{0}.{1}',variables['Major'],variables['Minor']), 0)] - name: sonarQubeKeyRoot   value: $[format('{0}_StorePricing',replace(variables['System.TeamProject'], ' ', '_'))] name: $(Major).$(Minor).$(Patch) trigger:   branches:     include:     - main pool:   name: Azure Pipelines   vmImage: 'windows-2022'   demands:   - msbuild   - visualstudio jobs: - job: analyzeAndTest   displayName: 'Analyze and Test'      steps:            - task: DotNetCoreCLI@2     displayName: 'API dotnet restore'     inputs:       command: 'restore'       projects: |         **/XXXXX.sln       feedsToUse: 'select'...

MSI Testing

1) Orca allows for viewing inside MSIs, especially the versions of the File contents.  Use Orca from the Windows SDK that requires weird extra installation.       a) download latest Windows SDK and install it       b) search for Orca-x86_en-us.msi under C:\Program Files (x86) and run it       c) create shortcuts and taskbar shortcut to C:\Program Files (x86)\Orca\Orca.exe 2) Verify local box has IIS Express for local testing. Verify IIS Express installed by getting to the command line:   a) >Powershell   b) >get-service w3svc   c) if no service, then:       d)  Dism /Online /Enable-Feature /FeatureName:IIS-DefaultDocument /All e) Dism /Online /Enable-Feature /FeatureName:IIS-ASPNET45 /All   3) Helpful Batch files : Obviously adjust pathing.  MsiWaxOn.bat xcopy "C:\QTDev\StoreAPIs\QT.StorePricing.API\QT.StorePricing.API.Setup\obj\x64\Debug\QT.API.StorePricing.Setup.msi" "C:\QTDev\Wi...

Store vs Corp

 1) Need MSI on store side.  No MST on corporate needed. 2) App Settings different:      appsettings.Store-Development.json      appsettings.Store-Staging.json      appsettings.Store.json 3) Need to adjust so reads newer JSON: var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development"; var builder = new ConfigurationBuilder().SetBasePath(AppContext.BaseDirectory)     .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false)     .AddJsonFile($"appsettings.Store-{environment}.json", optional: false)     .AddEnvironmentVariables(); IConfiguration configuration = builder.Build(); services.AddSingleton(s => configuration); 4) Use the later Wix 4 5) Adjust for the fact that application is using the win10-x64 runtime with Net 6 whereas yours is win-x64 6) Ensure version numbers are done correctly 7) Don't forget to view MSI contents using Orca