Trouble with dependencies using VS2010 .sln MSBuild


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?)

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 :-)

Comment actions Permalink

Please check for transitive dependencies of your library. What library is 'ISpindler' came from? Please check GAC assemblies. Does the build succeeded if you run in from the build agent from the same folder under the same user account? Please check the user account that was used to run build agent windows service.

<hint> path should contain relative path from the .csproj file folder to the library. To make it work you may consider putting your references to the version control.

Comment actions Permalink

To get my VS 2010 projects to build under TeamCity, I added the TeamCity dependency bin/Release or bin/Debug paths to the referring project's Reference Paths section.  In VS 2010, right-click on each project in the solution that needs the dependency, go to the Reference Paths section, and add the path there.  It will need to be a path that is accessible to that VS 2010 IDE or it won't let you add it, though you might be able to add the reference paths add-hoc like you can change the version numbering add-hoc, with NAnt.  I can give you a code sample for the version modification if you want.

Comment actions Permalink

Please vote for
You may attach the sample to the issue. Thanks!

Comment actions Permalink

Thank you both.  For some reason, deleting all of the dll's (in question) on the server then running the build again resolved the issue. :-)

I appreciate your time.


Please sign in to leave a comment.