Skip to content

Instantly share code, notes, and snippets.

@Iristyle
Last active Oct 5, 2016
Embed
What would you like to do?
PS Host compiler errors
Add-Type : (157) : The type 'Console' exists in both 'System.Console, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' and 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e'
(156) : {
(157) : >>> System.Console.SetError(_errWriter);
(158) : System.Console.SetOut(_outWriter);
At /Users/Iristyle/source/puppetlabs-powershell/lib/puppet_x/templates/init_ps.ps1:359 char:1
+ Add-Type -TypeDefinition $hostSource -Language CSharp -ReferencedAsse ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type],
Exception
+ FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
Add-Type : (158) : The type 'Console' exists in both 'System.Console, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' and 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=7cec85d7bea7798e'
(157) : System.Console.SetError(_errWriter);
(158) : >>> System.Console.SetOut(_outWriter);
(159) : }
At /Users/Iristyle/source/puppetlabs-powershell/lib/puppet_x/templates/init_ps.ps1:359 char:1
+ Add-Type -TypeDefinition $hostSource -Language CSharp -ReferencedAsse ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type],
Exception
+ FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand
Add-Type : Cannot add type. Compilation errors occurred.
At /Users/Iristyle/source/puppetlabs-powershell/lib/puppet_x/templates/init_ps.ps1:359 char:1
+ Add-Type -TypeDefinition $hostSource -Language CSharp -ReferencedAsse ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Add-Type], InvalidOperationException
+ FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment