Fails to load in Visual Studio 2010 Ultimate

Apr 15, 2011 at 5:42 PM

When I double click on a PS1 file, an error occurs and I get a generic error dialog. After that VS comes to a crawl and the extension fails to work.

Not sure how to proceed?

I have Resharper installed.

May 3, 2011 at 3:54 AM

Could you grab a log? There is documentation on how to do so on this site. Thanks!

May 23, 2011 at 9:47 PM

Update:

Starting VS 2010 Ultimate as Admin and Suspending Resharper before changed the behavior:

Starting PowerGUI does nothing (no error but no console)
Creating a PowerShell project raises this:

---------------------------
Microsoft Visual Studio
---------------------------
'C:\Users\citykid\AppData\Local\Temp\x4ns0puy.vkw\Temp\PowerShell Script Project1.pssproj' cannot be opened because its project type (.pssproj) is not supported by this version of the application.

To open it, please use a version that supports this type of project.
---------------------------
OK   Help  
---------------------------

 

------

Fails on my VS 2010 Ultimate too. Would like to build the solution to debug it, but that does not work out either (I am a bit puzzled by all the Infragistics references.)

Started with log switch but did not see anything in the activity log. If I can help diagnosing this I will do.
I also have Resharper installed.
Here is the error I get when starting PowerGui Console. I started VS as Administrator.

---------------------------
Microsoft Visual Studio
---------------------------
The 'PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by running the application together with the /log parameter on the command line, and then examining the file 'C:\Users\>citykid\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'.

Continue to show this error message?
---------------------------
Yes   No  
---------------------------

Jun 7, 2011 at 1:48 PM

Are you sure you have installed (the latest version of) PowerGUI on your computer?

Jun 26, 2011 at 5:53 AM

I got the same error, too, installing the latest version of the extension.

 

---------------------------Microsoft Visual Studio---------------------------'D:\Windows\Temp\e2puzqo5.ocq\Temp\PowerShell Script Project1.pssproj' cannot be opened because its project type (.pssproj) is not supported by this version of the application. 
To open it, please use a version that supports this type of project.---------------------------OK   Help   ---------------------------

Jul 19, 2011 at 8:06 PM

Is there a resolution to this.  I have this working on one PC and not another.

 

They both are

Windows 7 64bit

Studio 2010

and the latest version of PowerUI from the website

 

Was there a resolution to this??

Jul 22, 2011 at 12:16 AM

