Build using artifact dependencies failing

I have a build that adds assembly artifacts and another build that uses those artifact dependencies. The artifacts exist but the second build fails with 'The type or namespace name 'assembly-name' could not be found'. I'm setting the destination to the bin folder with the other assemblies. What might I be missing?

20 comments
Comment actions Permalink

How did you configure artifact dependency?

0
Comment actions Permalink

I'm not sure I follow what you're asking.

The build creating artifacts has artifact path: **/*.dll
The build using artifacts has dependencies with artifact path: **/*.dll  and destination: bin

Do I need to make the destination relative?
The full log gives me this:

For SearchPath "bin\".

[Project "myproj.csproj" (default targets):] Considered "bin\assembly-name.dll", but it didn't exist.
0
Comment actions Permalink

What rule do you use (last finished, last successful, pinned, build number)? Have you tried to click on "Check artifact dependencies" button at the page where dependencies are configured?

0
Comment actions Permalink

Last successful build. Yes, the check artifacts is successful.

See the log I added above.

0
Comment actions Permalink

Please take a look where the files were placed at the working directory on the agent.

0
Comment actions Permalink

As stated above they are :
The build creating artifacts has artifact path: **/*.dll
The build using artifacts has dependencies with artifact path: **/*.dll  and destination: bin

Is the destination folder relative to the checkout?

0
Comment actions Permalink

Yes destination directory is relative to checkout. I asked to check on the agent itself, are there any files downloaded into the checkout directory/bin folder.

0
Comment actions Permalink

How do I check that directory?

0
Comment actions Permalink

Just log into the agent PC where your build ran, and go to checkout directory of your build. The checkout directory of your build is shown in the first lines of your build log:
Checkout directory: C:\Agent\work\bb38d8b428a11700

0
Comment actions Permalink

Ok, the artifact dependencies do exist but it retains the original subdirectory structure so within bin/  there is are folders for each assembly since that is how they are setup in source. How can I change the checkout structure without changing the source structure?

0
Comment actions Permalink

There is still unresolved issue: http://jetbrains.net/tracker/issue/TW-5986 Please watch/vote for it. Right now the only workaround I see is to change your artifacts publishing rule to something like:
bin/**/*.dll

instead of **/*.dll

0
Comment actions Permalink

I'm unclear how changing the publishing to bin/.... would fix it. There would still be the sub-directories which the build does not search.

0
Comment actions Permalink

If you have the following artifacts (related to checkout directory):

bin/Debug/file1.dll
bin/Release/file2.dll

then if you publish them with help of bin/**/*.dll on the server you'll got:
Debug/file1.dll
Release/file2.dll

bin directory will be stripped.

In the artifact dependencies you have: **/*.dll and destination dir: bin
So when artifacts will be downloaded you will see:

bin/Debug/file1.dll
bin/Release/file2.dll

If your bin directory is not within checkout dir directly you will need to provide full path to bin:
path/subpath/bin/**/*.dll

Hope this helps

0
Comment actions Permalink

I'm not getting the results you stated though.

When I use:  source **/*.dll and destination dir: bin
I end up getting:  bin/Debug/file1/file1.dll in the checkout directory because the assembly exists within it's own directory in source and using **/ adds that folder to the destination.

0
Comment actions Permalink

I meant you should use bin/**/*.dll pattern in the artifacts paths of the configuration which publishes its artifacts. Pattern used in artifact dependencies should not be changed.

0
Comment actions Permalink

I'm not sure we're talking about the same thing. In the build that produces the artifacts, the source files exist in sub-directories in the checkout root and there is no bin folder in that source because these are 3rd party assemblies and not compiled by me. The source structure looks like: path-to-trunk\folder1\file1.dll.
So in that checkout I have http://url/path-to-trunk and in the artifact path I have **/*.dll so it will get all .dll within their own folders.

0
Comment actions Permalink

I voted for the fix. I noticed this was updated a week ago. What is 'Next Version Pool' ?

0
Comment actions Permalink

Sorry for delay with replying.

Next version pool is a pool of requests which are not included into the next version but some of them can be fixed if we will have enough time.

Could you please send me real structure of your artifacts on the agent before they are published to TeamCity and structure you want to see on the agent where dependent build will start. Please make paths relative to checkout directories.

0
Comment actions Permalink

Right now the structure is :
/folder1/assembly1.dll
/folder2/assembly2.dll
/folder3/assembly3.dll
etc.

What I want in the dependency artifact destination is : bin/assembly1.dll, assembly2.dll, assembly3.dll etc all in the bin without the sub folders

0
Comment actions Permalink

Then try to use the following patterns for artifacts publishing:
folder1/*.dll
folder2/*.dll
folder3/*.dll

and your current pattern in dependencies:

**/*dll with destination set to bin.

0

Please sign in to leave a comment.