The Source parameter does not support the type provided?

In VSTS, I am getting this error when trying to deploy from DLM Automation Release. I've bolded the relevant errors in this log. I don't have a clue what this is referring to.

2018-06-11T16:22:44.8791821Z ##[section]Starting: Perform DeployFromPackage
2018-06-11T16:22:44.8791821Z ==============================================================================
2018-06-11T16:22:44.8791821Z Task : Redgate DLM Automation 2: Release
2018-06-11T16:22:44.8791821Z Description : Safely deploy database changes with Redgate's DLM Automation
2018-06-11T16:22:44.8791821Z Version : 2.1.24
2018-06-11T16:22:44.8791821Z Author : Redgate Software
2018-06-11T16:22:44.8791821Z Help : [More Information](https://documentation.red-gate.com/display/DLMA2/DLM+Automation+2+documentation)
2018-06-11T16:22:44.8791821Z ==============================================================================
2018-06-11T16:22:44.9491882Z Preparing task execution handler.
2018-06-11T16:22:45.3981915Z Executing the powershell script: C:\VsoBuild2\_work\_tasks\RedgateDlmAutomationRelease_c1177c17-3934-4005-ba89-a4549fe4f0a1\2.1.24\RunDlmAutomation.ps1
2018-06-11T16:22:46.5572144Z ##[warning]Could not find any suitable versions of DLMAutomation from any registered PSRepository
2018-06-11T16:22:47.5052417Z New-DlmDatabaseConnection, DLM Automation 2.1.3.2175, Copyright c Red Gate Software Ltd 2014-2018
2018-06-11T16:22:47.5192398Z
2018-06-11T16:22:47.5192398Z Use of this functionality requires a SQL Toolbelt license.
2018-06-11T16:22:47.5192398Z If you are unsure of your current user license entitlement please contact licensing@red-gate.com
2018-06-11T16:22:47.5192398Z
2018-06-11T16:22:47.7862372Z Test-DlmDatabaseConnection, DLM Automation 2.1.3.2175, Copyright c Red Gate Software Ltd 2014-2018
2018-06-11T16:22:47.9322395Z New-DlmDatabaseRelease, DLM Automation 2.1.3.2175, Copyright c Red Gate Software Ltd 2014-2018
2018-06-11T16:22:47.9642409Z ##[error]System.Management.Automation.CmdletInvocationException: The Source parameter does not support the type provided ---> RedGate.DLMAutomation.Shared.Errors.TerminatingException: The Source parameter does not support the type provided
2018-06-11T16:22:47.9642409Z at RedGate.DLMAutomation.PowerShell.ParameterParsing.ObjectParser.CreateFromParameterValue(Object parameterValue, String parameterName) in D:\BuildAgentB\work\745625c1cb6ba184\DLMAutomation\Cmdlets\RedGate.DLMAutomation.PowerShell\ParameterParsing\ObjectParser.cs:line 130
2018-06-11T16:22:47.9642409Z at RedGate.DLMAutomation.PowerShell.Commands.NewDlmDatabaseReleaseCommandImpl.GetAllParametersWithValuesForLogging() in D:\BuildAgentB\work\745625c1cb6ba184\DLMAutomation\Cmdlets\RedGate.DLMAutomation.PowerShell\Commands\NewDlmDatabaseReleaseCommand.cs:line 435
2018-06-11T16:22:47.9642409Z at RedGate.DLMAutomation.PowerShell.DlmAutomationCommandImpl`1.LogParameters() in D:\BuildAgentB\work\745625c1cb6ba184\DLMAutomation\Cmdlets\RedGate.DLMAutomation.PowerShell\DlmAutomationCommandImpl.cs:line 252
2018-06-11T16:22:47.9642409Z at RedGate.DLMAutomation.PowerShell.DlmAutomationCommandImpl`1.BeginProcessing() in D:\BuildAgentB\work\745625c1cb6ba184\DLMAutomation\Cmdlets\RedGate.DLMAutomation.PowerShell\DlmAutomationCommandImpl.cs:line 125
2018-06-11T16:22:47.9642409Z at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
2018-06-11T16:22:47.9642409Z --- End of inner exception stack trace ---
2018-06-11T16:22:47.9642409Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2018-06-11T16:22:47.9642409Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2018-06-11T16:22:47.9642409Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2018-06-11T16:22:47.9642409Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2018-06-11T16:22:47.9642409Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2018-06-11T16:22:47.9652409Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2018-06-11T16:22:48.9960651Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
2018-06-11T16:22:48.9970661Z ##[section]Finishing: Perform DeployFromPackage

Tagged:

Answers

  • Andrea_AngellaAndrea_Angella Posts: 66 Silver 4
    edited December 13, 2018 11:30AM
    When the script runs, it's trying to automatically download the DLMAutomation module from the PowerShell gallery https://www.powershellgallery.com/packages/DLMAutomation/2.1.3.2175

    If it can't download the module from the gallery, it tries to see if you installed DLM using one of our installers and use the module from the installation directory.

    The module contains all the cmdlets needed by the VSTS plugin to execute the database build and release.

    Make sure you have access to the Internet so that the script can correctly download the module from the PS gallery or manually install DLM on your agent. Alternatively, you can manually install the module using the Install-Module cmdlet.

    However, I recommend you to use version 3 of the VSTS plugins now called SQL Change Automation that is using the latest version of the module from the PS Gallery. The older DLMAutomation module is no longer maintained. This is the link to the new module https://www.powershellgallery.com/packages/SqlChangeAutomation/3.1.3.3059

    This screenshot shows how you can upgrade to version 3



    You no longer need to install SQL Change Automation on your agents. The VSTS plugins should automatically download the latest SqlChangeAutomation module from the gallery.
     
    After the upgrade, all your pipelines should continue to work as before. In specific scenarios, you might need to make some minor adjustments. If you need any help, just ask in the forum or contact support at support@red-gate.com
    Andrea Angella
    Lead Software Engineer | Red Gate
    Website: www.productivecsharp.com
    Twitter: @angella_andrea
Sign In or Register to comment.