Octopus step templates throws always warning about <>f__AnonymousType0`1

Hello,

I am using SQL Change Automation 3.0.5.2759 together with Octopus deploy v 2018.3.6 and  Redgate - Create Database Release and Redgate - Deploy from Database Release step templates always throw warning because of which we never have clean green Octopus build. Octopus build is marked as success with warning which is

Telemetry: Cannot add type. The type name '<>f__AnonymousType0`1' already exists.

Check the attached complete log from the step template.

Best Regards !

/ Yogesh

Tagged:

Comments

  • DiogoDiogo Posts: 67 Silver 5
    edited September 24, 2018 4:48PM
    This won't cause any issues with you deployment using SQL Change Automation.

    This should be addressed by installing PowerShell Get 2 on the tentacle.
    You can do this by running the following as an admin in PowerShell on the tentacle

    Update-Module -Name PowerShellGet



    More info:
    The problem occurs because you have PowerShell Get 1.0.0.1 on the machine, and we require at least 1.6. So we install that but due to an issue in PowerShell Get, you get the warning when we install version 2 of the module.
  • ybholeybhole Posts: 5 New member
    Thanks for the support. After installing PowerShellGet I get no more warnings in Octopus Deploy.

    By the way I have to execute following command (with -Force option) on Octopus tentacle server
    Install-Module –Name PowerShellGet –Force
    as mentioned at https://docs.microsoft.com/en-us/powershell/gallery/installing-psget
    Without -Force option gave following errors
    <div>PS D:\> Update-Module -Name PowerShellGet</div><div>Update-Module : Module 'PowerShellGet' was not installed by using Install-Module, so it cannot be updated.</div><div>At line:1 char:1</div><div>+ Update-Module -Name PowerShellGet</div><div>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>&nbsp; &nbsp; + CategoryInfo&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : InvalidOperation: (PowerShellGet:String) [Write-Error], WriteErrorException</div><div>&nbsp; &nbsp; + FullyQualifiedErrorId : ModuleNotInstalledUsingInstallModuleCmdlet,Update-Module</div><div><br></div><div>PS D:\> Install-Module -Name PowerShelletGet</div><div>PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PowerShelletGet'.</div><div>At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1375 char:21</div><div>+ ...&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $null = PackageManagement\Install-Package @PSBoundParameters</div><div>+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>&nbsp; &nbsp; + CategoryInfo&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception</div><div>&nbsp; &nbsp; + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage</div>
Sign In or Register to comment.