Friday, May 18, 2012 Register  Login

This site uses DNS Made Easy. Use it for reliable and professional DNS services.

RSS Feeds
Categories
  
Blog Archives
  
Blog

VS2010 debugger broken for plugins/addins/snapins

I was in the process of updating both PainlessSVN Professional and Console to version 1.2.1, when I found a bug in Visual Studio 2010 debugger. The solutions for both projects were in VS2008. My OS recently died, so I had to re-install it from scratch. I only installed VS2010, because I wanted to move away from VS2008.

My first hint that something was wrong was when I needed to modify the About dll to include the new version numbers and years in the copyright. This project is a C++ resource dll. This simple project would not compile on the VS2010 compiler when I converted it. I ended up firing one of my VMWare images that has VS2008 to get this done.

The next thing that happened was that none of the breakpoints I set worked, while trying to track down an unhandled exception. I went to Google and found that this is a known bug. The report is over here:

Debugging an MMC snapin does not attach correctly to mmc.exe

The suggested work around is here:

Can’t hit breakpoints in a plug-in or can’t debug .NET 2.0/3.0/3.5 from a mixed mode .exe project with Visual Studio 2010?

Unfortunately, that didn't work for me. What did work was to change the mmc.exe instance from the C:\Windows\SysWow64 to the one in C:\Windows\System32, then attach the debugger manually. The debugger will not attach to instances of the mmc.exe program in the SysWow64 directory. I am running VS2010 on Windows 7 Ultimate x64, and that's why I was using the 64 bit version of mmc.exe.

Anyways, hope this helps somebody else.

posted @ Sunday, April 10, 2011 10:16 PM by Hector Sosa, Jr

Actions:Tweet This Share on Facebook Share on LinkedIn Emakl Permalink del.icio.us

Previous Page | Next Page

COMMENTS

Hector

I have a question for you that might help me out, how did you get around the problem of the About.dll where after updating the version and description strings, recompiling and upgrading the mmc dll via a MSI the older version and description strings are still displayed in the MMC about box.?

Regards,

Marco

posted @ Tuesday, July 26, 2011 7:32 AM by Marco


Marco,

I haven't run into the problem myself, but another developer gave me a hint. I'm copying and pasting Larry's words below:

There is a bug in the mmc that causes problems when you update your resource DLL. The mmc client caches the string information in a Registry Key:

HKEY_USERS\S-1-5-21-1123561945-789336058-854245398-1004\Software\Microsoft\Windows\ShellNoRoam\MUICache And it uses the strings in there from that point on even if you change them in your resource DLL. The only way around this issue is to either delete the relevant values under this key, or change the numeric ids of the resources whenever you update them.

posted @ Tuesday, July 26, 2011 1:42 PM by Hector Sosa, Jr


Hector

Thanks for the feedback. I have one other question. In your mmc app it looks like you update the mmc window title with the trail countdown. I have tried everything to do it in my mmc app but cannot seem to get it.

posted @ Wednesday, July 27, 2011 4:13 PM by Marco


Marco,

The key here is to set the DisplayName property on the root (first) ScopeNode that you create. MMC uses that property for the MMC's window title.

posted @ Friday, July 29, 2011 8:28 AM by Hector Sosa, Jr


Hector

Yeah I thought that would be the case however this is only setting the name of my root ScopeNode and it also displays the same text in the Description Bar, when turned on. The MMC's window title is also the text that I entered in the Options window when setting up my .msc file.

After comparing my .msc with yours I found that mine had a node in the VisualAttributes node which after removing it, works the way I want. For some reason this is added when you do a save as when setting up the .msc file from the mmc console.

Thanks for your help.

Regards,

Marco

posted @ Monday, August 01, 2011 7:49 AM by Marco


Marco,

Thanks for the research you did. I didn't know that VisualAttributes did that. I'm moving away from MMC, until Microsoft has an "official" fix for working with .NET 4.0.

posted @ Monday, August 01, 2011 9:18 AM by Hector Sosa, Jr


Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above:

Terms Of Use | Privacy Statement | SystemWidgets
Copyright 2002-2012 by SystemWidgets
Google Analytics Alternative