Closed fangaofeng closed 1 year 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
The error may be caused by Powershell 7, roll back or use Powershell 5.1 instead.
Closing the issue, as there were no more replies from the issue creator.
can confirm this error occurs with Powershell 7 and does work fine with 5.1
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>