Include stand-alone dependent assemblies?

What's the best way to include stand-alone, 3rd party dependent assemblies into my build?

4 comments
Comment actions Permalink

Hello,

  I'd suggest to consider two options:

  • check the assemblies into the version control and use relative paths
  • create a separate build configuration with a single "fake" build which would contain required files as artifacts, than, use artifact dependencies to send files to target build


  Hope this helps,
  KIR

0
Comment actions Permalink

When you say 'required files as artifacts' do you mean use Artifact Paths in general settings?

I created a fake build that merely calls a build file that doesn't build anything. I set the artifacts to grab all .dll files, **/*.dll but I still get an error when I try to reference them in another build:

Failed to download artifact dependency <CoreLibrary :: dependencies (last successful build)>: No files matched for pattern "*.dll"

0
Comment actions Permalink

Hello,

  Here are some details on the workaround:

  • You should create a fake build configuration with at least one build. It doesn't matter what it builds - it will be just the source for *.dll artifacts.
  • For this build, in its artifacts, you should place *.dll files, required by other build configurations. The exact location for the dll files is be <TC_DATA_DIR>/system/artifacts/<ProjectName>/<Build Configuration Name>/<buildId> . Create this directory and place dll files into it.
  • If you'll place *.dll files to the correct location, you shall see them in the TeamCity UI, on the "Artifacts" tab for that successful build for this fake build configuration.
  • All build configurations, which require shared *.dll files, should have an Artifact Dependency on the "fake" build configuration. In the Artifacts path field, enter *.dll (or **/*.dll, if dll files are placed in subdirectories). You can also specify target path for dlls and other settings. See docs on artifact dependency configuration.


  With this configuration, your fake build will provide DLL files to all other builds. The dlls will be downloaded to build agent (and cached, to avoid multiple downloads).

  Hope this helps,
  KIR

0
Comment actions Permalink

Ok, I fixed the problem. The assemblies were in subdirectories and I just needed to reference the .dll with **/*.dll in my dependent build.

Thanks.

0

Please sign in to leave a comment.