Runtime error in VS2010 after build in versions 2.2 , master

Topics: Ecosystem, General
Dec 18, 2012 at 10:18 AM

I've downloaded the code for both ver. 2.2 and master and compiled them in VS2012
without any modification at OS windows 7 x64 / windows 2008 r2 x64 enviroment and finished  successfully
After installing on VS2010 and clicking:
Tools->Library Package Manager->Package Manager Settings or
Tools->Library Package Manager->Package Manager Console

I'm getting the following exception on debug mode:

Invalid Cast Exception -
Unable to cast object of type 'Microsoft.VisualStudio.ComponentModelHost.ComponentModel' to type 'Microsoft.VisualStudio.ComponentModelHost.IComponentModel'.

on the code:

private IPackageRestoreManager PackageRestoreManager

        {
            get
            {
                if (_packageRestoreManager == null)
                { 
                    _packageRestoreManager = ServiceLocator.GetInstance<IPackageRestoreManager>(); //Throws exception
                    Debug.Assert(_packageRestoreManager != null);
                }
                return _packageRestoreManager;
            }
        }

when i'm not debugging (in visual studio 2010) I get the following message box:

The 'NuGet.Tools.NuGetPackage, NuGet.Tools, Version=2.3.0.0, Culture=neutral, PublicKeyToken=null' 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\fluman\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'.

 

 

 

 

Dec 18, 2012 at 1:11 PM

I've figure up that i need to compile on Windows (In my case windows XP) with only VS2010 installed and then the VisualStudioAddIn
Is working on VS2010 with no exceptions

Now my problem is how I can compile the AddIn to work for any platform (VS2012 , VS2010) with only one version of NuGet.Tools.vsix?

Dec 18, 2012 at 5:32 PM
Edited Dec 18, 2012 at 5:32 PM

I have the same issue. I need to create one addin for all versions like the one you can download on the site..

Dec 27, 2012 at 1:36 AM

I you compile the code in VS 2010, it will work with both VS 2010 and VS 2012