GoldNova
GoldNova

Reputation: 353

C# Different but similar Namespaces cause errors

I currently have to deal with two different namespaces.

The first namespace is from a class library and looks like this: Autodesk.DataManagement.Client.[...]

The second one is a wrapper library I am coding and has the namespace: My.Autodesk.Wrapper[...]

My problem is that this is throwing tons of errors because the IDE can't make a difference between my namespace and the namespace of the library (I use both libraries in the same class)

This is the error I get Error CS0234 The type or namespace name 'Connectivity' does not exist in the namespace 'My.Autodesk' (are you missing an assembly reference?)

EDIT for additional information:

Currently my library only contains a Connection Class and a IConnection interface.

Without referencing my wrapper library the code in the main project works fine: Code works fine

But after referencing my library everything in the main project breaks: enter image description here

It looks like it is mistaking my library with the Autodesk library just because I have the term Autodesk in my namespace.

What would be the solution? Do I really have to rename my library?

Upvotes: 0

Views: 58

Answers (1)

Nour
Nour

Reputation: 86

try using this format using YourClass = My.Autodesk.Wrapper.[..].YourClass

Upvotes: 1

Related Questions