cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
686 stars 230 forks source link

Namespace error #397

Open christopherbates opened 2 months ago

christopherbates commented 2 months ago

I keep running into the following error when trying to import the modules:

PS C:\Users\chbates\Repos\windows-imaging-tools> Import-Module .\WinImageBuilder.psm1
Add-Type: C:\Users\chbates\Repos\windows-imaging-tools\Interop.ps1:1353
Line |
1353 |      Add-Type -TypeDefinition $code -ReferencedAssemblies "System.Xml" …
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | (15,19): error CS0234: The type or namespace name 'RegularExpressions' does not exist in the namespace 'System.Text' (are you missing an assembly reference?) using System.Text.RegularExpressions;
     | ^
Import-Module: The specified module '.\WinImageBuilder.psm1' was not loaded because no valid module file was found in any module directory.
ader1990 commented 2 months ago

Hello,

The tool works only on PS version 4 and 5 with .NET 4. I have just added a github actions gate to make sure that these errors do not happen on the Github Actions environment.

Can you please share the $PSVersionTable PowerShell variable contents and the systeminfo.exe output?

Thanks.