Are you getting the following error?

Unable to cast COM object of type ‘Microsoft.Office.Interop.Word.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Word._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00020970-0000-0000-C000-000000000046}’ failed due to the following error: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA).

If so, no need to freak out. Basically, your COM object, in this case the Word application is missing. To debug, make sure you don’t accidentally close/quit this Word app object before making your API calls to it.

VS.NET error

I got this funky error after just making a small change to a file.

Error ## The item “xxx” was specified more than once in the “Resources” parameter. Duplicate items are not supported by the “Resources” parameter

Build->Clean doesn’t fix it. If you encounter this same error, try the following.

Open your vbproj file in a text editor. If your project is called “myProj”, then the file name is “myProj.vbproj”. (Make a backup first…)

Then search for “EmbeddedResource”. You will see something like the following:


Then search for the troublemaker “xxx”. You will likely see duplicates. Use your discretion to delete the bad ones.

Then save it, you are done. VS.NET will force you to reload your project.

Thanks to miche1024 at this post: http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/df3bee5f-8081-4425-aca7-70bfbc15fb30

Hollow breakpoints…

While trying to pinpoint where a bug was in VS.NET 2008, the breakpoints I set became hollow… I was like @#$%#$%^#$. The error message is “Breakpoint will not currently be hit. No symbols loaded for this document.”

So I was like, easy, just delete all the temp files and restart. Well, not that easy, the breakpoints decided to stay hollow… Call me stupid, I try that again, still the same.

I then try to set and unset the breakpoints, as if it was a simple gui bug. Nope. Once I started the debugging process, all breakpoints became hollow…

At that point, I almost decided to use the classic approach, printing out variables into the console. Sad isn’t it? Using this poor man approach on a world-class IDE.

Then I decided to google a bit on this. I am not alone. Apparently there are many solutions that may or may not solve this issue. It’s like finding the reason why your stomach hurts. The solution for my case is found here: http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/4f7b3eb5-67b5-4066-8299-fe7635cc1d82

  1. Bring up the project properties window
  2. Go to the ‘Compile’ tab
  3. Under the Advanced Compilation Options screen select ‘Full’ in the ‘Generate debug info’ combo.

Alright, all the breakpoints are now solid! Yea~~

Oh wait, what was I working on?