SQL Server Data Tools – September 2013 update
Microsoft has released the September 2013 update for SQL Server Data Tools (SSDT). It contains a fix for the schema compare when working with large display text or high DPI.
Visual Studio 2012 Update 4 RC3
Visual Studio 2012 Update 4 RC3 is out. You can downloaded from
http://www.microsoft.com/en-us/download/details.aspx?id=40263
Check out this link for the update description
http://support.microsoft.com/kb/2872520/en-us
Install instructions
- Visual Studio
- VS2012.4 RC.exe
- Team Foundation Server (Choose either Web Installer or ISO Image)
- Web Installer: tfs_server.exe
- ISO Image: VS2012.4 RC TFS Server ENU.iso
- Team Foundation Server Express (Choose either Web Installer or ISO Image)
- Web Installer: tfs_express.exe
- ISO Image: VS2012.4 RC TFS Express enu.iso
- Visual C++ Redistributable (Choose architecture: x86, x64, arm)
- vcredist_x86.exe
- vcredist_x64.exe
- vcredist_arm.exe
VS2012: No code coverage colouring
Today I had an issue that I couldn’t get the colouring of code coverage to work even when pressing the “show code coloring” button.
I am using VS2012.2 Ultimate which was upgraded from VS2012.2 Professional.
To fix the problem, I had to reset VS with the following command
devenv /resetuserdata
Issue was reported in the Connect page
IntelliTrace Session’s Slide Deck at DevTeach Mini (HOC)
TFS2012: Schedule a One Time Team Build–Approach 1
In response to the questions asked on MSDN social, I am writing this blog post. The question was “How to schedule a one off build”. I also posted an alternative approach here
Introduction
When creating a scheduled build, you need to specify the the day of week and time.
But what if you only want to schedule it to run once? That scenario is not supported by TFS out of the box.
Solution
One of the solutions I am proposing in this post is to create a scheduled build definition and a custom activity to reset the build definition trigger to manual when the build is complete. The limitation for this approach is you can’t specify a date (e.g. 22/1/2013). In other words, you can only schedule it for the next 7 days.
I am using TFS2012 and Visual Studio 2012 for this solution. You can still use the same steps for TFS 2010.
Creating Build Activity
Create new project of type Activity Library and name it TeamBuildActivities
Delete Activity1.xaml
Add new item of type Code Activity and name it SetTeamBuildDefinitionTriggerToManual
Add a reference to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Build.Client.dll
Paste the following code in the SetTeamBuildDefinitionTriggerToManual .cs file
using System.Activities; using System.ComponentModel; using Microsoft.TeamFoundation.Build.Client; namespace TeamBuildActivities { [BuildActivity(HostEnvironmentOption.All)] public sealed class SetTeamBuildDefinitionTriggerToManual : CodeActivity { [Browsable(true)] [DefaultValue(null)] public InArgument<IBuildDetail> BuildDetail { get; set; } // If your activity returns a value, derive from CodeActivity<TResult> // and return the value from the Execute method. protected override void Execute(CodeActivityContext context) { if (BuildDetail == null) { return; } IBuildDetail buildDetail = context.GetValue(BuildDetail); if (buildDetail == null) { return; } buildDetail.BuildDefinition.TriggerType = DefinitionTriggerType.None; buildDetail.BuildDefinition.Save(); } } }
Save and build the project
Copy the output assembly TeamBuildActivities.dll to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies
Create a build definition
Create your build definition with a scheduled trigger
On the process, click show detail and then the new button
You should rename the New file name, I am keeping the default name in this example
Click OK
Open the Source Control Window
Right click on the new build process template and get latest
Double click on the new build process template to open
Open the Toolbox window
Create a new Tab and call it Custom Activities
Right click on the custom activity area and select Choose Items
Make sure that System.Activities Components Tab is selected
Click on the browse button
Go to the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies folder and select the TeamBuildActivities.dll and click OK
Drag and drop the activity at the end of the workflow
Type in the BuildDetail argument into the BuildDetail property grid
Save workflow template and then check it in
Create new Folder in TFS Source Control for Build Activities
Go to the Source Control Windows
Create new folder, I am naming it TeamBuildAssemblies
Open the local folder and copy TeamBuildActivities.dll to it
Go back to source control
Right click on the folder you created and select Add Items to folder
Select TeamBuildActivities.dll from the window
Check in the folder
Point Controller to the TeamBuildAssemblies
At this point, we want the team build to load the custom activity we created to initiate an instance of the SetTeamBuildDefinitionTriggerToManual activity
Click on Actions
Then Manage Build Controllers
Click on Properties
Select the path for the TeamBuildAssembles folder
Click OK
Queue a Build
Lets queue a build to simulate the running of a scheduled build
You may get the following error
TF215106: Access denied. NT AUTHORITY\NETWORK SERVICE needs Edit build definition permissions for build definition TeamBuildActivities in team project MyTeamProject to perform the action
To fix the error you need to give “Edit build definition” permission to the build account
Right click on the team build definition
Select Security
Select Build Service Accounts
Change the value for Edit build definition to allow
SCROLL DOWN AND CLICK SAVE CHANGES. For low resolution screens this may not be so intuitive because the button is hidden
Now queue another build
Edit the build definition and click on the Trigger tab
Notice that it is switched to Manual