Need lesson in Artifact Dependancy!
Hi,
I'm pretty new to TC and I'm having trouble with Artifact Dependancy. The Help text isn't much use on this either :O( . If I have a project called 'Moo' and project 'Baa' requires Moo's generated DLL for its build then how do I set this up? I think I've figured out that the Moo's DLL has to be commited to its repo as a build label so that Baa can then download and use it (is that right?), but then when I try and set up and test the artifact dependancy TC moans that it can't find the dll in the repo even though it really is there. I'm probably misunderstanding how artifact dependancy hangs together. I hope someone can help! I'm using SVN as the VCS.
Thanks
Rob
Please sign in to leave a comment.
Rob,
I assume Moo and Baa are biuld configurations.
First, you need to specify your DLLs in Moo as artifacts - they should become available in the Artifacts of the build on the server.
Then, you need to go to "Dependencies" tab of the Baa settings and add an Artifact dependency on Moo, specifying DLLs in the Artifacts path.
If you have any problems with this, please describe your current settings (e.g. screenshots of the Settings screens) and the desired/actual behavior. Please include any error messages that you get.
--
Best regards,
Yegor Yarko
Project Manager (TeamCity)
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Hi
I have similar problem.
I have two project. First - with 3 dll's and second that needs those dll's.
In the first project I have setted:
Artifact paths:
ProgressAdsUltimate\bin\Release\ProgressAdsUltimate.dll=>
ProgressAdsUltimate.CommonSolution\bin\Release\ProgressAdsUltimate.CommonSolution.dll=>
ProgressAdsUltimate.FlagsProducer\bin\Release\ProgressAdsUltimate.FlagsProducer.dll=>
In the second project I have setted Dependencies:
- Snapshot Dependience to first project
- Artifact Dependience to:
ProgressAdsUltimate.dll=>%teamcity.build.checkoutDir%/Bin/Release/ProgressAdsUltimate.dll
ProgressAdsUltimate.CommonSolution.dll=>%teamcity.build.checkoutDir%/Bin/Release/ProgressAdsUltimate.CommonSolution.dl
ProgressAdsUltimate.FlagsProducer.dll=>%teamcity.build.checkoutDir%/Bin/Release/ProgressAdsUltimate.FlagsProducer.dl
"Checking artifact dependiecies" is working fine but when a try to build second project, I get an info that Csc.exe cannot find namespace from my referenced dll's
When I check ResolveAssemblyReference in Build Logs, a can see that resolver search "bin\Release\" path.
My question is:
Is this path ("bin\Release\") same with %teamcity.build.checkoutDir%/Bin/Release/ProgressAdsUltimate.dll.
Do I copy my artifacts into right directory?
Thx for any suggestions
Dawid,
Artifact Destination path is a directory where artifacts are to be placed, so you do not need target file name in it. Also %teamcity.build.checkoutDir% is optional, as these paths are resolved in checkout directory.
In your case, rules should look like this:
ProgressAdsUltimate.dll=>Bin/Release
ProgressAdsUltimate.CommonSolution.dll=>Bin/Release
ProgressAdsUltimate.FlagsProducer.dll=>Bin/Release
Hi
Still nothig :(
In my build log I have following entries:
[07:27:51][Resolving artifact dependencies] 3 files retrieved for [ProgressAdsUltimate.dll=>Bin/Release/ ProgressAdsUltimate.CommonSolution.dll=>Bin/Release/ ProgressAdsUltimate.FlagsProducer.dll=>Bin/Release/] downloading pattern
....
....
....
end build failed!
What I'm doing wrong?
Thx
Dawid,
The log says that files were retrieved successfully. Please, check the directory "C:\TeamCity\buildAgent\work\11e514bebeb30c5d\bin\Release" to see if files are there.
To double check, you can also change target directory to "bin\Release":
ProgressAdsUltimate.dll=>bin\Release
ProgressAdsUltimate.CommonSolution.dll=>bin\Release
ProgressAdsUltimate.FlagsProducer.dll=>bin\Release
Hi
Yes. I have three dll's in directory C:\TeamCity\buildAgent\work\11e514bebeb30c5d\bin\Release. When I remove those files and build project after that, files appears, so downloading is working.
Is it possible that those dll's are copied after build begins?
No, all artifact dependencies are copied to destinations before invoking any build steps.
Are you using solution runner?
Can you build this project locally?
Please, double check you have assembly references configured corretly.
One intereting thing:
I copied my dll's to: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client - one off the searching directory and now build pass throught the resolving procedure.
Among build log entries a found:
So isn't C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponents\bin\Release\ same "bin\Release"?
If you mean destination paths of artifact dependencies, the answer is "no".
Artifact dependencies rule "file.ext=>bin\Release" will download file to C:\TeamCity\buildAgent\work\11e514bebeb30c5d\bin\Release (note missing "ProgressFan.BaseViewComponents")
Please, update artifacts destinations accordingly.
Hi
Downloading is working, but searching is not :(
I have no idea what's wrong.
I'm sure, I have a stupid bug
By now, I have work around:
ProgressAdsUltimate.dll=>ProgressFan.BaseViewComponent.Extenstion\bin\Release\
ProgressAdsUltimate.CommonSolution.dll=>ProgressFan.BaseViewComponent.Extenstion\bin\Release\
ProgressAdsUltimate.FlagsProducer.dll=>ProgressFan.BaseViewComponent.Extenstion\bin\Release\
ProgressAdsUltimate.dll=>ProgressFan.BaseViewComponents\bin\Release\
ProgressAdsUltimate.CommonSolution.dll=>ProgressFan.BaseViewComponents\bin\Release\
ProgressAdsUltimate.FlagsProducer.dll=>ProgressFan.BaseViewComponents\bin\Release\
ProgressAdsUltimate.dll=>ProgressFan.BaseViewComponents.HowToUse\bin\Release\
ProgressAdsUltimate.CommonSolution.dll=>ProgressFan.BaseViewComponents.HowToUse\bin\Release\
ProgressAdsUltimate.FlagsProducer.dll=>ProgressFan.BaseViewComponents.HowToUse\bin\Release\
working for me :)
Thx for you help
I suggest you need to configure "SearchPaths" attribute of ResolveAssemblyReference task. This will help to avoid duplicating dll's all around.