Hello,
Looking for some guidance, I just updated to the latest 2021.10.0 build and I’m running into two issues when packaging my script I haven’t seen before (same project has been bundled hundreds of times up until I just updated) It now seems to fail when attempting to package the PowerCLI module and then 2 additional .ps1 scripts I have.
See output below:
When attempting to package with PowerCLI module
Build started…
------ Build started: Project: CMTGUI, Configuration: Debug Any CPU ------
Checking license
OutputPath is C:\Users\XXX\source\repos\CMTGUI\bin\Debug
Bundling CMTGUI.ps1
Parsing file CMTGUI.ps1.
Parsing file C:\Users\XXX\source\repos\CMTGUI\XMLSource.ps1.
Parsing file C:\Users\XXX\source\repos\CMTGUI\Base64Source.ps1.
Found module import ‘Import-Module Posh-SSH’ at 27213
Packager PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Users\XXX\OneDrive - XXX, Inc\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
Replacing module Posh-SSH
Found module import ‘Import-Module VMware.PowerCLI’ at 41593
Packager PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Users\XXX\OneDrive - XXX, Inc\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
Failed to run ‘Import-Module VMware.PowerCLI’. Expecting state ‘Element’… Encountered ‘Text’ with name ‘’, namespace ‘’.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\PowerShell Tools for Visual Studio\PowerShellProTools.targets(4,5): error : The given path’s format is not supported.
Done building project “CMTGUI.pssproj” – FAILED.
Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Packaging when attempting to dot source in the additional two scripts:
Build started…
------ Build started: Project: CMTGUI, Configuration: Debug Any CPU ------
Checking license
OutputPath is C:\Users\XXX\source\repos\CMTGUI\bin\Debug
Bundling CMTGUI.ps1
Parsing file CMTGUI.ps1.
Parsing file C:\Users\XXX\source\repos\CMTGUI\XMLSource.ps1.
Parsing file C:\Users\XXX\source\repos\CMTGUI\Base64Source.ps1.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\PowerShell Tools for Visual Studio\PowerShellProTools.targets(4,5): error : The given path’s format is not supported.
Done building project “CMTGUI.pssproj” – FAILED.
Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Error when attempting to both bundle the addtional scripts and package the PowerCLI module:
Build started…
------ Build started: Project: CMTGUI, Configuration: Debug Any CPU ------
Checking license
OutputPath is C:\Users\XXX\source\repos\CMTGUI\bin\Debug
Bundling CMTGUI.ps1
Parsing file CMTGUI.ps1.
Parsing file C:\Users\XXX\source\repos\CMTGUI\XMLSource.ps1.
Parsing file C:\Users\XXX\source\repos\CMTGUI\Base64Source.ps1.
Found module import ‘Import-Module Posh-SSH’ at 27213
Packager PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Users\XXX\OneDrive - XXX, Inc\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
Replacing module Posh-SSH
Found module import ‘Import-Module VMware.PowerCLI’ at 41593
Packager PSModulePath: C:\Program Files\WindowsPowerShell\Modules;C:\Users\XXX\OneDrive -XXX, Inc\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\windows\system32\WindowsPowerShell\v1.0\Modules
Failed to run ‘Import-Module VMware.PowerCLI’. Expecting state ‘Element’… Encountered ‘Text’ with name ‘’, namespace ‘’.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\PowerShell Tools for Visual Studio\PowerShellProTools.targets(4,5): error : The given path’s format is not supported.
Done building project “CMTGUI.pssproj” – FAILED.
Build FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Tool: Visual Studio, Visual Studio Code, PSScriptPad, PowerShell Module
Version: