visual studio 2010

Oct 5, 2010 at 12:40 PM


i am trying to use ur extended immediate window but cannot seem to open the project in vs 2010

what can i do?

it tries to convert to .net 4/vs2010 and converts successfully the first 2 projects.

it does not manage to convert the extendedimmediatewinfdow project

i get this error message:

Unable to read the project file 'ExtendedImmediateWindow.csproj'. C:\Users\Tatty\Desktop\ExtendedImmediateWindow\ExtendedImmediateWindow\ExtendedImmediateWindow.csproj(186,3): The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\VSSDK\Microsoft.VsSDK.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

i tired installing the sdk from here

but it did not help

please advise


Apr 5, 2011 at 8:54 PM
Edited Apr 5, 2011 at 8:55 PM

After quite a bit of messing around, I was able to get this to build and open in 2010 SP1.

  • You do need the 2010 SDK.  Please note: if you are using 2010 SP1, it has its OWN SDK and the 2010 RTM SDK will NOT install.  (This was confusing to me for sure!)
  • Before attempting to convert it by opening it in Visual Studio 2010, you need to open the ExtendedImmediateWindow.csproj file in a text editor, where you'll find a line near the bottom looking something like this:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\VSSDK\Microsoft.VsSDK.targets" />

Which needs to be changed to this:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets" />

  • Now you should be able to open the solution in VS and it'll convert it to 2010 projects for you.
  • At this point I got sorta stuck in dll hell, trying to get the right versions of things going without it complaining.  To save you time, here's what I ultimately found that worked.  I'm sorting them by path where you might find dlls, even though for many of these, they'll be in the GAC after installing the 2010 SDK.  (Note that if you're on a 64-bit windows, the program files in question is the x86 one)
    • Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\
      • EnvDTE
      • EnvDTE100
      • EnvDTE80
      • EnvDTE90
      • Microsoft.VisualStudio.CommandBars
    • Program Files (x86)\Microsoft Visual Studio 2010 SDK SP1\VisualStudioIntegration\Common\Assemblies\
      • Microsoft.VisualStudio.OLE.Interop
      • Microsoft.VisualStudio.Package.LanguageService.10.0
      • Microsoft.VisualStudio.Settings
      • Microsoft.VisualStudio.Shell.10.0
      • Microsoft.VisualStudio.Shell.Immutable.10.0
      • Microsoft.VisualStudio.Shell.Interop
      • Microsoft.VisualStudio.Shell.Interop.10.0
      • Microsoft.VisualStudio.Shell.Interop.8.0
      • Microsoft.VisualStudio.Shell.Interop.9.0
      • Microsoft.VisualStudio.TextManager.Interop
      • Microsoft.VisualStudio.TextManager.Interop.8.0
    • Program Files (x86)\Common Files\Microsoft Shared\MSEnv\PublicAssemblies\
      • stdole
  • You need a source.extension.vsixmanifest file in the ExtendedImmediateWindow project in order to build it as an extension in 2010.  The quick-and-easy way to get one of these is to just use the New Project menu in VS.  You'll find the template under Extensibility (below your language of choice).  Select "Visual Studio Package", and you'll get a wizard, step 2 of which fills in details into your vsixmanifest file (and you can pretty much ignore the others).  Once that wizard is completed, you can just take that source.extension.vsixmanifest file and drop it in the ExtendedImmediateWindow project directory.  Include it in the project, and set the build output to "None".
  • Now you should be able to build, and it'll create a .vsix file in the build output directory, which you can then just double-click to install :)

Okay, now, when I say these steps worked for me, that's true in the sense that it built, installed, showed up in the extensions list, showed up on the Tools menu, and when you hit the Tools menu item, the window comes up as expected.

However, it doesn't *actually* work for me, in that when I hit the connect button, I get this error:

System.ComponentModel.Win32Exception (0x80004005): A 32 bit processes cannot access modules of a 64 bit process.

at System.Diagnostics.NtProcessManager.GetModuleInfos(Int32 processId, Boolean firstModuleOnly)

at System.Diagnostics.ProcessManager.GetModuleInfos(Int32 processId)

at System.Diagnostics.Process.get_Modules()

at uboot.ExtendedImmediateWindow.Implementation.Helpers.ReferenceResolver.get_ReferencedAssemblies()


I get that error four times (two dialogs at a time), and then this one once:

Konnte nicht verbinden: An item with the same key has already been added.

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)

at System.Collections.Generic.Dictionary'2.Insert(TKey key, TValue value, Boolean add)

at System.Collections.Generic.Dictionary'2.Add(TKey key, TValue value)

at uboot.ExtendedImmediateWindow.Implementation.Helpers.ReferenceResolver.get_ReferencedAssemblies()

at uboot.ExtendedImmediateWindow.Implementation.Extensions.Extensions.GetCurrentType(Debugger debugger)

at uboot.ExtendedImmediateWindow.Implementation.MainController.UpdateContextTypeIfChanged()

at uboot.ExtendedImmediateWindow.Implementation.MainController.ViewController_QueryConnect(Object sender, EventArgs e)


I think the final one is just a bug in the error handling, I didn't look into it.  The first 4, though, are definitely related to being on a 64-bit OS and compiling with Any CPU.  So I post these instructions anyway, as it looks like they might work if:

  • Your workstation is a 32-bit environment, or possibly if
  • You can build the app being debugged entirely in x86

Unfortunately, neither of these are an option for me, so I'm kinda stuck.  :(

May 27, 2011 at 5:09 PM

You did try building as x86, right? The 32-bit issues could be with the IDE?

Aug 26, 2011 at 1:23 PM


are there any improvements on this?

I try to follow your Instruction best I can. When I hit the Connect Button I get this error messages.

exc.Message = "Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."

exc.StackTrace = "   bei uboot.ExtendedImmediateWindow.Implementation.MainController.UpdateContextTypeIfChanged() in C:\\Users\\ljahnke\\Documents\\Visual Studio 2010\\Projects\\ExtendedImmediateWindow\\ExtendedImmediateWindow\\Implementation\\MainController.cs:Zeile 90.\r\...

Thank you

Nov 26, 2013 at 5:50 AM
Edited Nov 26, 2013 at 5:57 AM
I was able to get this working in vs 2010 using the above hints along with the following changes:

Since I'm using .net 4.0, I had to alter ExtendedImmediateWindow.Implementation.Helpers.Compiler.CompileInternal to use Compiler Version v4.0 instead of v3.5

I altered ExtendedImmediateWindow.Implementation.Extensions.Estensions.GetResolver to remove the semicolon (";") in the first argument to GetExpression, as this caused an error.

I altered ExtendedImmediateWindow.Implementation.Helpers.Compiler.UsedNamespaces to filter out namespaces starting with "<", as not doing so caused CheckForUnreachableTypes() to remove the wrong properties.

Also note that you will get an error if the current instance's class is not public.