Bug 49417 - Error popup about loading the InspectorPackage when loading a project (non-Xamarin)
Summary: Error popup about loading the InspectorPackage when loading a project (non-Xa...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Inspector Integration ()
Version: unspecified
Hardware: PC Windows
: --- major
Target Milestone: ---
Assignee: Sandy Armstrong [MSFT]
Depends on:
Reported: 2016-12-09 02:48 UTC by Jon Goldberger [MSFT]
Modified: 2017-09-08 16:48 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

ActivityLog.xml (5.83 KB, application/zip)
2016-12-09 02:48 UTC, Jon Goldberger [MSFT]
Xamarin Logs (1.25 KB, application/zip)
2016-12-09 02:48 UTC, Jon Goldberger [MSFT]
Inspector logs (199.70 KB, text/plain)
2016-12-09 20:54 UTC, David Jade

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jon Goldberger [MSFT] 2016-12-09 02:48:03 UTC
Created attachment 18845 [details]

## Description

(I have not been able to reproduce this, so relying on customer reported info)

From reporting customer:

"I recently went through updating my Xamarin tools, both from doing updated within VS and by running the full downloaded Xamarin installer. Now when I start VS and then load a project, I get this popup [1]. Note that I wasn't loading a solution that contained Xamarin projects, I was loading another C# project. This also happens if I open a solution or project directly from Windows Explorer (which then launches VS to open that project).

If I look in the log references, I see this:"

>LegacySitePackage failed for package [InspectorPackage]Source: '' Description: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL)) System.NotImplementedException: Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL)) 
>  at EnvDTE.Project.get_FullName() 
>  at Xamarin.Inspector.VS.VSAgentExecutionTarget..ctor(Project proj) 
>  at Xamarin.Inspector.VS.VSInspectorSession.CreateAgentExecutionTarget() 
>  at Xamarin.Interactive.IdeSupport.InspectorSession.Prepare() 
>  at Xamarin.Inspector.VS.InspectorPackage.RefreshInspectorSession() 
>  at Xamarin.Inspector.VS.InspectorPackage.Initialize() 
>  at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)
>80004001 - E_NOTIMPL
>2016/12/08 22:20:12.867
>SetSite failed for package [InspectorPackage](null)
>80004001 - E_NOTIMPL
>2016/12/08 22:20:12.889
>End package load [InspectorPackage]

[1] https://microsoft-my.sharepoint.com/personal/jgolde_microsoft_com/_layouts/15/guestaccess.aspx?guestaccesstoken=raKf%2b%2bYPzSSc3blp1Q4LsgafGhjS1zSz8dAMLrhK8TY%3d&docid=2_14d5012e821834787949e68382834afd3&rev=1

## Notes

Since this seemed similar to error message received when the XamarinShellPackage can't be loaded, I had them try deleting the ComponentModelCache which was a workaround to resolve that issue (bug #40781) but that did not help. The reporting customer added the following findings:

"Clearing the component cache had no effect (the error still happens). However, I have noticed that it only happens when I try and load non-Xamarin projects now. And it only happens once per run of VS. So, if I start VS and open a Xamarin project then there is no error. If I then close that project and open a non-Xamarin project, then I get the error once. I can then flip between all types of projects without seeing that error again, until I start a new instance of VS.

I have not gone further and verified that all aspects of Xamarin projects still function though once this error happens as I am not clear on which Xamarin component is failing and what I would be looking for (i.e. what component may stop working after the error)."

## Environment

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Enterprise

Architecture and Modeling Tools 00322-90150-00969-AA852
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

LightSwitch for Visual Studio 2015 00322-90150-00969-AA852
Microsoft LightSwitch for Visual Studio 2015

Microsoft Visual Studio Tools for Applications 2015 00322-90150-00969-AA852
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015 00322-90150-00969-AA852
Microsoft Visual Basic 2015

Visual C# 2015 00322-90150-00969-AA852
Microsoft Visual C# 2015

Visual C++ 2015 00322-90150-00969-AA852
Microsoft Visual C++ 2015

Visual F# 2015 00322-90150-00969-AA852
Microsoft Visual F# 2015

.NET Reflector Visual Studio Extension
Integrates .NET Reflector into Visual Studio to allow you to seamlessly debug into third-party code and assemblies, even if you don't have the source code for them.

Visit www.reflector.net for more information.

Copyright (c) 2009-2012 Red Gate Software Inc.

Add New File 3.5
The fastest and easiest way to add new files to any project - including files that start with a dot

ASP.NET and Web Tools 2015.1 14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9.6 14.0.21111.0
Azure App Service Tools v2.9.6

Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.2.2100.0
Microsoft Azure Data Lake Tools for Visual Studio

Bundler & Minifier 2.2.307
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.

Command Bus, Event Stream and Async Manager Merq
Provides ICommandBus, IEventStream and IAsyncManager MEF services for loosely coupled Visual Studio extension components communication and integration.

Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Tools 1.10.188
Contains numerous tools and helpers that makes it easier than ever to build Visual Studio extensions.

File Icons 2.1
Adds icons for files that are not recognized by Solution Explorer

File Nesting 2.6.67
Automatically nest files based on file name and enables developers to nest and unnest any file manually

A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

Image Optimizer 3.6.103
Uses industry standard tools to optimize any JPEG, PNG and Gifs - including animated Gifs. Can do both lossy and lossless optimization.

