Skip to content

Creating a GAC Installer Package

Callum Newman edited this page Oct 2, 2024 · 11 revisions

ProteanCMS Installer Guide

This guide outlines the steps to update and install the latest version of the ProteanCMS using the Wix Installer add-on for Visual Studio. Follow each step carefully to ensure a smooth installation process.


Step 1: Install the Wix Installer Add-on

Before proceeding, ensure that the Wix Installer add-on is installed in Visual Studio:

Download Wix Installer Add-on


Step 2: Verify Latest Build and Test New Features

Ensure the development team has committed the latest stable build and tested all new features locally.

  1. Open the ProteanCMS/ProteanCMSInstaller.sln solution in Visual Studio.
  2. Pull the latest changes from GIT.
  3. Open the V5Demo or ProteanCMS project locally to ensure the project builds and everything functions as expected.

Step 3: Add any new DLL's to the GAC installer

From time to time we add DLL's to Protean often using NuGet, these also need to be added to the GAC installer so they are available in the GAC for every site.

  1. Go to https://guidgenerator.com/ and get a new unique GUID
  2. Go to ProteanCMS.Installer and open ProductWSX file and see where all the components are added.
<Component Id='com_YOURFILENAME' Guid='NEWGUID' Permanent='no' SharedDllRefCount='no' Transitive='no'>
	<File Id='_YOURFILENAME' DiskId='1' Hidden='no' ReadOnly='no' System='no' Vital='yes' Compressed='yes' Name='your.dll' Source='..\packages\yourpackage\lib\net46\your.dll' Assembly='.net' KeyPath='yes' />
</Component>
  1. Go to <ComponentGroup Id='FileSystemGroup'> and add a new link
            <ComponentRef Id='com_YOURFILENAME' />
  1. Check the versions of dlls, if any of the DLL versions have been changed from those in the GAC then an extra step is required. In ProteanCMS.Installer.Actions / customAction.vb we have code that update dependant assemblies. If it is a new DLL then you need to create a variable with the current version number. i.e.
    Public Shared AngleSharpVersion As String = "1.1.2.0"
    Public Shared PreMailerVersion As String = "2.6.0.0"
    Public Shared QRCoderVersion As String = "1.6.0.0"
    Public Shared YourNewVersion As String = "0.0.0.0"

Make sure to get the dll correct version.

  1. Scroll down to UpdateassemblyRef section and add a new line
   UpdateAssemblyRef(oAssembliesSect, "Yourclasspath, Version=" & YourDLLVersionVersion & ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
  1. Use powershell with this script to get the publickeytoken for your DLL
([system.reflection.assembly]::loadfile("D:\HostingSpaces\ProteanCMS\packages\yourdll\lib\net462\your.dll")).FullName
  1. You then add a corresponding public key token to the UpdateDependantAssembly
  UpdateDependantAssembly(oSectXml, "Yourclasspath", "yourpublickeytoken ", YourNewVersion)

Step 4: Update Version Numbers

Update the version numbers to 6.0.X.0 (where X is the new version) in the following files:

  • Protean.Providers.Messaging.CampaignMonitor:
    Go to Properties Pages > Assembly Information. (This usually contains the new version already as it does not auto-increment.)

  • Protean.Tools:
    Go to Properties Pages > Assembly Information.

  • ProteanCMS:
    Go to Properties Pages > Assembly Information.

  • ProteanCMS.Installer:
    Open Product.wsx.

  • ProteanCMS.Installer.Actions:
    Open CustomAction.vb.

There should be six files updated. Ensure all changes are saved.


Step 5: Build the Solution

  1. Switch from Debug mode to Release mode.
  2. Right-click the solution in Visual Studio and select Build Solution.
  3. Verify that the build completes without errors. You should see six successful builds, as six files have been changed.

Note: AppStart and ReplaceProvider do not need to be changed.


Step 6: Run the Installer Locally

Navigate to the installer path:

D:\HostingSpaces\DevOpsGit\GACInstaller\bin\Release

Check the version number is updated in:

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ProteanCMS

Run a local site and verify the version number is correct:

<meta name="generator" content="ProteanCMS, Version=6.0.22.0, Culture=neutral, PublicKeyToken=0e5e11efc3341916">

Step 7: Debugging and Preparing for Live

The installer should override all earlier version numbers in local projects. For debugging, you will need a version later than the installer version.

If everything is functioning as expected, proceed to install on live.


Step 8: Commit and Push Changes

  1. Commit and push the updated solution to GIT.
  2. Upload the installer via FTP to the server.
  3. Run the installer on the server.
  4. Check that the version of Newtonsoft.Json in the machine’s .config file is 8.0.0.0.

Note: You may need to copy the latest ProteanCMS files to the server if required.



Clone this wiki locally