How do I make a project use the result from another project's build?


    This is my situation (simplified): I have a Team City Server which builds two projects. One of them corresponds to our development solution, and the other one is a Test Solution which is ran using NUnit.

    The Test Solution tests some classes from the Development Solution. However, when it looks for the referenced dll's, it goes to the server's file system and fetches outdated versions. What we want to do is have the Team City Test Project grab the dll's generated when the Team City Development Project is built. I looked into artifact paths, but to be honest I didn't see how to use them for this.

    I also thought of installing the Development dll's in the GAC and have the latest versions always there, but some dll's are native, so we can't do that.

    Can I configure Team City to link the Development Project's output to the Test Project? If it is so, how can I do it?



Comment actions Permalink

Hello Dario,

If I understand you correctly, you need to configure publishing artifacts in Development build configuration and to use these artifacts in Test build configuration add Artifacts Dependency in Test configuration.
For the future, you may want to use snapshot dependency to ensure that both builds use the same sources.

Kind regards,
Comment actions Permalink

Hi Marina,
    In the end, I put the Development and Test projects in the same solution (and Team City Project), since it works and I've been told this is common practice when doing TDD. Team City now compiles and runs my test perfectly. Nevertheless, it's good to see that Team City can handle the way I was trying to do it. You never know, perhaps some day I might be forced to put Tests in a separate solution.

Comment actions Permalink

I solved it in another way, but I'll investigare Marina's suggestions later as the may be useful in the future


Please sign in to leave a comment.