1

I am trying to install Sitecore Commerce 9.0 Update-3 on my machine, but I am getting the following error.

System.Management.Automation.PSArgumentException: Cannot find type [Microsoft.SqlServer.Dac.DacServices]: verify that the assembly containing this type is loaded. at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord) Invoke-DeployCommerceDatabaseTask : Cannot find type [Microsoft.SqlServer.Dac.DacServices]: verify that the assembly containing this type is loaded. At X:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework\Public\Install-SitecoreConfiguration.ps1:253 char:21 + & $entry.Task.Command @paramSet | Out-Default + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-DeployCommerceDatabaseTask

enter image description here

The assembly mentioned above is located in my machine "X:\Program Files\Microsoft SQL Server\120\DAC\bin\Microsoft.SqlServer.Dac.dll".

I also have installed all the prerequisites mentioned in the documentation.

Has anyone been through this issue during Commerce installation?

1 Answer 1

3

Ok, so it looks like the SIF script is hardcoded to look in C:\, and isn't dynamically changing the drive letter to x:\ for you.

If you look in "SIF.Sitecore.Commerce.1.4.7\Modules\DeployCommerceDatabase\DeployCommerceDatabase.psm1"

You will find the following two methods you'll need up update.

function GetSqlDacVersion
{
    # load in DAC DLL (requires config file to support .NET 4.0)
    # change file location for a 32-bit OS
    # param out the base path of SQL Server
    $sqlServerVersions = @("140", "130", "120", "110");
    $sqlCurrentVersion = ""
    $baseSQLServerPath = "C:\Program Files (x86)\Microsoft SQL Server\{0}\DAC\bin\Microsoft.SqlServer.Dac.dll";

    .........
}

and this one

function DeployDacpac
(
    [Parameter(Mandatory=$true)][string]$dacpac, 
    [Parameter(Mandatory=$true)]$connStr,
    [Parameter(Mandatory=$true)]$databaseName
)
{
    Write-Host "Importing DACPAC $($dacpac)"

    # load in DAC DLL (requires config file to support .NET 4.0)
    # change file location for a 32-bit OS
    # param out the base path of SQL Server
    $sqlServerVersions = @("140", "130", "120", "110");
    $sqlCurrentVersion = ""
    $baseSQLServerPath = "C:\Program Files (x86)\Microsoft SQL Server\{0}\DAC\bin\Microsoft.SqlServer.Dac.dll";

    ......
}

Can you update the path in both of these methods to be x:\ and try again?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.