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

have a error ,System.Text not exist #355

Closed fangaofeng closed 1 year ago

fangaofeng commented 3 years ago

PS E:\openstack> pushd windows-openstack-imaging-tools PS E:\openstack\windows-openstack-imaging-tools> Import-Module .\WinImageBuilder.psm1 Add-Type: E:\openstack\windows-openstack-imaging-tools\Interop.ps1:1353 Line | 1353 | Add-Type -TypeDefinition $code -ReferencedAssemblies "System.Xml" … | ~~~~~~~~~~~~~ | (15,19): error CS0234: 命名空间“System.Text”中不存在类型或命名空间名“RegularExpressions”(是否缺少程序集引用?) 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. PS E:\openstack\windows-openstack-imaging-tools>

ader1990 commented 3 years ago

Hello,

What Windows versions / PS version are you running the script on? Make sure you have the latest updates and you use a Windows 10 or Windows Server 2016 or greater for the best results.

Please check the requirements presented here: https://github.com/cloudbase/windows-openstack-imaging-tools#requirements

Thank you, Adrian Vladu

kressety commented 2 years ago

The error may be caused by Powershell 7, roll back or use Powershell 5.1 instead.

ader1990 commented 1 year ago

Closing the issue, as there were no more replies from the issue creator.

MrEasy commented 1 year ago

can confirm this error occurs with Powershell 7 and does work fine with 5.1