Sitecore deployment – Validate hotfix dlls

You might have seen Sitecore support is providing cumulative hotfixes for any issue that we raise in the Support portal and when Sitecore identifies it as bug from their side.

Now suppose I received a cumulative hotfix list of dlls from sitecore support which contained 24 dlls and in each environment when I perform a deploy, I need to go and validate all these 24 dlls. So how do we identify the dll as a hotfix dll? Here I will show how I did the deployment validation of hotfix dlls in sitecore 9.3.

You can find the Sitecore version policy here, which says how we can identify the releases, hotfixes , updates and versions.

When we open the properties of that dll file we have the Product version specified with respect to Sitecore version and the bug reference number. For example :

So if I have received 24 dlls as part of a cumulative hotfix, it would be difficult to go to each dll one by one and then validate the product version. So for that I have made a PowerShell script that gives all the hotfix dlls for the particular sitecore version.

Note : This script is to run from Windows PowerShell and not Sitecore PowerShell.

$dllfiles = gci "C:\inetpub\wwwroot\sc10preview.sc\bin"
$metadataFiles = $dllfiles | where {$_.extension -eq ".dll"} 
$reportItems = @()
$count = 0
foreach($metadataFile in $metadataFiles) {

if($metadataFile.VersionInfo.ProductVersion -Like "*Hotfix*" -and $metadataFile.VersionInfo.ProductVersion -Like "*9.3.0*")
    {  
        $reportItem = [PSCustomObject]@{
                    "Path"=$metadataFile.Name
                    "ProductVersion"=$metadataFile.VersionInfo.ProductVersion                
                    }
        $reportItems += $reportItem
        $count++
    }
}
Write-Host "Total Items in Bin folder with 9.3.0 version Hotfix is $($count)"
$reportItems

This would provide us following result.

This post is aimed for just giving an idea on how we can identify if we include a hotfix dll and is available in Sitecore bin. Also you will get an idea to check how many Support dlls are available in your bin folder and you can compare it with the release notes provided by Sitecore. you can modify the above script according to your requirements and validate your hotfix dlls.

So, that was a quick post, which I wanted to share with you for quickly checking the hotfix dlls available in you sitecore root bin folder.

See you all in my next post. Till then Bye !!! and Happy Sitecoring 🙂 !!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s