I seem to have the same issue too. It looks like in the VS log that it is unable to load the scripteditor.exe file and it is looking in the wrong place-

  <entry>
    <record>474</record>
    <time>2011/07/21 23:12:11.395</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Unexpected system error mode before loading package [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
  </entry>
  <entry>
    <record>475</record>
    <time>2011/07/21 23:12:11.395</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
  </entry>
  <entry>
    <record>476</record>
    <time>2011/07/21 23:12:11.504</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ScriptEditor.exe' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>
  <entry>
    <record>477</record>
    <time>2011/07/21 23:12:11.504</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ScriptEditor.exe' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>
  <entry>
    <record>478</record>
    <time>2011/07/21 23:12:11.520</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Package failed to load; error message suppressed by skip flag</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
  </entry>

 

I tried adding that file in the IDE folder and then the extension failed looking for some of its other assemblies. Not sure what is up with the paths here.

Jul 22, 2011 at 7:16 PM

got same issue, please post resolution

Jul 25, 2011 at 10:30 AM

have the same problem...what should we do? :-(

Jul 25, 2011 at 6:08 PM

I connot create a PowerShell script project and I get the package cannot load error.  The home page for this project implies that the latest edition of PowerGUI should be installed.  However, the home page also has a request for help to get it to work with 3.0.  I have recently updated to PowerGUI 3.0.0.2015.  I assume this is source of my error?  

Aug 2, 2011 at 3:37 PM

A new build has been posted that supports PowerGUI 3.0. Hopefully this fixes your issues. Let me know if this isn't the case.

 

Sorry for the delay guys. 

Aug 3, 2011 at 9:01 PM
Edited Aug 3, 2011 at 9:35 PM

After installing this latest release along with the latest release of PowerGUI, I can open PS script files.  However, as soon as I begin to edit them, I get the the "Visual Studio has encountered a problem and needs to close" error.  VisualStudio then restarts.  There aren't any errors in the EventViewer regarding this problem.

 I had to disable it in VisualStudio.  However, once I open PowerGUI (v 3.0.0.2015), I get the following error in the PowerShell console:

Import-Module : Could not load file or assembly 'file:///C:\Users\foo\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Adam Driscoll\PowerGUI VSX\1.4.1\PowerGUIVSX.Module.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

At line:1 char:213 

+ @('C:\Users\foo\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Adam Driscoll\PowerGUI VSX\1.4.1\PowerGUIVSX.Module.dll') | Where-Object { @(Get-Module | %{$_.Path} ) -notcontains $_ } | %{ Import-Module <<<< $_ }+ CategoryInfo : NotSpecified: (:) [Import-Module], BadImageFormatException+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand

I'm running VS2010 Ultimate SP1 on Win7 x64.

It looks as though the PowerGUIVSX.Module.dll was built against .NET 4.0 yet the PowerGUI script editor (both x86 and x64) were built against .NET 2.0.

Aug 26, 2011 at 2:07 AM

I  had the same problem with powergui 1.4.1 and the release before.

I look for the script editor and I don't find it in the folder.

I'm running VS2010 Ultimate SP1 on Win7 x64.

I have a bunch of other extension.

<entry>
    <record>365</record>
    <time>2011/08/26 00:59:19.318</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Unexpected system error mode before loading package [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
  </entry>
  <entry>
    <record>366</record>
    <time>2011/08/26 00:59:19.320</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
  </entry>
  <entry>
    <record>367</record>
    <time>2011/08/26 00:59:19.946</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>SetSite failed for package [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ScriptEditor.exe' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>
  <entry>
    <record>368</record>
    <time>2011/08/26 00:59:19.957</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [PowerGUIVsx.PowerGuiVsxPackage, PowerGUIVsx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7e1ba102ebba51e]</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
    <hr>80070002</hr>
    <errorinfo>Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ScriptEditor.exe' or one of its dependencies. The system cannot find the file specified.</errorinfo>
  </entry>
  <entry>
    <record>369</record>
    <time>2011/08/26 00:59:19.960</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Package failed to load; error message suppressed by skip flag</description>
    <guid>{16F7BB6B-677E-4941-8538-D6BC37B0D1BC}</guid>
  </entry>

Sep 16, 2011 at 2:15 PM

I have tried VS 2010 Universal (w/o SP1) on Windows 7 64 bit. It's working fine.

I'll try install SP1 and then try again.

Sep 16, 2011 at 3:21 PM

Hm, with SP1 seems OK too.

Could you check that you have installed last version PowerGUI VSX (open VS, then Tools ->Extention Manager, then find the version).
You have to uninstall it manually before new version installation.

Best regards, 
Alexander

Oct 26, 2011 at 4:01 PM

I have tried VS 2010 Universal with SP1 and get the errors listed above. Have R# installed and other addins as well.

Tried to uninstall and reinstall - didn't help. Using the latest 1.4.1 version from Gallery.

Any thoughts?

Oct 26, 2011 at 10:24 PM

I'd suggest installing the latest beta version and PowerGUI 3.1. 

Oct 27, 2011 at 1:14 AM
adamdriscoll wrote:

I'd suggest installing the latest beta version and PowerGUI 3.1. 

And PowerGUI 3.1 is PowerGUI VSX 1.5 Beta 1???

Sorry, but it is not obvious.

Oct 27, 2011 at 3:03 AM

PowerGUI 3.1 doesn't work with 1.5 Beta 1 only 1.5 Beta 2.

I know it's not obvious :\. It would be nice to update them both at the same time. It's very complicated and I think that is where many peoples problems arise. In the most reset version I think I finally have it working so that it will display a message box with the support version rather than showing this totally uninformative error message. 

Oct 27, 2011 at 3:56 AM

I see the confusion now. PowerGUI is a product on it's own, that should be downloaded from http://www.powergui.org

PowerGUI VSX is VS.NET addin that utilizes PowerGUI. You can't run it w/o installing PowerGUI first.

This is what I was missing the whole time :)