Nested Projects - VS2005 SLN - Missing DLLs

I have a VS 2005 solution with the following directory structure:

\Main.sln
\Main.csproj
\Test
\Test\Test.csproj

such that the solution and project are at the same level, however, the test project is one level below.

the project (both the test and the main) share a reference to an external project's DLL. This DLL is compiled by TC and placed into an artifact prior to the Main.sln project being compiled.

(Artifact path: *.dll, destination path: bin\).

The Main.csproj file compilies without issue. However the Test.csproj does not. reports that it cannot find the external DLL. "The type xxx.yyy.Services.CentralizedServiceContract.AgentInformation' is defined in an assembly that is not referenced."

I have checked the build directory on the build agent, the external DLL is specified in the bin directory of the MAIN project and the artifacts are created for the MAIN project as well.

When i add an additional entry for the artifact path to push to the Test directory it works. Is this by design behavior? Is there a better way to do this (other than the GAC)?

Thank you

1 comment

Actually, TeamCity just starts msbuild process. As Working directory it sets Checkout directory.
Yes, that is possible to use GAC for that external dll, but it could make your build using older version do .DLL instead of new (here I mean some human factor).

The right way is to create folder lib somewhere near your projects. All refeerences in .csproj files should have ]]> describing the relative path to the folder where that external library is.

BTW, does that works if running the build using msbuild.exe?

Thanks! Sorry for delay.

0

Please sign in to leave a comment.