1

Okay, so this isn't strictly a programming question, but it is a programming-related question.

I have a C# winforms project that I am trying to add a reference to the System.Messaging dll.

However, when I add the reference (from the .net tab of the Add References dialog), it shows up with a yellow exclamation warning.

Right-clicking on other references will allow me to view them in the object browser. Right clicking on the System.Messaging reference will not.

Here's the kicker though... If I click on another reference and scroll through the list in the object browser, I can see the System.Messaging entry.

I tried a variety of things to fix this so far, including a forced reinstall of the dll in the GAC using gacutil, but it's still not working.

Does anyone have any suggestions as to how to fix this? If I need to provide more information, please leave the specific information request in the comments.

Note. The operating system is Vista.

Andrew Rollings
  • 14,340
  • 7
  • 51
  • 50

2 Answers2

2

I managed to find the solution after some creative googling.

On the project settings, there is a checkbox marked "Client-only framework subset".

Unchecking that checkbox did the trick.

Andrew Rollings
  • 14,340
  • 7
  • 51
  • 50
0

i faced a similar problem but in my asp.net project (and a different GAC assembly - cant remember the name though). i fixed it by explicity telling my application the exact version to use in my web.config by inserting add assembly tag

for eg:

<add assembly="System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

is there a way you can try this with your windows form app.config file (i havent worked much with winforms so not sure)

Raj
  • 6,810
  • 6
  • 48
  • 56