Forum Workbooks & Inspector


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

I get "[Inspector] Error preparing project for inspection" error when I run Windows Forms project

JonAlzaJonAlza ESMember ✭✭✭
edited May 2017 in Workbooks & Inspector


I have updated Xamarin and the Inspector today. Now when I run Windows Forms application this message is continuously written in the output window:

[Inspector] Error preparing project for inspection: System.NullReferenceException: Object reference not set to an instance of an object.
   at Xamarin.VisualStudio.Inspector.ProjectExtensions.GetProjectFlavor(IAdaptable`1 adaptableProj) in C:\d\lanes\4699\70f1268e\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\Extensions\ProjectExtensions.cs:line 62
   at Xamarin.VisualStudio.Inspector.VSAgentExecutionTarget..ctor(Project proj) in C:\d\lanes\4699\70f1268e\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\VSAgentExecutionTarget.cs:line 42
   at Xamarin.VisualStudio.Inspector.VSInspectorSession.CreateAgentExecutionTarget() in C:\d\lanes\4699\70f1268e\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\VSInspectorSession.cs:line 84
   at Xamarin.Interactive.IdeSupport.InspectorSession.Prepare() in C:\d\lanes\4699\70f1268e\source\xamarinvs\External\inspector-ide-integration\Xamarin.Interactive.IdeSupport\InspectorSession.cs:line 95
   at Xamarin.VisualStudio.Inspector.XamarinInspectorPackage.RefreshInspectorSession() in C:\d\lanes\4699\70f1268e\source\xamarinvs\src\Features\VisualStudio.Inspector\Vsix\XamarinInspectorPackage.cs:line 136

Why does it happen? Is it any way to disable the inspector?

I am using Windows 10 and Visual Studio 2015

Thank you.

Best Answer


  • JonAlzaJonAlza ESMember ✭✭✭

    Thank you!

  • DougKeithDougKeith USUniversity ✭✭

    Huh. I uninstalled Xamarin Workbooks & Inspector yesterday. Output window was clean and quiet for the remainder of the day. Turned my computer on this morning and my output window is being flooded again. "Xamarin Workbooks and Inspector" is not in my list of Add/Remove Programs.

    I never really appreciated how much I rely on the output window.

    If you have any idea how I can mute the [Inspector] messages, I'm all ears.

    Thank you,

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @DougKeith that is very strange. Just to be extra thorough, can you look in the Visual Studio Installer and make sure "Xamarin Workbooks & Inspector" is not listed as being installed there (and if it is, uncheck and update)?

    Otherwise, the fixes to make sure the Output window is never spammed are in Visual Studio 15.3, which you can get from, or wait for it to be officially released in a few weeks.

  • DougKeithDougKeith USUniversity ✭✭

    Good thinkin, @SandyArmstrong. Xamarin Workbooks was on in my VS installer. Turning it off cleared my output window.

    Thank you,

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    @DougKeith I'm glad that worked! Did Visual Studio perform an update at some point after you had uninstalled Workbooks & Inspector from Add/Remove Programs?

  • DougKeithDougKeith USUniversity ✭✭

    @SandyArmstrong, it must've. I'd like to say that I have it configured to automatically install updates, but I didn't see a setting. Let's be realistic - I probably saw a yellow flag in VS 2017 that said I had an update available, and I probably installed the update, and never put two and two together.

  • SandyArmstrongSandyArmstrong USXamarin Team, Insider Xamurai

    Yeah, I did not realize that you had to uninstall from the VS Installer if you are on 2017, but it sounds like you do. I'll be updating our uninstall instructions. Thanks for your help here!

Sign In or Register to comment.