OneGet / oneget

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

Publish-Module keeps reporting it can't build the NuGet package #146

Closed heaths closed 7 years ago

heaths commented 9 years ago

Whenever I try to run publish-module on a valid module with strong-named signed assemblies, I get various errors. First it was reporting that Find-Module couldn't find my module (well, yeah - I was trying to publish the first version). If I modified psget.psm1 to ignore that error, later I was getting errors on line 2880 of psget.psm1 (on Win10 RTM). NuGet reported that a type couldn't be loaded (whether I used a loaded module, discovered module, or directory path) but no errors in the $Error collection contained the LoaderException referenced (apparently this exception occurred in the NuGet process). I modified psget.psm1 to spit out the $nospec variable and used nugget 2.8.6 (in my PATH, if that matters for the error at hand) to build a .nupkg successfully. I pushed that via "nuget push" and finally got it published myself. But then Install-Module failed with the same error!

As a test, I tried using Install-Module on PSReadline and that also failed with the same error.

I'm on Win10 RTM with all updates applied, and had VS2013 and VS2015 (which has nuget v3, but should be completely isolated currently) with nuget 2.8.6 in my path.

I tried to update PackageManagement and PowerShellGet via the PackageManagement module but it reported they were up to date (for the former) or not found (for the latter).

Jaykul commented 9 years ago

Is your module code posted anywhere? ;-)

It sounds like you may have a problem with your module manifest (.psd1) -- do you have anything in RequiredModules (or NestedModules)?

For what it's worth, the nuget that PackageManagement (aka OneGet) is using is stored in AppData\Local\PackageManagement\ProviderAssemblies and it's v2.8.5.21 (at least on my box).

It's probably worth pointing out -- although you may realize this, and it doesn't matter much to me ;-) that the problem you're having is most likely not a OneGet problem, it's a PowerShellGet problem, and that team isn't really on github yet, as far as I know they're still testing the open source waters with DSC modules and not much else, and they're still using Connect for bug reports.

heaths commented 9 years ago

It's the "msi" module on powershellgallery.com.

Thanks for the tip about Connect. I wasn't sure who owned it, and saw a PowerShellGet directory in the OneGet sources so thought maybe they had taken it over.

heaths commented 9 years ago

Just as a follow up, posted to https://connect.microsoft.com/PowerShell/feedbackdetail/view/1678384/publish-module-keeps-reporting-it-cant-build-the-nuget-package.

jianyunt commented 7 years ago

This issue was moved to PowerShell/PowerShellGet#51