vs2010 .sln + 3rd party dll dependencies


I have been struggling with this for too long, please help me.

I had a project up and running using a VS2010 .sln MSBuild.  The solution consists of 2 projects.  Both projects reference a third party .dll.

I had gotten an updated dll, replaced the existing - then ended up having issues.  It makes no sense, but no matter what i do, the build runner complaines of not being able to resolve the types.

Everything runs perfect locally.  I ended up deleting and recreating the build project (out of frustration).

I am not even sure of the best way to tell the project what the dependency location is, i have tried everything.  The closest i have gotten is including a hint path in the .csproj in the project to the FULL PATH of the 3rd party dll on the CI server.  If i put an invalid path, it tells me it cannot find it the assembly and goes no further.  If i put a valid path i get this error:

Classes\AccessThirdPartyStuff.cs(6, 7): error CS0246: The type or namespace name 'ISpindler' could not be found (are you missing a using directive or an assembly reference?)

If i open this project on the CI server it compiles just fine.

This is driving me crazy as it seems like such an easy issue.  Can someone perhaps provide some insight?  I would also like to know what the recommended way to do this is (ie: create a common folder on the CI server for 3rd party compiled dll's, reference it always via x, for local development do y) ???

Thank you in advance :-)

1 comment
Comment actions Permalink

There are two solutions to references problem. The first one (and not the best one to me) is to put all references in GAC. You need to mantain the right GAC state in the all build agents.

Another approach is to put all references into some folder in the version control, near the solutions. Check in *.csproj files that for all such references there is <HintPath> element with relative path to the folder(s) with references. While creating this scario you should add all references from this path in VS.


Please sign in to leave a comment.