Thomas Ottenhus

Results 68 comments of Thomas Ottenhus

I just did some digging and I think I found the underlying problem: Text-Parsing! ```powershell $stdOut -match "Successfully created package '(.*.nupkg)'" | Out-Null $nupkgFullFile = $matches[1] ``` My machine speaks...

``` PS> Get-Module PowerShellGet -ListAvailable Directory: C:\Program Files\PowerShell\Modules ModuleType Version PreRelease Name PSEdition ExportedCommands ---------- ------- ---------- ---- --------- ---------------- Script 2.0.1 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-M… Directory: C:\program files\powershell\7\Modules...

Out of interest I imported it manually: `PS> ipmo PowerShellGet -MinimumVersion "2.2.3"` and now am able to use it. Might there be a Problem with your module-loading preference?

For further reference - I probably have lot's of versions, since I author an package and upload it to PSG. Thus I installed an upgrade of PackageManagement into 5.1 and...

I can **mitigate** the issue by explicitly loading PackageManagement Version 2.2.3. So I'd not call it resolved, but I'm not the one deciding for your product.

I think I found the underlying problem for the issue. I installed Powershell 6 some time ago and it created `C:\Program Files\PowerShell\Modules` where `PowerShellGet 2.0.1` has been placed by PS6....

I can recreate the original issue, if I swap the paths. Module loading seems to prefer the latest version from each location, but stops looking in other locations if one...

It was late, when I answered, so I did not fully digest `PowerShell/7/Modules` being the out-of-the-box packages, so - yes - the order is correct.. Nevertheless, if you are upgrading...

I'll add, it's not only problematic with Razor pages, but controllers will also show the AmbigousMatchException behavior

I installed `7.0.0-rtm.22466.6` and was not able to reproduce the bug anymore :)