31 votes
closed
R: Impossible to open Project Properties - COM object that has been separated from its underlying RCW cannot be used.

Description

 
After installing Source Analysis in several machines one of them didn't like the product that much.
The only machine that is running Windows Server 2003. All others are running Windows XP.

Problem:
Right click on any project and choose "Properties".
Instead of the Properties page, I get an error message saying:

An error occurred trying to load the page.
COM object that has been separated from its underlying RCW cannot be used.

Every other feature works nicely. As a workaround I uninstalled Source Analysis. Visual Studio works fine without Source Analysis installed.
I believe it is something related to Windows Server only.

Versions:
Windows Server 2003 Enterprise Edition Service Pack 2
Visual Studio 2005 version 8.0.50727.762(SP.050727-7600)
Visual C# 2005 77718-007-4000003-4131
.NET Framework version 2.0.50727 SP1



Closed Jun 24 2008 at 11:01 AM  by jasonall
Fixed in StyleCop 4.3

Comments

most recent at top (show oldest at top)
danieldsmith wrote Jul 10 2008 at 6:43 PM
Uggg, this has been giving me grief for weeks! Nice to know it's being worked on. I've had to uninstall in the meantime, so hopefully not too long until the next release.

AnthonySteele wrote Jun 18 2008 at 2:40 PM
Hi.

This started happening in VS 2008 with my Windows Xp machine ever since I installed resharper. It will be painful to give up one of these two tools. Any indication on the "next release" - will this fix be held back until the next major version with new features is ready, or is there going to be a minor version release to fix current issues?

jasonall wrote Jun 12 2008 at 12:26 PM
We have discovered the cause of this issue and have a fix ready, which will be included along with the next release of StyleCop. (Release date is TBD.)

Lex wrote Jun 12 2008 at 11:28 AM
Have this problem on Visual Studio 2008 on 32bit Vista; I don't have ReSharper but I do have GhostDoc, DevX (with Refactor!), TFS Power Tools 2008 and TestMatrix installed.

Uninstalling Source analysis fixed the issue.

int19h wrote Jun 12 2008 at 11:14 AM
I have the same issue. W2K3, VS2008, the same symptoms. Goes away once Source Analysis is uninstalled. Log attached.

PeterRitchie wrote Jun 11 2008 at 7:00 PM
I have this problem with or without Resharper. Once I uninstalled Source Analysis, the problem went away.

stealthtech wrote Jun 3 2008 at 8:12 PM
I was having the same issue.
I Uninstall the ReSharper Beta.
One Problem Solved I get Properties now, but now I don't have ReSharper.
I was using the ReSharper 4.0 beta. The 3.1 did not have all of the c# 3.0 features.
Funny thing is that Resharper and Source Analysis conflict not only in this area causing the COm error. They also conflict on the philosphy of what style of code to use.
R# leans more toward the framework style using underscores for field names and don't use "this." where as Source Analysis does not like underscores in fields and promotes using "this."

reboard wrote Jun 3 2008 at 12:03 AM
I have encountered the same issue. Running WinXP, VS2008 Pro. It is an Add-In conflict with ReSharper 3.1. If I disable the ReSharper Add-In then restart VS2008 the problem goes away.

Bo wrote Jun 1 2008 at 11:25 PM
Thank you all for posting feedback that will help us debug this issue. Let me assure you all that we are working on it, and we value your feedback.

It will be helpful if you could provide me with call stack information when this error occurs. If you can provide it, please store it in a file and attach it to this issue, with a file name that clearly identifies you.

Thanks

Bo wrote Jun 1 2008 at 11:16 PM
Please dont inline any log files. please attach them as file named so they can be tracked back to the poster.
Thank you

gbarnett wrote May 30 2008 at 6:58 PM
Same - Vista x64 SP1, VS 2008 Team Suite.

rholdorf wrote May 30 2008 at 5:00 PM
I just finished installing Visual Source Safe on my machine and then got the same error message.
You are in the right track, it is an event reg/unreg/lock/synch issue.
Don't you dare surrender and say "There's nothing I can do to fix this"... we'll beat the md5sum off you if you say that again.

Shados wrote May 29 2008 at 8:10 PM
Just as a side note: if I uncheck Resharper from auto-startup in the add-in menu, and load resharper (again, from the add-in manager) -after- loading Visual Studio, then all is well. So it really seems like a plugin conflict in the order certain events are happening...

Shados wrote May 29 2008 at 6:55 PM
Same problem, WinXP SP2, VS2005 Team Edition for Developer, only add-in installed is Resharper 3.1. It does seem like an add-in conflict at first glance...

I hope this gets fixed asap or a workaround gets described... we're in the process of establishing standards here, and the tool with all of the rules cranked up is exactly what I was to see, but if it screws up the project properties windows, my team lead won't be too happy about it...

serega wrote May 29 2008 at 2:31 PM
I just experienced the same problem on WinXP SP2, VS2008 TeamDev. I have no DocProject installed, and I didn't install anything new before I got the problem. So, did StyleCop work well before.

I managed to workaround the problem by uninstalling the VS SDK. Now it works again. Have no idea, how is it all connected.

