Getting Enterprise Library 4.1 into TFS

Topics: Building and extending application blocks
Jan 29, 2009 at 9:40 PM
I am having some issues getting the Enterprise Library 4.1 team build to work in TFS. MSEL 4.1 compiles no problem locally but the team build fails on the "Compiling sources for Any CPU/Release" build step.

I am pretty new to TFS and I believe this may be a referencing issue with the assemblies found in the "Lib" folder of the EL solution containing the ObjectBuilder and Unity etc. references.

Is there a walkthrough somewhere which outlines the best way to get the EL into TFS??
Jan 30, 2009 at 2:45 AM
Hi,

I cant seem to find any about EL in TFS. Anyway, On your build server, when the compilation failed does it show any message regarding the error or maybe a log? 


Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
Jan 30, 2009 at 3:30 AM
Edited Jan 30, 2009 at 3:31 AM
Yep! as I stated it fails on the abovementioned step and the following log file "ErrorsWarningsLog.txt" contains the following error for quite a number of class files which use the namespaces below;

[Any CPU/Release] C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Practices.Unity". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
[Any CPU/Release] C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Practices.ObjectBuilder2". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
[Any CPU/Release] Configuration\FileConfigurationSourceElement.cs(17,27): error CS0234: The type or namespace name 'ObjectBuilder2' does not exist in the namespace 'Microsoft.Practices' (are you missing an assembly reference?)
[Any CPU/Release] Configuration\ObjectBuilder\AssemblerBasedCustomFactory.cs(15,27): error CS0234: The type or namespace name 'ObjectBuilder2' does not exist in the namespace 'Microsoft.Practices' (are you missing an assembly reference?)

I am assuming this is a missing reference in somewhere in my team project structure? "Release.txt" contains the same errors.

Cheers,
Jan 30, 2009 at 4:42 AM
Hi,

I think it cant resolve the required assemblies for the build. Do you have enterprise library installed on the machine with your build server? or do you include the referenced assemblies in your solution?

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 1, 2009 at 2:30 AM
The missing assemblies are in the "Lib" folder above the "Blocks" directory, so the local build references are fine because each EL project references the correct path, however the assemblies are not included in the EL solution structure and are hence not included in source cointrol and therefore the build fails because it can't find the referenced assemblies.

I guess what I am after is - Is there a best practice way or walkthrough which includes these assemblies in the Team Build (in source control)? I have been looking furhter into this and am think maybe it would be better to import the "Unity Application Block 1.2" and reference the missing assemblie this way? As I said, I am new to TFS - what would be the best way to do this?
Feb 1, 2009 at 8:14 AM
Edited Feb 1, 2009 at 8:16 AM
I juset added the dll's that weren't built by the projects included in the solution as solution items.  Just choose add existing item under one of your solution folders.  The project references are relative so they should work on any computer regardless of the root of the solution.