Is there an equivalent to CustomizableOutDir in Team Build 2010? - tfs

Is there a 2010 version of CustomizableOutDir for TFS?
I want to run a Silverlight and .NET project such as what is being talked about in this guidance article, and need the CustomizableOutDir functional to do something like this for my build to separate out Silverlight projects from .NET projects, some of whom have the same assembly names.

Aaron Hallberg mentioned to me that you can change the MSBuild activity in the workflow to not set an OutDir. This worked, but caused the Binaries folder to not get a copy of the output.
"you [...] need to modify the workflow to not set the OutDir property of the MSBuild activity. I would suggest opening up the xaml in a text/XML editor rather than the WF designer so that you can just search for the string MSBuild."

Related

How to configure multiple project in Team Build 2015

How to configure multiple project in Team Build 2015 (using the new task based workflow, not the old XAML builds).
Right now I see only one solution can be configured for Visual Studio build task.
You can easily add more than one build task that explicitly calls a single solution. That will also allow you to control the order that they get built.
Just select "Visual Studio Build" from the sea list. This works in Visual Studio Online and TFS 2015.
As others have mentioned there are multiple ways to accomplish this:
Add multiple "Build with MsBuild" or "Build with Visual Studio" tasks. Let each task build a specific solution by entering the full path to the solution/
Use the wildcard solution to find all solutions **/*.sln will build all solutions in the workspace.
You can use a workspace cloaking rule if you're using TFVC for source control to exclude one of your solution files from the workspace, that way it won't be downloaded from sourcecontrol and won't be built.
Use ; to combine multiple search patterns: **/abc.sln;**/xyz.sln
Create a custom msbuild file (e.g. buildprojects.proj) which in turns invokes the msbuild to build each solution you wan to build. Configure the task in the workflow to call teh .proj file instead of the specific solutions.
You can enter a pattern. The default for the Visual Studio template is **/*.sln, which will recursively match on all .sln files in the repository/workspace.

How do I modify a VS Build Workflow if VS can't find any custom DLLs it uses?

I'm using TFS Server 2010.
In my source I have a folder called BuildProcessTemplates. This has a child folder called Custom Assemblies.
Now, when the build runs, it happily loads the DLLs in the Custom Assemblies folder and does its thing.
I need to modify the .xaml file that defines the workflow of the build. If I double click on the .xaml file VS tries to open it but throws an error saying it can't find certain types that I know are defined in the DLL that is in the Custom Assemblies folder.
The workflow is told where to find these types when the build runs by Build Controller as it is defined as a property in the TFS Admin Console.
So, how on earth do I get VS to open my .xaml file properly? How do I let it know where to look for the DLL? I've tried moving all of the files in Custom Assemblies in to the same folder as the .xaml file, but that didn't help.
Clearly I'm missing something; I just don't have a clue what it might be.
You normally create a C# Project (Unit Test is easiest because it is pretty bare).
When you have you project you then need to:
Add the XAML as a File,
Add the Custom Activities DLL's as references.
Add the relevant TeamFoundation* references from the GAC (make sure the TFS version matches - 2010 = v10, 2012 = v11).
Also, I always open our TFS "Build Project" with VS version that matches our TFS Version, I find it keeps the number of problems down.
There's a great series of posts from Ewald Hofman here, that go through the process - I find it a bit dated, and that the Wrox Professional TFS 2012 book does a better job of explaining it, if you can get a copy.

How to rename build name with assembly version?

Pls see screenshot. I have setup continuos integration with tfsservice.
It builds and deploys after each checkin.
I would like to append or pre-pend if that word exists, the assembly version so that I can easy recognize what build generated what version, and I can easy identify in which build a bug appeared.
If you mean you need to get the version number from a library during the build, then you can use the Assembly class in the MSBuild Extensions Pack to get the version number from the desired library.
This is feasible, but you need to customize your build template.
A good starting point is the Visual Studio ALM Rangers' BRDLite Reference Templates. See Assembly Versioning example in the BRDLite.Asp.NetTemplate.2012.2.xaml template.

CompilationOutputs in TFS 2010

Is there any similar property to CompilationOutputs in TFS 2010?
If not, how to get all compiled assemblies including all metadata as in TFS 2008?
In TFS2010, if you use the UpgradeTemplate.xaml build process template you can keep your existing TFS 2008 based MSBuild proj files that use the CompilationOutputs property and continue building as per usual.
If you are using TFS2010 workflow based builds (i.e. DefaultTemplate.xaml or a derivative) then the approach will need to be somewhat different. The workflow makes a call to an MSBuild activity internally in order to compile the solution and there is nothing in the properties for that task that returns the data you're looking for.
To work around the change, further down in the workflow there is an CopyDirectory tasks that moves files from the binaries folder to the drop location. You could always put in your own workflow activities just before or around that point in the process and do what ever it is you are wanting to do.

In TFS, once I have the build definition setup, how to I modify the task list etc?

I setup my build definition, is that all I do when it comes to setting up my build using the Team Explorer GUI?
It seems like the only thing for me to do now is edit the msbuild .proj file?
Is there a GUI for this or its all hand editing from here on it?
Currently there is no MSBuild editor inside Visual studio, but I've read that there gonna be one in Visual Studio Team System 2010 (one based on Workflow Foundation renderer).
If you really want a GUI you could try Microsoft Build Sidekick v2 but it is not free (55$) and not very useful in my opinion.
In TFS 2008 some of the information about a build can be edited through the GUI, but not much. If you right click on the build definition and choose Edit Build Definition you can change the workspace mappings, retention policy, drop location, and triggers. To change anything else you need to edit the .proj file.
What is it that you're trying to do? If you ask a specific question you might get interesting answers.

Resources