Protector one
Protector one

Reputation: 7271

Why does my project reference point to a dll in the "obj" directory?

I'm adding a project reference to a project, that already has a few project references added to it. If I inspect the existing ones' properties, they all have paths to their projects' bin directory, e.g.:

C:\MyProject2\bin\Debug\MyProject2.dll

However, when adding another project reference, it ends up with a path pointing to its obj directory:

C:\MyProject3\obj\Debug\MyProject3.dll

That dll doesn't even seem to exist! (Although that might be because I can't get the entire solution to compile yet.)

Why would one project reference point to the bin, and another to obj? And how to correct it?

Upvotes: 9

Views: 5205

Answers (3)

Brain Balaka
Brain Balaka

Reputation: 123

I fix this issue by editting the Build Dependecies -> Project Dependencies to make sure the dependecies is the same as the project reference. In my case, some of the referenced project is not selected in the Project Dependencies.

Upvotes: 1

Protector one
Protector one

Reputation: 7271

When the referenced project isn't built, the reference's path will point to a DLL in the obj directory. After it has been built, the path will automatically point to a (now existing DLL) in the bin directory.

Upvotes: 11

user3572680
user3572680

Reputation:

You can correct it easily by editing the project in notepad and changing the path. Alternatively right click the project in the solution choose unload, then edit. Then once changed right click in project and choose reload.

Upvotes: 1

Related Questions