OneGet / oneget

PackageManagement (aka OneGet) is a package manager for Windows
MIT License
2.38k stars 189 forks source link

Trying to build a PowerShell Package Provider #74

Closed dfinke closed 9 years ago

dfinke commented 9 years ago

I downloaded the latest OneGet.

I added MyTestPackageProvider.psm1 (also tried MyTest.psm1) to the $PSHOME\Modules\oneget. Did an ipmo oneget -force, then tried Get-PackageProvider but don't see this provider there.

fearthecowboy commented 9 years ago

The module has to be referenced from a .psd1 that's in the PSModulePath.

The plugin loader goes thru all the modules in the PSModulepath and looks for modules that contain a PrivateData something like :

    PrivateData = @{"OneGetProviders" = 'MyProvider.psm1'}

in the manifest.

it will then load the specified psm1 file as the provider.

with the sample you should be able to go into the sample folder and run the run_oneget.cmd script and it will load that provider.

dfinke commented 9 years ago

No go. I grabbed the wip branch but don't see the sample folder or run_oneget.cmd

fearthecowboy commented 9 years ago

Oh, no -- grab the sample at http://oneget.org/provider-ps.zip

dfinke commented 9 years ago

Works like a charm