tanyaz

Hello,

We use 3rd party DLLs, which we added to Source Control.

In our project we added shortcuts to them (by Adding Existing Item As Link) and references.

If we use SkipClean=true in team build, these dlls are not updating in Binaries folder and in Drop location too.

What are my options, besides creating copy task

Thank you.



Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

Hua Chen - MSFT

Hello tanyaz,

I fear that I didn't catch your meanings. If there is any misunderstanding please let me know.

In our project we added shortcuts to them (by Adding Existing Item As Link) and references.

If you add an Existing Item As Link, the 3rd party DLLs aren't source controlled in the TFS.

Are the values of 'Copy Local' property on the references true

Please click one 3rd party dlls reference, select property windows.

Try to set the 'Copy Local' true to see if it works.

Is there any other customization in the TFSBuild.proj file

Or could you please paste the build log

Thanks






Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

tanyaz

Hello,

3rd party dlls were added to specific folder under Source Control.

Shortcuts were added in order to garantee update of the dlls while getting the latest version from Solution Explorer.

'Copy Local' property on references is True.

No additional customization in TFSBuild.proj needed, except of SkipClean=True, on order to reproduce the problem.

Thanks

Tanya





Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

Aaron Hallberg - MSFT

A couple of clarifications:

* Do you just have SkipClean = true, or have you set the other two properties required to do an incremental build in Team Build v1 (SkipInitializeWorkspace = true, ForceGet = false)

* Is your project getting rebuilt when the referenced assembly changes

-Aaron






Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

tanyaz

Hello Aaron,

* I use only SkipClean = true

* I did not get you. The compilation succeeds in VS and in team build.

In order to resolve the problem for now, I added delete task to the TFSBuild.proj which deletes all files in Binaries folder.

In this case, after the compilation the folder contains all updated binaries.

Thank you

Tanya





Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

Aaron Hallberg - MSFT

Team Build v1 makes it rather difficult to do an incremental build, which is why (I presume) you had set this property to true in the first place. With SkipClean true but SkipInitializeWorkspace false and ForceGet true (their default values) you will still be doing a full rebuild every time. So - if you really want to do an incremental build, I would suggest setting these properties as well. See http://msdn2.microsoft.com/en-us/library/aa833876(VS.80).aspx for more info here.

The reason, I think, that your binaries were not getting updated is just that they are read only, since they are checked into source control. As a result, the first time a build occurs, they are copied to the binaries location. Subsequent builds cannot overwrite the read-only files, and so the original versions remain. Your delete makes sense in this context. Alternatively, you could do an attrib -r or a tf edit / td undo to make them read/write during your build process.

-Aaron






Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

tanyaz

Hello Aaron,

You are genius!

My purpose is not incremental build.

So, could you please give me an example for usage of the -r attrubute (where do i use it and how ) and tf edit / td undo command (in which stage of build do I do that ).

Thank you so much!

Tanya





Re: Team Foundation Server - Build Automation SkipClean=True does not update binaries

Aaron Hallberg - MSFT

I would recommend the attrib -r approach, since it is a bit simpler. Something like the following should do the trick:

<Target Name="AfterGet">

<Exec Command="attrib -r *.dll /S" WorkingDirectory="$(SolutionRoot)" />

</Target>

That will turn of the read-only bit of every dll in your workspace mappings, which I would think would do the trick! If you want to be a bit more targeted, you could specify individual subdirectories to search for dlls, individual files, etc.

-Aaron