Image Sprites 1.4.47
Boost your website's performance by creating image sprites to reduce the amount of HTTP requests needed.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

Line Endings Unifier 1.0
Unify line endings in a whole solution, a specific project, a chosen folder or a certain source file by right clicking on a solution, a project or a file in the Solution Explorer. File formats supported: *.c, *.cpp, *.h, *.hpp, *.cs, *.vb, *.js, *.txt

Markdown Editor 1.10.186
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Microsoft .NET Core Tools (Preview 2) 14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Hive Query Language Service 2.2.2100.0
Language service for Hive query

Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41104.6

Node.js Tools 1.2.40726.00
Adds support for developing and debugging Node.js apps in Visual Studio

Node.js Tools - Profiling 1.2.40726.00
Profiling support for Node.js projects.

NuGet Package Manager 3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 ENU 14.0.23928
Microsoft Office Developer Tools for Visual Studio 2015 ENU

Open Command Line 2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.

Package Installer 2.0.99
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio 2.2.40825.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration 2.2.40825.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support 2.2.40825.00
Profiling support for Python projects.

SQL Server Analysis Services 13.0.1701.8
Microsoft SQL Server Analysis Services Designer
Version 13.0.1701.8

SQL Server Data Tools 14.0.61021.0
Microsoft SQL Server Data Tools

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services 13.0.1701.8
Microsoft SQL Server Reporting Services Designers
Version 13.0.1701.8

Syntax Highlighting Pack 2.1.89
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript tools for Visual Studio

Visual Studio Spell Check Everywhere VSSpellCheckEverywhere
An extension that enables spell checking within any Visual Studio file editor or tool window that uses WPF text boxes.

Visual Studio Spell Checker VSSpellChecker
An editor extension that checks the spelling of comments, strings, and plain text as you type or interactively with tool windows.

Visual Studio Tools for Universal Windows Apps 14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Web Accessibility Checker 1.3.37
The easiest way to perform accessibility checks on any ASP.NET web application. Fully customizable and support all the major international accessibility standards.

Web Compiler 1.11.326
Compiler for LESS, Sass and CoffeeScript files

Web Essentials 2015.3 3.0.235
Adds many useful features to Visual Studio for web developers. Requires Visual Studio 2015

Windows Installer XML Toolset
Windows Installer XML Toolset version
Copyright (c) .NET Foundation and contributors. All rights reserved.

Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

Xamarin (872717c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Inspector Support (1f3067d)
Adds support for inspecting Xamarin and WPF apps.

Xamarin.Android (ce955cc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS (44931ae)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Jon Goldberger [MSFT] 2016-12-09 02:48:29 UTC
Created attachment 18846 [details]
Xamarin Logs
Comment 2 Sandy Armstrong [MSFT] 2016-12-09 15:04:27 UTC
Hi Jon, thanks for filing.

Can you find out what kind of project this was? I'll do some poking around to see if I can reproduce. I've never seen this with basic WPF or Console projects before.

Also, for future reference, the Inspector extension has its own log files. See https://developer.xamarin.com/guides/cross-platform/inspector/install/#Reporting_Bugs .
Comment 3 Sandy Armstrong [MSFT] 2016-12-09 15:06:57 UTC
Was it ASP.NET MVC by any chance? https://github.com/madskristensen/WebEssentials2013/issues/1257#issuecomment-47692622
Comment 4 David Jade 2016-12-09 20:54:58 UTC
Created attachment 18854 [details]
Inspector logs
Comment 5 David Jade 2016-12-09 21:10:43 UTC
No, it is not a ASP.NET project. It is a solution that has a Windows Service, a WPF app, a bunch of shared libraries, a shared code project, and a Wix setup project.

I am seeing additional behavior today. VS is behaving that if I open another project first (even a non-Xamarin project), then close the solution and then opened the offending solution, the problem does not happen. In other words, opening another solution first somehow prevents the problem until the next time I restarted VS. However not all solutions that I open first prevent the issue, only some. It did not seem to matter if it contained Xamarin projects or not.

Now after opening and closing VS and several solutions, I think I may have uncovered another main contributing factor. The solution that triggers this issue has multiple debug start up targets set for the solution. If I change the setting to only have one start up target, then opening this solution does not seem to trigger to issue. if I change it back, restart VS, then open it again it will then trigger the issue.

As a test I created a new blank solution, add a few random console projects I had lying around, set this new solution to have multiple debug start up targets, saved it, closed VS, restart VS, and the loaded the solution. The issue appears 100% of the time for this new solution with multiple debug targets. If I change this new solution to have just one debug start up target the problem goes away.

It is still true however then first opening another solution will sometimes prevent the issue when opening these solutions that have multiple start up targets set for debugging.
Comment 6 Sandy Armstrong [MSFT] 2016-12-09 21:44:27 UTC
Thanks for digging in. Yes, the Inspector doesn't have very good support for multiple start-up projects (yet).

The error you're seeing happens when we examine (what we think is) the startup project to see if it's a valid inspection target. I'll make that safer so you don't run into any more errors.

We can look at providing better support for multiple start-up projects in the future.
Comment 7 Sandy Armstrong [MSFT] 2017-01-14 17:42:05 UTC
Error fixed in upcoming 1.1 release. You will no longer see the popup.

We are tracking proper multiple start-up project support separately.