Visual Studio 2017 - Unable to initialize powershell host - visual-studio

Day 1:
System: Windows 10
Microsoft Visual Studio Community 2017
Version 15.5.5
VisualStudio.15.Release/15.5.5+27130.2026
I have a website project that is making use of the WindowsAzure.Storage NuGet package.
From within Visual Studio, I do the following:
Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution ...
The system displays 2 updates are available:
Newtonsoft.Json v10.0.3 (currently installed v9.0.1)
WindowsAzure.Storage v9.0 (currently installed v8.7)
I select check the "Select all packages" checkbox and click the "Update" button.
FAIL (Never had this happen before) !!
Below is the output captured from Visual Studio:
Retrieving package 'WindowsAzure.Storage 9.0.0' from 'nuget.org'.
...
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The term 'Get-ExecutionPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Install failed. Rolling back...
Error List Window shows:
Failed to initialize the PowerShell host. If your PowerShell execution policy setting is set to AllSigned, open the Package Manager Console to initialize the host first.
Powershell output from: Get-ExecutionPolicy -List output:
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Unrestricted
LocalMachine Unrestricted
Is there a problem with the NuGet package itself or my system?
I have never had this issue before and after searching for a solution (none found so far) -- I am at the mercy of the NuGet / Visual Studio gods!
Thanks in advance.
======
Day 2: 8:00 am ...
Trying again... Lets see if we can get the Package Manager Console working...
Start Visual Studio (Community 2017)
TOOLS -> NuGet Package Manager -> Package Manager Console
Which results in the following being displayed:
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The term 'Get-ExecutionPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Back to the drawing board! Will continue looking for a solution...
So, let's try Visual Studio Installer...
Launch Visual Studio Installer
Select "More" -> "Repair"
Which results in:
The dependent package cannot be found: Component.PowerShellTools.VS2017,version=3.0.585
I click on "View Log", which displays:
[1cb4:000a][2018-02-17T08:27:06] Error 0x80131500: The dependent package cannot be found: Component.PowerShellTools.VS2017,version=3.0.585
at Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.FindDependentPackages(Dependency dependency, DependencyComparer comparer, Dictionary`2 packageIndex)
at Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraphRecursive(IPackage graphRoot, DependencyNode node, DependencyComparer comparer, Dictionary`2 packageIndex, Dictionary`2 nodeIndex, Boolean splitNodes)
at Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraphCore(IPackage root, IEnumerable`1 packages, DependencyComparer comparer, Dictionary`2 packageIndex, Dictionary`2 nodeIndex, Boolean splitNodes, DependencyCollection deprecated)
at Microsoft.VisualStudio.Setup.Dependencies.DependencyManager.BuildGraph(IPackage root, IEnumerable`1 packages, Boolean isUpdate, IDependencyComparisonSeed seed, DependencyCollection deprecated)
at Microsoft.VisualStudio.Setup.Engine.GetDependencyGraph(Product product)
at Microsoft.VisualStudio.Setup.Engine.PreChecks(String installationPath, Boolean isLayoutSet, Product product, ExecuteAction bootstrapperAction, ITelemetryOperation operation, IQuery query)
at Microsoft.VisualStudio.Setup.Engine.Repair(CancellationToken token)
Ok - so somehow, my system has lost a dependent package (Component.PowerShellTools.VS2017) -- will try modify to see if I can add the package...
======
Day 2 - 10:15 am (still at it) - current state -- at wits end...
Microsoft Visual Studio Community 2017
Version 15.5.6
VisualStudio.15.Release/15.5.6+27130.2027
Microsoft .NET Framework
Version 4.7.02556
I do the following:
TOOLS -> NuGet Package Manager -> Package Manager Console
Which results in the following being displayed:
If anyone (Microsoft) has a solution -- I would REALLY appreciate it !
======
Day 2: 3:09 pm ...
In one final (desperate) attempt, I Launched Visual Studio Installer
Click on "More" -> "Repair" ....
After a couple of hours Visual Studio was (re)installed:
Microsoft Visual Studio Community 2017
Version 15.5.6
VisualStudio.15.Release/15.5.6+27130.2027
Microsoft .NET Framework
Version 4.7.02556
I then do the following (after lighting 12 candles and chanting "Bill-Bill-Bill")...
TOOLS -> NuGet Package Manager -> NuGet Manager Console
Result:
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The term 'Get-ExecutionPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I am doomed -- I cannot use Visual Studio until this is fixed.
======
Day 3 - 7:49 am
I see my issue has been Triaged by MSFT at:
https://developercommunity.visualstudio.com/content/problem/199976/visual-studio-failed-to-initialize-the-powershell.html
Have also tried the "solutions" from these resources:
https://developercommunity.visualstudio.com/content/problem/154563/failed-to-initialize-the-powershell-host.html
https://learn.microsoft.com/en-us/nuget/release-notes/known-issues#opening-package-manager-console-fails-with-objectsecurity-exception
Unfortunately, none of the above have helped to correct this issue.
Most posts indicate a complete re-install of VS may be needed -- good grief!!
Hoping a solution will be found that DOES NOT REQUIRE A COMPLETE RE-INSTALL!
======
Day 3 - 1:54 pm
Gave up ...
UNINSTALLED Visual Studio. Shutdown (powered down system)
Startup (powered up system)
Downloaded Visual Studio installer from
https://www.visualstudio.com/downloads/
Ran Disk Clean app as per installer instructions.
Shutdown (powered down system)
Startup (powered up system)
Ran Visual Studio 2017 Community Installer - success.
Start Visual Studio
TOOLS -> NuGet Package Manager -> Package Manager Console
Result:
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The term 'Get-ExecutionPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
So - not even a fresh installation of Visual Studio Community is solving this problem !!!!
======
Day 4 - 9:11 am
Late last night I opened a new issue at GitHub re PowerShell, see:
https://github.com/PowerShell/PowerShell/issues/6189
This morning, found a reply and took the suggestion of lzybkr and disabled Powershell V2; I posted the commands for disabling V2 on the GitHub post above.
The good news - I was able to update packages via NuGet again!
The bad news - If I start Visual Studio and then do:
TOOLS -> NuGet Package Manager -> Package Manager Console
The console window opens, but simply hangs with the following message:
Initializing Powershell host...
I STILL have NO idea WHAT is causing this behavior within Visual Studio; but after 4 days, I am just considering myself lucky that I can (once again) update NuGet packages and get back to work.
Although my "issue" of updating NuGet packages has (for the most part) been resolved, I still do not see this as a solution as the root cause of why Visual Studio / NuGet Package Manager Console cannot initialize the PowerShell host has NOT been resolved.
Should anyone find the root cause, please post your solution.

The following finally solved the problem described above:
https://developercommunity.visualstudio.com/content/problem/199976/visual-studio-failed-to-initialize-the-powershell.html

We have finally identified the root cause of the issue, and will be fixing in 15.8 release of Visual Studio.
For now, the possible workarounds for this are:
1) Install .NET 2.0 on your machine, which will install the System.Management.Automation Version=1.0.0
2) Use the binding redirect as suggested by some of the members of the community in devenv.exe.config:
<dependentAssembly>
<assemblyIdentity name="System.Management.Automation" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
<publisherPolicy apply="no" />
</dependentAssembly>
Thanks,
Rohit Agrawal
NuGet Team

Related

Can't install gin-gonic: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine)

I can't install gin-gonic for my golang project. I tried reinstalling go, resetting the bash files, delete and recreate the project folder, and searched the error as keyword on google, but found nothing
Here are my terminal messages:
$ go get -u github.com/gin-gonic/gin
# github.com/gin-gonic/gin
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin#v1.7.5\context.go:735:13: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine)
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin#v1.7.5\gin.go:154:3: unknown field 'UseRawPath' in struct literal of type Engine
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin#v1.7.5\gin.go:156:3: unknown field 'UnescapePathValues' in struct literal of type Engine
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin#v1.7.5\gin.go:508:11: engine.UseRawPath undefined (type *Engine has no field or method UseRawPath)
..\..\..\..\go\pkg\mod\github.com\gin-gonic\gin#v1.7.5\gin.go:510:20: engine.UnescapePathValues undefined (type *Engine has no field or method UnescapePathValues)
I downgraded to v1.7.2 and everything worked well. Take a look at https://github.com/gin-gonic/gin/issues/2948
I have the same problem when using gin#v1.7.5, so I downgrade to gin#v1.7.4, and it works well
I had the same problem. but I resolve it with root on ubuntu. Similarly, It'd be good to execute with "run as administrator"

Getting error while launching AUT for recording - Timeout error :AUT doesn't respond

I'm trying to record tests on my app. I could successfully add AUT( in applications view) But when i'm to record test My App is loaded (AUT has splash screen to get credentials, after entering credentials AUT is loaded ) and i can interact with AUT, but RCPTT errors out with message
Timeout error :AUT doesn't respond.
Following is the log:
These are some parts from log.
!ENTRY org.eclipse.emf.ant 4 0 2019-10-08 09:41:24.138
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.ant [146]
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.codegen [147]
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.codegen.ecore [148]
Unresolved requirement: Require-Bundle: org.eclipse.jdt.core; bundle-version="[3.5.0,4.0.0)"
java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired. Parser will use a default ErrorHandler to print the first 0 errors. Please call the setErrorHandler method to fix this
Warning: NLS unused message: DIRView_btnCheckButton_text in: com.student.programs.ui.view.messages
Error: URI=null Line=5448: Attribute value "CVC100150" of type ID must be unique within the document.
Error: URI=null Line=6566: Attribute value "CVC102357" of type ID must be unique within the document.
Error: URI=null Line=6757: The content of element type "lists" must match "(list)+".
UPDATE:
Following is how i'm launching RCPTT IDE.
- Downloaded the RCPTT IDE from eclipse downloads
- Launching RCPTT by using exe
- Create new RCPTT project
- Add AUT to the RCPTT IDE
- start recording test This is when i see the error
The most probable reason is this: RCPTT Runtime plug-in is not being installed/activated in your AUT. Without this being active, the AUT is invisible to the RCPTT Runner.
With OSGi console of the AUT you could have tell that for sure.
I advice you to reach out to developers and find out together why runtime plug-in is not being activated. This should happen once the login screen is gone and the AUT's Workbench is displayed.
Hint: RCPTT's runtime is called Tesla, can you find a line beginning with this?
!MESSAGE Tesla server started on port
Update: I took a look at the log and it is like RCPTT IDE is installed as part of the AUT, not just the Runtime plug-in. Is this intentional? Your application will also be able to create RCPTT tests?

CRM solution import Error while importing workflow

I'm using CRM 2016, I have solution has many resources and entities, while import unmanaged solution to other CRM Org, I got error on process (name: Delete MEW) workflow ( this process doing changes on values from other entity), error as shown in log trace
Error while importing workflow {9b58220a-6706-4765-b2c0-86e7381064a8}
name Delete WEM
Error Number: 0x80040216
Error Message: Error while importing workflow
{9b58220a-6706-4765-b2c0-86e7381064a8} name Delete WEM
Error Details: Error while importing workflow
{9b58220a-6706-4765-b2c0-86e7381064a8} name Delete WEM
Source File: Not available
Line Number: Not available
Request URL:
Stack Trace Info: [CrmException: Error while importing workflow
{9b58220a-6706-4765-b2c0-86e7381064a8} name Delete WEM] at
Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
I tried to add it to another new solution, it give me the same issue.

Compile Error in using /usr/include/net/if.h

I'm trying to compile existing source code for a network sniffer on my Mac Lion. I installed libpcap. The source includes a header file /usr/include/net/if.h, which is throwing compilation errors as shown below.
Floyd:~ Shastry$ gcc -o arplisten arplisten.c -lpcap
In file included from arplisten.c:4:
/usr/include/net/if.h:265: error: field ‘ifru_addr’ has incomplete type
/usr/include/net/if.h:266: error: field ‘ifru_dstaddr’ has incomplete type
/usr/include/net/if.h:267: error: field ‘ifru_broadaddr’ has incomplete type
/usr/include/net/if.h:308: error: field ‘ifra_addr’ has incomplete type
/usr/include/net/if.h:309: error: field ‘ifra_broadaddr’ has incomplete type
/usr/include/net/if.h:310: error: field ‘ifra_mask’ has incomplete type
/usr/include/net/if.h:393: error: field ‘addr’ has incomplete type
/usr/include/net/if.h:394: error: field ‘dstaddr’ has incomplete type
arplisten.c:6:24: error: netinet/if.h: No such file or directory
arplisten.c: In function ‘main’:
arplisten.c:139: warning: incompatible implicit declaration of built-in function ‘strlen’
Floyd:~ Shastry$
I did a lot of googling for help, in vain. Can someone please help me with this?
It looks like it's the order in which files are included. See this page, which I found via google.

NuGet fails to load PowerShell

I have a problem similar to the reflector problem, except that I don't have the Reflector plugin installed, and I still can't start the NuGet console. I'm running on Windows 7 Professional, VS 2010 SP1.
Nuget works fine through the GUI, but for instance, I can't install *.vsdoc files without the console.
The following error is:
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2943) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: Cannot convert the "Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase" value of type "System.String" to type "System.Type".
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2950) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: Cannot convert the "Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase" value of type "System.String" to type "System.Type".
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2957) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: Cannot convert the "Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase" value of type "System.String" to type "System.Type".
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2964) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: Cannot convert the "Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase" value of type "System.String" to type "System.Type".
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(2971) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: Cannot convert the "Microsoft.PowerShell.Commands.SecurityDescriptorCommandsBase" value of type "System.String" to type "System.Type".
The following error occurred while loading the extended type data file: , C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Types.ps1xml(9) : Error in type "System.__ComObject#{866311e6-c887-4143-9833-645f5b93f6f1}": Exception: Cannot convert the "NuGet.VisualStudio.ProjectExtensions" value of type "System.String" to type "System.Type".
The following error occurred while loading the extended type data file: , C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\1.2.20325.9034\Scripts\NuGet.Types.ps1xml(33) : Error in type "Microsoft.VisualStudio.FSharp.ProjectSystem.Automation.OAProject": Exception: Cannot convert the "NuGet.VisualStudio.ProjectExtensions" value of type "System.String" to type "System.Type".
System.Management.Automation.CmdletInvocationException: Could not load file or assembly 'Scripts\nuget.psm1' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) ---> System.IO.FileLoadException: Could not load file or assembly 'Scripts\nuget.psm1' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) ---> System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.Combine(String path1, String path2)
at Microsoft.VisualStudio.Platform.VsAppDomainManager.<AssemblyPaths>d__1.MoveNext()
at Microsoft.VisualStudio.Platform.VsAppDomainManager.InnerResolveHandler(String name)
at Microsoft.VisualStudio.Platform.VsAppDomainManager.ResolveHandler(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
--- End of inner exception stack trace ---
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadBinaryModule(Boolean trySnapInName, String moduleName, String fileName, Assembly assemblyToLoad, String moduleBase, SessionState ss, String prefix, Boolean loadTypes, Boolean loadFormats, Boolean& found)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleNamedInManifest(String moduleName, String moduleBase, Boolean searchModulePath, String prefix, SessionState ss, Boolean loadTypesFiles, Boolean loadFormatFiles, Boolean& found)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModuleManifest(ExternalScriptInfo scriptInfo, ManifestProcessingFlags manifestProcessingFlags, Version version)
at Microsoft.PowerShell.Commands.ModuleCmdletBase.LoadModule(String fileName, String moduleBase, String prefix, SessionState ss, Boolean& found)
at Microsoft.PowerShell.Commands.ImportModuleCommand.ProcessRecord()
at System.Management.Automation.Cmdlet.DoProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.Runspaces.Pipeline.Invoke()
at NuGetConsole.Host.PowerShell.Implementation.PowerShellHost.Invoke(String command, Object input, Boolean outputResults)
at NuGetConsole.Host.PowerShell.Implementation.PowerShellHostExtensions.ImportModule(PowerShellHost host, String modulePath)
at NuGetConsole.Host.PowerShell.Implementation.PowerShellHost.LoadStartupScripts()
at NuGetConsole.Host.PowerShell.Implementation.PowerShellHost.Initialize()
at NuGetConsole.Implementation.Console.ConsoleDispatcher.Start()
at NuGetConsole.Implementation.PowerConsoleToolWindow.MoveFocus(FrameworkElement consolePane)
The only solution that worked was to start the PowerShell manually before starting VS2010.
So if anybody had this problem that's the quick fix.
NuGet needs Powershell2 to work correctly. You can download and install if from here: http://support.microsoft.com/kb/968929
Starting the powershell doesn't help me. I found that this is an known issue of Nuget. You get this issue because you have red gate reflector add-in installed and enabled. If you update Reflector to the latest version (>= 6.5), it should work.
Please take a look at this link
http://nuget.codeplex.com/workitem/265
I had this issue under Visual Studio 2012. Neither removing Reflector nor removing GhostDoc extension, which were both said to cause such errors, helped. However, installing Windows Powershell 3.0 came to the rescue:
http://technet.microsoft.com/en-us/library/jj205328.aspx
Productivity power tools was my problem. v12.0.30129.0 I disabled it - an uninstall was not necessary - and vs 2013 worked again

Resources