Rick van den Bosch (old account)

Our current project uses the possibilities of MSBuild to have a team build on a TFS server. This has been working up until yesterday somewhere around 1 pm.

Our problem:
Compilation of one project (of 71 in total) is failing. The project builds successfuly on al local machines. It references EnterpriseLibrary.Common and EnterpriseLibrary.Configuration (among other assemblies), both of EntLib 1.2. In the csproj file, both references have a hintpath which is relative, indicating the project file is right. The references are made to an 'external references' folder, where the entire EnterpriseLibrary can be found. This folder is also available in source control.

(Part of) the statement which makes the build fail:
Csc.exe /reference:"E:\TFSBuild\projectname.Daily\Binaries\Release\Microsoft.Practices.EnterpriseLibrary.Common.dll" /reference:"..\..\External References\EntLib 1.2.0.0\Microsoft.Practices.EnterpriseLibrary.Configuration.dll"

My main question is: what is making MSBuild pass one reference with a relative path, and one with an absolute one Why is this project breaking our build

I tried cleaning up the project, I even made an entire new project and copied the files there. But all to no avail. Any help, hints or suggestions are greatly appreciated.

Kind regards.




Re: Team Foundation Server - Build Automation MSBuild passes reference which is set relative with absolute path, breaking build

Buck Hodges

You say it was working up until 1pm the day before. What has changed Someone must have changed the project files or a file that the build depends on. That's the first place I'd start.

Buck






Re: Team Foundation Server - Build Automation MSBuild passes reference which is set relative with absolute path, breaking build

Hua Chen - MSFT

Hello Rick:

Do you still have the problem

Does Buck's suggestion work






Re: Team Foundation Server - Build Automation MSBuild passes reference which is set relative with absolute path, breaking build

Rick van den Bosch

Nothing changed in the project file, so that was what was weird about it.

Eventually, we found it:
We use the Enterprise Library V1.2 in some of our projects. And because some of the projects are being re-used from other internal projects, not all the references in thos projects were checked for versions. As it turned out, another project had a reference to an enterprise library assembly with a runtime version of .Net 2.0. And allthough this project compiled succesfully, local and on the build server, it broke the build of one of the other projects. This project (the one with the wrong reference) didn't need the EntLib reference, so it 'disappeared' because of optimization. But reference resolving had resolved it, and pointed to EntLib 3.0. Later in the build the project which failed did need the EntLib file, and used the allready resolved assembly location.

The problem occured after EntLib 3.0 was installed on the build server. I think the problem is there because of breaking changes between EntLib 2.0 and 3.0, because you would think the assembly resolver would have found the EntLib 2.0 assembly earlier.




Re: Team Foundation Server - Build Automation MSBuild passes reference which is set relative with absolute path, breaking build

Hua Chen - MSFT

Hello Rick:

I am glad to see that you found the cause.

Thank you very much.

Your experience may help others.