I want to compile a C # class that uses the COM type library in PowerShell. If using .NET assambly, then I use code
Add-Type -ReferencedAssemblies @( $assemby) -TypeDefinition $code -Language CSharp Where $assemby variable with .NET assambly. When you create a project in pure C #, you can add a Reference to the COM type library. And in powershell it is possible? (I know about working with COM in Powershell itself.)
msbuilddoes when building the project, namely: import the COM type library using the tlbimptlbimpand add the resulting assembly to theReferencedAssembliesparameter. - PetSerAl