Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md is missing information required to get the PowerShell module to import properly. #172

Open
ghost opened this issue Sep 27, 2022 · 3 comments
Assignees
Labels
Issue-Docs Improvements or additions to documentation
Milestone

Comments

@ghost
Copy link

ghost commented Sep 27, 2022

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.

@ghost ghost added the Issue-Docs Improvements or additions to documentation label Sep 27, 2022
@RDMacLachlan
Copy link
Member

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.

@ghost
Copy link
Author

ghost commented Oct 5, 2022 via email

@ElianeMegert
Copy link

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

@denelon denelon added this to the 1.9-REST milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Docs Improvements or additions to documentation
Projects
Status: To Do
Development

No branches or pull requests

3 participants