Learn to use Visual Studio, Visual Studio Online, Application Insights and Team
Foundation Server to decrease rework, increase transparency into your application and increase the rate at which
you can ship high quality software throughout the application lifecycle
I'm here today (and trying real hard to not be jealous of those of you reading this from beautiful San Francisco) to share some new information about version control and Team Foundation Build (TFBuild) in Visual Studio 2013 Preview.
I doubt many of you are surprised to hear that one of our big investments for this release is Git.
Since January we've offered Git as a Visual Studio 2012 extension and on Team Foundation Service. Beginning today:
Plenty has already been written about Git branches. To understand how they work, I encourage you to read Git-scm: Git Branching. Now let's take a few moments to look at how you can work with Branches in Visual Studio and TFS.
Creating a branch is a super lightweight (and thus very fast) operation. In Git, when you create a branch, you are simply creating a new reference to a commit. For a detailed explanation, see Git-scm: Git Branching - What a Branch Is. You can create as many private branches as you want locally.
You don't have to share ("push" to remote) with anyone else right away, or ever. As you make changes, they are tracked in the history of the branch:
When you are ready, you can delete the branch if you don't want it, merge it back into your "master" branch, or push it to your remote repository so your teammates can work on the branch with you.
In Visual Studio, when you are ready to work on a branch published by one of your teammates, you create a new branch based on the remote branch.
In web access (Keyboard: Ctrl + 0,A) you can select a branch and see how it compares with all your other branches. For example, here we see that the newIdea branch is missing two commits that master has, but that it also has three commits that master does not have.
When you are ready, you can merge one branch into another.
As useful and powerful as branches can be, there are some tradeoffs whether you are in Git or TFVC. When you want to merge one branch into another, often you must first...
Conflicts occur in pretty much the same circumstances whether you use Git or TFVC: when merging two branches and combining your changes with those from other members of your team. You can manually resolve conflicts in Git version control in a similar way to how you do it in TFVC.
Error message in Team Explorer: Value was either too large or too small for an Int32: One cause of this error occurs when your are using Solution Explorer. To resolve the issue:
Error message from webpage: window.external.notifyToken is not registered: You will see this error when you don't have cached credentials to your Team Foundation Service account and you try to authenticate during a Git operation. To resolve the issue, go to another Team Explorer page such as Work Items, and then take an action such as running a query. We plan to release a fix for this issue soon for Visual Studio 2012 in a new version of the Git provider. The fix will also be included in the next version of Visual Studio 2013.
There are several other new version control features. For example you can Undock pages such as Pending Changes and persist them as independent windows.
See What's new in version control.
There is plenty of new value for your team in Team Foundation Server 2013 Preview when it comes to automated building and testing of your code.
Are you using Team Foundation Service? Do you want to use the hosted build controller to build Windows 8.1 Preview Store apps? You can do it. Here's how: Hosted Build Controller: Build Windows 8.1 Preview Store apps.
We've simplified the build process parameters. And of course now you can to build the code you store in a Git team project, and you can generally do everything you can do with code stored in a TFVC team project. One notable exception: you cannot define a gated check-in build in a Git team project.
See Use the Default Template.
Before you invest in a custom build process, would running a script during the build meet your needs? If so, you run your batch and PowerShell scripts before and after MSBuild compiles your code, and also before and after your tests are run. We provide your script with access to environment variables they need to get the paths to working and output directories, as well as other information about the build.
See Use the Default Template to run your scripts.
We expect that the ability to run a script will relieve the need many developers might have had to customize their build process. But for those who still need to put their own secret sauce into their build processes, in this release we're aiming to make that easier to do. We've simplified the default build process templates, using coarser activities so that it should be easier to find the spot where you need to insert your custom build logic.
If you've wanted to create a custom build process but just didn't feel you could invest the time to get started, I challenge you to give "Hello World" a go using this updated and expanded guidance.
See Create a custom build process.
Want to know what else is new for TFBuild? See What's new in Team Foundation Build.
I invite you to post your comments here.
For questions, I encourage you to post them on our newly revamped forums: http://social.msdn.microsoft.com/forums/en-us/home.
So I still have to use windows workflow to edit a build? Yuck. Team City is way better. Is there a better collection of build activities like FTP a file, robocopy, web deploy, database deploy?
Is it easier to add custom build sections in the build report for graphics and charts?
@Adam there's a great collection of release activities that are part of inRelease which is being merged into tfs 2013.
@Betty where can I get the new version of in release to see these activities?
I downloaded and setup TFS 2013 preview and I'm looking at customizing the build workflow. How does the 'copy binaries to drop' activity work? I can't seem to figure out how the source and target locations get populated. I just need to copy some files from version control to the drop location as I don't have any solution files that need to be built. I just need copies from version control to the drop location.
Will we be able to edit the build definition workflow (.xaml) file in eclipse?
Any new permissions around prevent folks from changing the build parameters (like drop location\solution to be compiled\tests to be run)?
Can we now round editing build definition xaml workflows between multiple VS versions (one dev changes the process file in VS 2012, another changes the same workflow file seamlessly in VS 2013, and then back down to VS2012 without issue?)
At the alm summit there was talk about "Build Measure Learn"....how does TFS 2013's new build workflow make it easy to add analytics, like SONAR, into the build outputs / deployments? How can we "learn" more about build process in TFS 2013?
Is there a Unix\Linux based build agent for TFS 2013?
How do we get that behind|ahead red/green view with TFS centralized version control for our branches?
Just re-read my comment and I don't think I was clear...what I'm asking is how does TFS 2013 better enable our organization to "measure" and "learn" (following the "build", "measure", "learn" methodology) about the value of the artifacts being generated from the TFS build process?
@Winston - Due to the differences in how TFVC and Git manage branches, the ahead/behind info is easy to calculate for Git, but more complex in TFS because you need to take items into account. That said, this is a feature we have wanted in TFVC for some time, and we're tracking in on our backlog. It would be great to see how much support there is for this in the community - would you mind filing a suggestion on visualstudio.uservoice.com?
Wow, a lot of visits, comments, and questions in fewer than 24 hours; thank you! Want to quickly share a few thoughts.
I just updated this post with blurbs and links to the relevant MSDN Library content; I had to wait until the publication process over there was completed. So if you wanted more details on some of the above points go up there and check out the links.
Someone pointed out that this topic seems to advertise scope a bit broader than it delivers. In particular, some more attention is due to the TFVC and Team Explorer enhancements in Dev12 Preview. I do offer some more detail about them here: msdn.microsoft.com/.../hh994655(v=vs.120).aspx. You can expect me to shine even more light on the cool stuff happening there in the future.
@Matthew: thanks for responding on the TFVC branch question. Stand by while we review the TFBuild comments and questions.
Andy thanks for posting the docs, i reviewed them and I find them quite good but lacking enough detail. The article on customizing the build process (msdn.microsoft.com/.../dd647547(v=vs.120).aspx) mentions "You can run batch and PowerShell scripts before and after MSBuild compiles your code."
Can the article be updated to include several actual real SAMPLE batch and powershell scripts?
Just showing how to copy a file in a SAMPLE batch / powershell script would be enough to get me going and understand how the batch and powershell scripts need to be crafted for the new TFS 2013 build process.
How can I custom the name of label that's created in the build process? Can I somehow automatically update the build quality field based on the results of the test pass or failure in the previous build step? I'm looking at the "Label your source code" section from this doc - msdn.microsoft.com/.../dd647547(v=vs.120).aspx