Creating a GAC Installer Package - Eonic/ProteanCMS GitHub Wiki
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.
Before proceeding, ensure that the Wix Installer add-on is installed in Visual Studio:
Ensure the development team has committed the latest stable build and tested all new features locally.
- Open the
ProteanCMS/ProteanCMSInstaller.sln
solution in Visual Studio. - Pull the latest changes from GIT.
- Open the V5Demo or ProteanCMS project locally to ensure the project builds and everything functions as expected.
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.
- Go to https://guidgenerator.com/ and get a new unique GUID
- 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>
- Go to
<ComponentGroup Id='FileSystemGroup'>
and add a new link
<ComponentRef Id='com_YOURFILENAME' />
- 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.
- Scroll down to
UpdateassemblyRef
section and add a new line
UpdateAssemblyRef(oAssembliesSect, "Yourclasspath, Version=" & YourDLLVersionVersion & ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
- 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
- You then add a corresponding public key token to the
UpdateDependantAssembly
UpdateDependantAssembly(oSectXml, "Yourclasspath", "yourpublickeytoken ", YourNewVersion)
Update the version numbers to 6.0.X.0
(where X
is the new version) in the following files:
-
Protean.Providers.Messaging.CampaignMonitor:
Go toProperties Pages
>Assembly Information
. (This usually contains the new version already as it does not auto-increment.) -
Protean.Tools:
Go toProperties Pages
>Assembly Information
. -
ProteanCMS:
Go toProperties Pages
>Assembly Information
. -
ProteanCMS.Installer:
OpenProduct.wsx
. -
ProteanCMS.Installer.Actions:
OpenCustomAction.vb
.
There should be six files updated. Ensure all changes are saved.
- Switch from Debug mode to Release mode.
- Right-click the solution in Visual Studio and select Build Solution.
- 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.
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">
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.
- Commit and push the updated solution to GIT.
- Upload the installer via FTP to the server.
- Run the installer on the server.
- Check that the version of
Newtonsoft.Json
in the machine’s.config
file is8.0.0.0
.
Note: You may need to copy the latest ProteanCMS files to the server if required.