How can I put xaml build definitions in source control in Visual Studio 2015? - tfs

I use Visual Studio 2015 and TFS 2012. In Team Explorer, it is possible to manage Builds and Build Definitions. Since VS2015, the section Build Definitions is named "XAML Build Definitions". I would like to put xaml build definitions in source control. Problem is I cannot find the build definition files on disk. Anyone knows where they are ?
Thanks

You can download build process template and add it into source control, but you can't version-control build definitions.
In the new build system coming with TFS 2015 you can see the full history of the changes to your build definition. The feature that is currently missing is the ability to undo or rollback to a previous revision. Check https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/2037625-provide-a-way-to-version-control-build-definitions

Just in case anyone needs to access the XAML Build Definitions parameters. They are saved in the TFS database, table: [dbo].[tbl_BuildDefinition].

Related

Reconcile Workspace for TFS 2015 vNext Builds

We used to get notification from the tray of our windows machine for a finished build while using the xaml build definitions, it also had an option to reconcile workspace. The same functionality is not available for the vNext builds.
The BuildNotification App is available with VS 2015, but it seems that the reconcile workspace is not available with the vNext build. Is there some other app that can give a notification and do the reconcile operation?
We just moved to new builds (vNext) and are missing this feature as well.
Currently, we can do this manually via IDE (VS 2015):
Team Explorer -> Builds
Right click on latest build with you changes -> "Reconcile Workspace..."
The BuildNotificationApp is still a part of the VS 2015 and can be found here: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\BuildNotificationApp.exe. However, this app only applied to XAML build.
For now, to workaround the missing feature, you can use a free build status tool Catlight . It also shows status of vNext builds in tray area.
As for reconcile workspace, there is no this build-in feature for vNext build. However, you can manually use tf reconcile command for your workspace. Such as below screenshot:
Update:
If you just want a simple app or vs extension to achieve it, there is no these things for now. You may have to customize your own extension to implement it.
Update2:
I have created a feature request in uservoice:
Reconcile Workspace for vNext Build
https://visualstudio.uservoice.com/forums/330519-team-services/suggestions/15979690-reconcile-workspace-for-vnext-build
You can use AnyStatus to monitor both vNext and XAML builds.
AnyStatus comes with a feature called Triggers which lets you run a program or a batch script in response to status changes. Using Triggers you can configure it to run "tf.exe reconcile" when the build status changes from Running to OK.
Disclaimer: I am the author of Any Status.

Upgrading TFS 2010 build definitions to TFS 2013 build template

I have ported over all of my build customizations from TFS 2010 to the new TFS 2013 build process template. What would be the best approach to upgrade the old build definitions to the new template while retaining the settings (i.e. configurations to build, project, ect.) from the old one?
If your arguments are still the same, you should be able to open your existing definition and just apply the new template. All of your original settings should remain intact

Getting TFSBuild.proj from TFS 2008 to work on TFS 2012

I just copied my Solution from TFS 2008 to TFS 2012. In TFS 2008 the TFSBuild.proj does the normal solution building, calls installshield projects, dotfuscator projects and dumps the resulting installshield output in the drop folder.
In my Build Definition I set the "Items to Build" to point to the .proj file. The build works, but all I get is one folder with the logs inside. I added the .sln to build (although didn't need to previously) and get the .sln files built but installshield and dotfuscator are not done.
Looking at the .proj log file... None of my "Message" outputs are there. Was there some large change between these two versions that would necessitate a big change in the proj file?
I do not have admin rights to the TFS servers.
thanks
I'm guessing that you are using the "Default" build process template. You need to use the "Upgrade" template if you want to use a TFSbuild.proj file.
Edit your build definition and go to the "Process" tab. There should be an area that shows which template you are using. Click on the "show details" button and choose the "Upgrade Template" from the drop down list.
Now point the build at the folder containing the TFSbuild.proj and save the definition. This should solve the problem.

TFS Build Definition - Can you add this to source control?

I would like to add my Build Definitions to TFS Source Control. Is there anyway to do this?
Not really, no. If you're trying to track changes to your build definitions, you can use a couple of new commands in the latest releast of the Team Foundation Power Tools. The first compares two build definitions:
tfpt builddefinition /diff
This one exports a build definition's configuration to a text format, which you could then check into version control.
tfpt builddefinition /dump
Another option via powershell
https://gist.github.com/jstangroome/6747950
which basically uses c# types so should be easy enough to make into a linqpad or c# console app (or winforms or wpf)
used assemblies
Microsoft.TeamFoundation
Microsoft.TeamFoundation.Client
Microsoft.TeamFoundation.Build.Client
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Build.Workflow.dll

Using _TEAM_BUILD_ with TFS 2010

We moved from TFS 2008 to TFS 2010.
With TFS 2008 I used _TEAM_BUILD_ in project file const to turn PostBuild event off when building by build server.
Now, when I create build definition with new format, without using tfsbuild.proj, but using Default template, it doesn't seem to work. I have PostBuildEvent running even though I am using same approach.
Any ideas how to achive same functionality, having PostBuildEvent running from Visual Studio and to be ignored on build machine?
Check for BuildingInsideVisualStudio. As you'd suspect, it's only defined when building inside Visual Studio. Alternatively, you could add "/p:_TEAM_BUILD_=1" to the MSBuild Arguments build process parameter of your build definition.

Resources