README.md is missing information required to get the PowerShell module to import properly.
Opened this issue · 3 comments
Brief description of your issue
After freshly cloning and building the repository, the Tools\PowerShellModule\src\Microsoft.WinGet.Source.psd1 module cannot be imported:
Add-Type : Cannot bind parameter 'Path' to the target. Exception setting "Path": "Cannot find path
'C:\src\winget-cli-restsource\Tools\PowershellModule\src\Library\HelperLib\x64\Microsoft.Winget.PowershellSupport.dll'
because it does not exist."
At C:\src\winget-cli-restsource\Tools\PowershellModule\src\Microsoft.WinGet.Source.psm1:24 char:32
+ ... -Type -Path "$PSScriptRoot\Library\HelperLib\x64\Microsoft.Winget.Pow ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Add-Type], ParameterBindingException
+ FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.PowerShell.Commands.AddTypeCommand
In fact, there's no Tools\PowerShellModule\src\Library\HelperLib\x64
path at all.
I manually copied the contents of %reporoot%\src\WinGet.RestSource.PowerShell\bin\debug\netstandard2.1
into %reporoot%\Tools\PowerShellModule\src\Library\HelperLib\x64
which appeared to be enough to allow the Microsoft.WinGet.Source.psd1 file to import.
I'm reporting this because I didn't see any mention of this in the README.md, and this is critical information needed to get the cmdlets to work. The docs should be updated to make sure these steps are mentioned so that the PowerShell module is usable.
Hi @ameltzerMSFT, the inclusion of the ..\HelperLib\x64 is included as part of the Released PowerShell module. On a new release of the project the HelperLib is included in the PowerShell module compressed folder.
Hi @ameltzerMSFT, the inclusion of the ..\HelperLib\x64 is included as part of the Released PowerShell module. On a new release of the project the HelperLib is included in the PowerShell module compressed folder.
just downloaded the latest release and the file (and folder) is missing in WinGet.RestSource-Winget.PowerShell.Source.zip. No such folder as HelperLib\x64. Copied the file from WinGet.RestSource-WinGet.RestSource.Functions\bin