0

I have a project (A) that holds reference to other project (B). When I rebuild project A, I get the error:

Error 58 The type or namespace name 'Services' does not exist in the namespace 'MyProj' (are you missing an assembly reference?)

When I add (again) reference to project B, the red lines disappear and everything is fine. When I rebuild again (in order to execute the application) I get again that Error 58.

Where does the project reference gone??

svick
  • 236,525
  • 50
  • 385
  • 514
Naor
  • 23,465
  • 48
  • 152
  • 268

4 Answers4

1

Seems project's .NET versions conflict. Something very similiar happened to me in those cases.

Tigran
  • 61,654
  • 8
  • 86
  • 123
0

Is project B getting a compile time error? This would be your problem. Make sure B compiles or you can't reference it.

Hogan
  • 69,564
  • 10
  • 76
  • 117
  • Are you using the full name path to Services? – Hogan Aug 20 '11 at 18:50
  • Also, close VS and restart it -- sometimes VS gets wonky. – Hogan Aug 20 '11 at 18:50
  • Restart VS doesn't help. I am using the "using" statement and then later in the code I use class from project B. – Naor Aug 20 '11 at 19:20
  • Yes but the error message implies it is looking in MyProj not in the second library -- use a fully qualified name to the reference and make sure they are unique. – Hogan Aug 20 '11 at 19:35
0

Can you please include the output window content after rebuild? Sometimes the output file cannot be copied and this leads to similar issues

michalczerwinski
  • 1,069
  • 9
  • 6
0

I think, there is a conflict between your project, i recommend you to change your project B assembly name and then delete its exist assembly in project A and add it again.

Saber Amani
  • 6,409
  • 12
  • 53
  • 88