Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace error #397

Open
christopherbates opened this issue Sep 23, 2024 · 1 comment
Open

Namespace error #397

christopherbates opened this issue Sep 23, 2024 · 1 comment

Comments

@christopherbates
Copy link

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants