Visual Studio 2017 XamarinInspectorPackage package did not load correctly

Related: https://forums.xamarin.com/discussion/85275/visual-studio-2015-inspectorpackage-package-did-not-load-correctly
I was working just fine yesterday but when I tried to open my solution today I got this error. How do I fix this?

Log:


745

Warning

VisualStudio
Unexpected system error mode before loading package [XamarinInspectorPackage]
{91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}


746

Information
VisualStudio
Begin package load [XamarinInspectorPackage]
{91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}


747

Error
VisualStudio
LegacySitePackage failed for package [XamarinInspectorPackage]Source: '' Description: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) System.ArgumentException: The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) at EnvDTE.SolutionBuild.get_StartupProjects() at Xamarin.VisualStudio.Inspector.XamarinInspectorPackage.GetStartupProject() in C:\d\lanes\4699\fec6f88f\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\XamarinInspectorPackage.cs:line 272 at Xamarin.VisualStudio.Inspector.XamarinInspectorPackage.RefreshInspectorSession() in C:\d\lanes\4699\fec6f88f\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\XamarinInspectorPackage.cs:line 132 at Xamarin.VisualStudio.Inspector.XamarinInspectorPackage.Initialize() in C:\d\lanes\4699\fec6f88f\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\XamarinInspectorPackage.cs:line 99 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
{91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}

80070057 - E_INVALIDARG



748

Error
VisualStudio
SetSite failed for package XamarinInspectorPackage
{91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}

80070057 - E_INVALIDARG



749

Error
VisualStudio
End package load [XamarinInspectorPackage]
{91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}

80070057 - E_INVALIDARG

Answers

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Hi! Can you go to Help -> About Visual Studio and let me know what version of the Xamarin extension is installed?

    I believe this is fixed in Xamarin 4.7 (which will be part of VS 15.4).

    I believe this can be worked around by disabling Lightweight Solution Load (https://docs.microsoft.com/en-us/visualstudio/extensibility/lightweight-solution-load-extension-impact). If that doesn't work, go into the Visual Studio Installer and completely remove "Xamarin Workbooks" to prevent the Inspector extension from doing any work when you next launch VS.

  • JoeMoJoeMo CAMember ✭✭

    Thanks for the quick response. It says that I'm running 4.5.0.486.
    I'll try the workaround.

    Do you think the fix will be backported? Doing a minor upgrade pose a great risk as, by experience, there's usually regressions being introduced that cause more trouble.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Unfortunately, this fix was not approved for backporting.

    If you do disable Lightweight Solution Load, and the bug still occurs, please let me know, as that could indicate it's actually a new bug.

  • MartinGarinsMartinGarins USMember ✭✭

    Lightweight Solution Load NOT enabled here.

    I get the same error using Visual Studio 15.4.0 Preview 1.0

    No error using Visual Studio 15.3.2

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @MartinGarins you get the same ArgumentException from get_StartupProjects()?

  • MartinGarinsMartinGarins USMember ✭✭

    No I don't.

    747

    Error

    VisualStudio
    LegacySitePackage failed for package [XamarinInspectorPackage]Source: 'Xamarin.VisualStudio.Inspector' Description: Value cannot be null. Parameter name: remoteServerProvider System.ArgumentNullException: Value cannot be null. Parameter name: remoteServerProvider at Xamarin.VisualStudio.Inspector.VSInspectorSession..ctor(Project proj, IRemoteServerProvider remoteServerProvider, IServiceProvider serviceProvider) in C:\d\lanes\5156\ddd8750f\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\VSInspectorSession.cs:line 59 at Xamarin.VisualStudio.Inspector.XamarinInspectorPackage.RefreshInspectorSession() in C:\d\lanes\5156\ddd8750f\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\XamarinInspectorPackage.cs:line 199 at Xamarin.VisualStudio.Inspector.XamarinInspectorPackage.Initialize() in C:\d\lanes\5156\ddd8750f\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\XamarinInspectorPackage.cs:line 112 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
    {91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}

    80004003 - E_POINTER



    748

    Error
    VisualStudio
    SetSite failed for package XamarinInspectorPackage
    {91D3BF5A-049A-4C78-AF4B-9AC149ADD84B}

    80004003 - E_POINTER

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @MartinGarins thanks for checking. That's a different bug that is fixed in 15.4 preview 3.

  • MartinGarinsMartinGarins USMember ✭✭

    No problem. You are welcome.

  • PaulReadPaulRead GBMember ✭✭

    Lightweight Solution Load NOT enabled here.

    I get the same error using Visual Studio 15.4.0 Preview 2.0

    Any idea when Preview 3 will be available? Or a work around fix?

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Preview 3 and 4 are already released, so closing this.

This discussion has been closed.