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?
If you directly add a DLL then you are locked into whatever that particular DLL was built as. The project reference allows this to be a build time decision. This is correct what you are saying. At the same time it is not causing issues when working with .
If you're using Visual Basic, select the References page, and then click the Reference Paths button. In the Reference Paths dialog box, type the path of the folder that contains the item you want to reference in the Folder field, and then click the Add Folder button.
Copy the downloaded DLL file in a custom folder on your dev drive, then add the reference to your project using the Browse button in the Add Reference dialog. Be sure that the new reference has the Copy Local = True .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With