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

11 comments
Comment actions Permalink

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!"

0
Comment actions Permalink

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
0
Comment actions Permalink

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

0
Comment actions Permalink

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
....

[07:27:57][ResolveAssemblyReference]         For SearchPath "bin\Release\".

[07:27:57][ResolveAssemblyReference]         Considered "bin\Release\ProgressAdsUltimate.dll", but it didn't exist.

[07:27:57][ResolveAssemblyReference]         Considered "bin\Release\ProgressAdsUltimate.exe", but it didn't exist.
....
[07:27:57][ResolveAssemblyReference]         For SearchPath "bin\Release\".

[07:27:57][ResolveAssemblyReference]         Considered "bin\Release\ProgressAdsUltimate.CommonSolution.dll", but it didn't exist.

[07:27:57][ResolveAssemblyReference]         Considered "bin\Release\ProgressAdsUltimate.CommonSolution.exe", but it didn't exist.
....
[07:27:58][CoreCompile] Csc

[07:27:58][Csc] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationCore.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\PresentationFramework.dll" /reference:C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponents\bin\Release\ProgressFan.BaseViewComponents.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xaml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.Linq.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\WindowsBase.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\ProgressFan.BaseViewComponent.Extenstion.dll /target:library AlarmInfoWindow.xaml.cs AlarmInfoWindowWithOpisContainer.xaml.cs ConfirmationWindow.xaml.cs Misc\SizeObserver.cs Nastawy\NastawyAdministratorPanel.cs ProgressMenuV2.cs HeaderTextBlock.cs HeaderUpDownTextBlock.cs Misc\DelegateConfirmableCommand.cs Misc\ResourceUriAware.cs Nastawy\BoolNastawa.cs Nastawy\BoolNastawaComponent.cs Nastawy\LimitNastawa.cs Nastawy\NastawaBase.cs Nastawy\SingleNastawa.cs Nastawy\UInt32Nastawa.cs Nastawy\UInt32NastawaComponent.cs Nastawy\SingleNastawaComponent.cs ObecnoscNapieciaCheckBox.cs ProgressMenu.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs Test.xaml.cs TouchAlphaNumericBox.cs TouchNumericBox.cs WskaznikCheckBox.cs C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponent.Extenstion\obj\Release\AlarmInfoWindow.g.cs C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponent.Extenstion\obj\Release\AlarmInfoWindowWithOpisContainer.g.cs C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponent.Extenstion\obj\Release\ConfirmationWindow.g.cs C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponent.Extenstion\obj\Release\Test.g.cs C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponent.Extenstion\obj\Release\GeneratedInternalTypeHelper.g.cs

[07:27:59][Csc] Nastawy\BoolNastawa.cs(7, 7): error CS0246: The type or namespace name 'ProgressAdsUltimate' could not be found (are you missing a using directive or an assembly reference?) ....



end build failed!
What I'm doing wrong?
Thx
0
Comment actions Permalink

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

0
Comment actions Permalink

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?

0
Comment actions Permalink

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.

0
Comment actions Permalink

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:

[ProgressFan.BaseViewComponent.Extenstion\ProgressFan.BaseViewComponent.Extenstion.csproj] _CopyFilesMarkedCopyLocal

[13:20:15][_CopyFilesMarkedCopyLocal] Copy

[13:20:15][Copy] Copying file from "C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponents\bin\Release\ProgressFan.BaseViewComponents.dll" to "bin\Release\ProgressFan.BaseViewComponents.dll".

[13:20:15][Copy] Copying file from "C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponents\bin\Release\ProgressFan.BaseViewComponents.pdb" to "bin\Release\ProgressFan.BaseViewComponents.pdb".

[13:20:15][ProgressFan.BaseViewComponent.Extenstion\ProgressFan.BaseViewComponent.Extenstion.csproj] GetCopyToOutputDirectoryItems

[13:20:15][ProgressFan.BaseViewComponent.Extenstion\ProgressFan.BaseViewComponent.Extenstion.csproj] CopyFilesToOutputDirectory

[13:20:15][CopyFilesToOutputDirectory] Copy

[13:20:15][Copy] Copying file from "obj\Release\ProgressFan.BaseViewComponent.Extenstion.dll" to "bin\Release\ProgressFan.BaseViewComponent.Extenstion.dll".

[13:20:15][CopyFilesToOutputDirectory] ProgressFan.BaseViewComponent.Extenstion -> C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponent.Extenstion\bin\Release\ProgressFan.BaseViewComponent.Extenstion.dll

[13:20:15][CopyFilesToOutputDirectory] Copy

[13:20:15][Copy] Copying file from "obj\Release\ProgressFan.BaseViewComponent.Extenstion.pdb" to "bin\Release\ProgressFan.BaseViewComponent.Extenstion.pdb".


So  isn't C:\TeamCity\buildAgent\work\11e514bebeb30c5d\ProgressFan.BaseViewComponents\bin\Release\ same  "bin\Release"?
0
Comment actions Permalink

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.
0
Comment actions Permalink

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
0
Comment actions Permalink

I suggest you need to configure "SearchPaths" attribute of ResolveAssemblyReference task. This will help to avoid duplicating dll's all around.

0

Please sign in to leave a comment.