mikefourie wrote May 29 2008 at 11:53 AM
Not using DocProject and we have the same issue here. All W2K3SP2, VS2008. My log file is attached. I first tried uninstalling PowerCommands, but still received the RCW error. I then uninstalled SA 4.2.6 and it all works fine...

Log shows
CheckPackageSignature failed; invalid Package Load Key
2C5A58FF-51D1-46CC-B46C-CD458632B321 Team Foundation Server Power Tools
DFD5151B-6A8E-43AD-9AAA-4A5EEB6A1A15 Team Foundation Sidekicks
24E33DBF-CADF-4DA8-ACFE-566366FC8468 PowerCommands.Commands
629EB7CC-69C2-43AC-9BC9-482B0F810C4E Microsoft Source Analysis Tool for C#



Product Details:
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5

Installed Edition: Enterprise

Microsoft Visual Basic 2008 91899-270-6569333-60534
Microsoft Visual Basic 2008

Microsoft Visual C# 2008 91899-270-6569333-60534
Microsoft Visual C# 2008

Microsoft Visual Studio 2008 Team Explorer 91899-270-6569333-60534
Microsoft Visual Studio 2008 Team Explorer
Version 9.0.21022.8

Microsoft Visual Studio 2008 Tools for Office 91899-270-6569333-60534
Microsoft Visual Studio 2008 Tools for Office

Microsoft Visual Studio Team System 2008 Architecture Edition 91899-270-6569333-60534
Microsoft Visual Studio Team System 2008 Architecture Edition

Microsoft Visual Studio Team System 2008 Database Edition 91899-270-6569333-60534
Microsoft Visual Studio Team System 2008 Database Edition

Microsoft Visual Studio Team System 2008 Development Edition 91899-270-6569333-60534
Microsoft Visual Studio Team System 2008 Development Edition

Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.


Microsoft Visual Studio Team System 2008 Test Edition 91899-270-6569333-60534
Microsoft Visual Studio Team System 2008 Test Edition

Microsoft Visual Web Developer 2008 91899-270-6569333-60534
Microsoft Visual Web Developer 2008

Process Editor WIT Designer 1.2.0.0
Process Editor for Microsoft Visual Studio Team Foundation Server, Version 1.2.0.0

ReSharper 4 C# Edition build 4.0.804.16 on 2008-05-18T22:59:28
ReSharper add-in for Microsoft Visual Studio. For more information about ReSharper, see the ReSharper website at http://www.jetbrains.com/resharper. Copyright © 2003–2008 JetBrains, Inc

Team Foundation Server Power Tools March 2008
Power Tools that extend the Team Foundation Server integration with Visual Studio.

Team Foundation Sidekicks 2.0
Team Foundation Sidekicks utilities package

GhostDoc for Visual Studio 2008
For more information about GhostDoc, see the GhostDoc website
at http://www.roland-weigelt.de/ghostdoc
Copyright © 2003-2008 Roland Weigelt.

JasonPursell wrote May 29 2008 at 11:07 AM
btw,
1. I like the tool very much. It just shouldn't break anything fundamental like the project properties.
2. I'm using Vista SP1 and VS2008 and DO NOT have DocProject installed.

DirkRombauts wrote May 29 2008 at 11:00 AM
I attached ActivitLog.[xsl|xml] from a VS2008 session.

JasonPursell wrote May 29 2008 at 10:59 AM
You'll need to fix this issue if you want people to download and use the tool. For me I can't access the Debug tab of the project properties. Not good.

davedev wrote May 29 2008 at 2:18 AM
I was able to duplicate the issue on Vista with Visual Studio 2008 Standard and DocProject installed. The error occurs when my Add-In attempts to register or unregister event handlers on the SolutionEvents class, which it gets via the DTE object. There doesn't appear to be anything I can do to fix this issue since my Add-In must use these events.

GerhardK wrote May 28 2008 at 5:24 PM
Hi
I have nearly the same problem on a different installation.
Versions:
Vista SP1
Visual Studio 2008

My Problem looks like this: I have also installed DocProject Beta2. Without installing "Source Analysis" the DocProject works without Problem. After installing Source Analysis the DocProject shows this error during startup of VS2008:
System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
at System.Runtime.InteropServices.UCOMIConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
at EnvDTE._dispSolutionEvents_EventProvider.add_Opened(_dispSolutionEvents_OpenedEventHandler A_1)
at EnvDTE.SolutionEventsClass.add_Opened(_dispSolutionEvents_OpenedEventHandler A_1)
at DaveSexton.DocProject.IdeEventListener..ctor()
at DaveSexton.DocProject.DocProjectAddIn.Extensibility.IDTExtensibility2.OnStartupComplete(Array& custom)

I have created also a traking item at DocProject:
http://www.codeplex.com/DocProject/WorkItem/View.aspx?WorkItemId=16819

I hope this help, because the combination of this 2 tools is for me perfect.

rholdorf wrote May 28 2008 at 5:03 AM
And here they are!

BoLund wrote May 28 2008 at 3:47 AM
I dont think it is related to Windows 2K3 Server. I have run that myself. So we need more info for this issue.

Please start vs by calling “devenv /Log”. After that is done, goto % APPDATA%\Microsoft\VisualStudio\8.0
Attach the ActivityLog.xml and ActivityLog.xsl to this issue.

Thanks.


Updating...
Page view tracker