0

When I open the Package Manager Console in VS2015 I am 'greeted' by the following error message:

The module to process 'nuget.psm1', listed in field 'ModuleToProcess' of module manifest 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\T3SN2KBD.PPE\Modules\NuGet\NuGet.psd1' was not processed because no valid module was found in any module directory.

I've had a browse around and adding stuff to the devenv.exe.config as detailed here did not resolve my problem. Apart from that post I can't really find that much about this error.

There are no pending updates and I have tried reinstalling nuget and the Power Shell Tools for VS2015 (which I did not have installed and only generated more errors in the console window - so I removed it again)

Any input greatly appreciated

Updates:

  • Checked that file(s) exist and are accessible
  • Checked/Updated Execution Policy (CurrentUser and LocalMachine are now Unrestricted)
  • Reinstalled NuGet
  • This is an issue on Visual Studio 2013 and 2015 on this workstation
  • Running Powershell v5.0.10586.122
DilbertDave
  • 3,406
  • 3
  • 33
  • 42
  • Did you checked, whether there is a `NuGet.psm1` and `NuGet.psd1` in `C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\T3SN2KBD.PPE\Modules\NuGet`? – Martin Brandl May 14 '16 at 07:25
  • @jisaak - yep, both files are present, accessible and appear to be intact – DilbertDave May 14 '16 at 07:36
  • hm, okay. Maybe try to Import the module manuell to see if you get any additional errors using `Import-Module C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\EXTENSIONS\T3SN2KBD.PPE\Modules\NuGet\NuGet.psd1 -Debug` – Martin Brandl May 14 '16 at 08:24
  • Unfortunately I don't have a prompt in the Package Manager Console – DilbertDave May 14 '16 at 09:12
  • Just open powershell and try it out, not Visual Studio. – Martin Brandl May 14 '16 at 09:28
  • Tried that - it complains about being the wrong host (Console Host instead of Package Manager Host) – DilbertDave May 14 '16 at 09:29
  • oh, you are right, sorry, no idea anymore – Martin Brandl May 14 '16 at 09:43
  • Does [this page](http://stackoverflow.com/questions/9903303/entity-framework-with-nuget-import-module-error-in-init-ps1) help at all? -edit: If that's not helpful (apologies, that link is for EntityFramework) you might have to resort to using ProcMon to capture what VS is trying to do. – user4317867 May 15 '16 at 23:45
  • Not the same issue I'm afraid.. – DilbertDave May 16 '16 at 19:27

1 Answers1

0

Well I seem to have fixed the issue with help from this SO post - or more accurately one of the comments on the accepted answer.

I had previously seen and tried this solution to no avail but in the comments a user mentions editing the file at c:\Users\%username%\AppData\Local\Microsoft\VisualStudio\14.0\devenv.exe.config‌​

Well that did the trick. Despite adding the lines to the 'main' devenv.exe.config they don't seem to have made their way to this 'working?' folder.

Wasted a lot of time on this so I hope this helps the next poor soul to stumble across this issue.

DilbertDave
  • 3,406
  • 3
  • 33
  • 42