Speaking at TechEd Europe 2014!

by Donovan Brown 20. August 2014 04:12

I am so excited to be speaking at TechEd Europe 2014.  Come check out the following sessions:

DEV-B310 A Practical View of Release Management for Visual Studio 2013
Breakout
Primary Speaker(s): Claude Remillard, Donovan Brown
Speaker Assistant(s):
Proposed Speaker(s:)
This session demos using Desired State Configuration (DSC) with Release Management for Visual Studio 2013 to tackle real-world deployment challenges. We start by presenting an overview of the key concepts, architecture, and configuration of the various components. We discuss the out-of-the box deployment actions available to compose automations for common deployment scenarios and how to use extensibility to cover the not-so-common scenarios. In more detail, we discuss adding custom DSC resources, how to trigger release as part of a build and how to leverage logs to diagnose failed releases. These are presented through specific scenarios encountered in the field.

DEV-B333 Cross-Platform Continuous Delivery with Release Management for Visual Studio 2013
Breakout
Primary Speaker(s): Donovan Brown
Speaker Assistant(s):
Proposed Speaker(s:)
With Release Management you can achieve true continuous delivery on any platform. This session demos how to use Release Management for continuous delivery in Cross-Platform environments including Windows and Linux.  We will cover how to leverage Desired State Configuration (DSC) and Chef integration to create a release pipeline for both Windows and Linux.

Tags: , ,

I can't find PowerShell ISE on Windows 8.1

by Donovan Brown 17. August 2014 19:12

Problem:

I can't seem to find the PowerShell ISE on Windows 8.1.

Solution:

http://trekker.net/archives/where-is-the-powershell-ise-in-windows-8/

Tags: , ,

Work

Getting Test Case Import Utilities for Visual Studio 2012 and Visual Studio 2010 to work with TFS 2013

by Donovan Brown 19. June 2014 21:27

Problem:

Recently we had a customer try and use the Test Case Import Utilities for Visual Studio 2012 and Visual Studio 2010 with TFS 2013 but it would crash.

Solution:

Install Team Explorer 2012 and Update 4 for TFS 2012

Explanation:

So I created a clean Windows 8.1 VM in Azure to see what it takes to get past this error.

First I wanted to duplicate the error so the first thing I did was download the Test Case Import Utilities for Visual Studio 2012 and Visual Studio 2010 from http://tcmimport.codeplex.com/.

Make sure and right click on the zip and select Properties so you can unblock it.

The application starts right up as expected but I can’t load my spreadsheet.  That is to be expected because this is a clean Windows 8.1 and does not have office on it. So I install Office Professional Plus 2013 with SP1. I can now load my spreadsheet but when I click Next the application crashes just as it does for our customer.  Perfect!  I was able to duplicate the issue and now I can fix it.

Step 1. Install Team Explorer 2013 update 2.  Once it was installed I connected to my VSO account to make sure I could connect.  I attempted to use the application with the same results.
Step 2. Install Team Explore 2012.  I could not connect to VSO after just installing Team Explorer 2012.
Step 3. Download Update 4 of TFS 2012. After I installed the Update I could connect to VSO.

Now when I run the Test Case Import Utilities for Visual Studio 2012 and Visual Studio 2010 every works as expected!

Tags: ,

Microsoft Test Manager is not creating IntelliTrace files for my web applications

by Donovan Brown 3. June 2014 19:11

Problem:

When I run my test in MTM the bugs I log don't have IntelliTrace files attached.

Solution:

Run MTM as administrator.  If you don't run MTM as administrator the process will not be able to instrument the code for IIS.

Tags: , ,

Work

Validate code automatically during a Team Foundation Build

by Donovan Brown 3. June 2014 19:03

Problem:

I need to run my Layer Diagram validation during my build.

Solution:

Edit your build definition and under Build process parameters, expand Advanced, and type the following in the MSBuild Arguments parameter:

/p:ValidateArchitecture=true

Tags: , , ,

Work

Increase the reach of Code Lens and Code Map

by Donovan Brown 31. May 2014 01:46

Problem:

My code lens does not see references to properties in my MVC views .cshtml files.

Solution:

Install the Razor Generator extension.

Explanation:

While watching a great deep dive of Code Map by Jean-Marc Prieur he mentioned the Razor Generator as a way to enable features in Code Map and Code Lens.

Install both the Razor Generator Extension and the Razor Generator MVC nuget package.  Once the nuget package is installed you can run the Enable-RazorGenerator command from the Package Manager Console. This will cause the Razor Generator to update all your cshtml files so they use a custom tool installed by the Razor Generator extension.

 

This extension allows processing Razor files at design time instead of runtime, allowing tools like Code Map and Code Lens to walk the code and find the references.

Before:

Code Lens showing only 2 references

After:

 

Code Lens showing 3 references

 

Code Map showing the view

Tags: ,

Work

I can't register the Microsoft Deployment Agent 2013

by Donovan Brown 12. May 2014 05:39

Updated:

With update 2 the deployer account no longer as to be an admin on the machine.  The account simply needs to correct permissions to deploy the desired components.  

Problem:

When I attempt to register my deployer I get a 401 unauthorized error.

 

Solution:

Make sure the account you are using is an Administrator on the deployer machine and added to Release Management on the Server.

Also the account running the installer must have access to the Sql Server on the Release Server machine.

Tags: , , ,

Work

Start and stop Hyper-V VMs from Release Management

by Donovan Brown 6. May 2014 15:40

While preparing my Demo for TechEd North America 2014 on Release Management I ran into a challenge that required me to add additional custom tools. I thought I would blog about one of the tools I decided to add.

One of the goals of my Release Management demo was to deploy to Azure which is an amazing cloud service from Microsoft.  I was able to get the demo to work perfectly from home.  Then I realized that I would not be able to have the network at the George R. Brown Convention Center, where TechEd was being held, to forward port 1000 to my laptop. This would be a requirement so the Microsoft Deployer Agent running on my Azure VM would be able to connect to the Release Management Server on my laptop.

I really wanted to be able to show how you could use a Proxy Deployer to start and stop a virtual machine as part of your deployment.  However, I would have to show this in a way that would not have me rely on the network being configured to forward port 1000 to my laptop.  I got the idea to substitute Hyper-V for Azure.  If I could start and stop a Hyper-V VM as part of my demo the attendees would be able to witness the full workflow with Hyper-V playing the role of Azure for the demo. 

To make this work I was going to have to add a custom tool to Release Management that would be able to start and stop VMs in Hyper-V just like Release Management does out of the box for Azure.  One of the things that makes Release Management such a great tool is how easy it is to extend and add new tools.  All I would have to do is add a custom PowerShell script that can start and stop Hyper-V VMs.

PowerShell was designed for system administration, built on the .NET Framework.  It allows Windows users to control and automate many aspects of Windows.  PowerShell is also a pillar in the foundation of Release Management.  If you can write a PowerShell script to perform any task than that task can be performed during a deployment with Release Management.

Many technologies create PowerShell modules that contain functionality you can use to control the technology.  Hyper-V is no exception. If you have the Hyper-V role enabled on a Windows 8 or Windows Server 2012 machine you have a PowerShell module for Hyper-V you can use to perform all sorts of tasks with Hyper-V.  I used that module to create a PowerShell script I could use to start and stop VMs in Hyper-V.  You can download the script below.

Once I created the script using the Windows PowerShell Integrated Scripting Environment (ISE) it was time to add it to the Release Management tool inventory.  You can add a tool to Release Management using the procedure described below.

  1. Open the Release Management client.
  2. From the Inventory tab select Tools.
  3. Click New and enter the following information:
    • Name: Hyper-V VM Controller
    • Description: Start and Stop Hyper-V VMs
    • Command: powershell
    • Aruguments: -File ./ControlHyperVVM.ps1 -Command ACTION -ComputerName __ComputerName__ -Name __Name__
  4. Click the Add button under the Resources section.
  5. Select all the required files.  This could be an executable and the required assemblies, a batch file or in this case just the PowerShell file.  All the resources are copied to the Deployer Agent when required.
  6. Now click Save & Close.

Once the tool has been added to the Tools Inventory we can add Actions to the Inventory as well.  Release actions define the deployment sequence for each stage of your release.  An Action is defined by the tool and a set of arguments.  We are going to add two actions using the newly added Hyper-V VM Controller tool added above.

  1. Open the Release Management client if not open already.
  2. From the Inventory tab select Actions.
  3. Click new and enter the following information. Note how we change the place holder "ACTION" defined when we added the tool to the actual action we wish to perform.  You will also have to add the Hyper-V category by clicking New next to the Categories drop down.
  4. Add the Start Action
    • Name: Hyper-V VM - Start
    • Description: Start a VM in Hyper-V
    • Categories: Hyper-V
    • Tool: Hyper-V VM Controller
    • Arguments: -File ./controlHyperVVM.ps1 -Command Start -ComputerName __ComputerName__ -Name __Name__
  5. Add the Stop Action
    • Name: Hyper-V VM - Stop
    • Description: Stop a VM in Hyper-V
    • Categories: Hyper-V
    • Tool: Hyper-V VM Controller
    • Arguments: -File ./controlHyperVVM.ps1 -Command Stop -ComputerName __ComputerName__ -Name __Name__

With the tool and actions added you can now create a release sequence using these actions to start and stop a Hyper-V VM.

ControlHyperVVM.ps1 (3.18 kb)

Tags: , , ,

Work

Stop and deallocate an Azure VM from Release Management

by Donovan Brown 1. May 2014 03:12

Problem:

While trying to start an Azure VM from Release Management I get the following error:

"ERROR: Windows Azure PowerShell Cmdlets is not installed."

Even though I followed all of the instructions here.

Solution:

There are actually two solutions.  First is update the "PSModulePath" environment variable by removing the "Azure\" from the "C:\Program Files (x86)\Microsoft SDKs\Windows Azure\PowerShell\Azure\" portion.  It appears that the ControlAzureVM.ps1 file that ships with Release Management Update 2 RC appends the "Azure\" itself. If it is already in the path it will fail.  I am not sure if the latest Azure SDK has change this value or not.

I decided not to modify the environment variable for fear that it might break other parts of the Azure SDK.  So I took this opportunity to write my own ControlAzureVM.ps1 file that honors the environment variable as it is set by the SDK.  I also decided to enhance the script to not only support Start and Stop but to also support Shutdown of a VM.  Stopping a VM will place it in the Stopped state.  Unfortunately this means you are still being charged compute hours for that VM.  Only Azure VMs in the Stopped (Deallocated) state are free.  Therefore, I added a new Action for Shutdown that will deallocate your VM as well.  You can download the PowerShell file below.

Simply add the PowerShell script as a new tool.  Copy all of the values for the settings from the out of the box Azure tool.

Then added three new Actions. One for Start, Stop and Shutdown using the new tool. Noticed the "ACTION" place holder of the tool is replaced in each action.

ControlAzureVM.ps1 (6.05 kb)

Tags: , ,

Work

How to build a SQL Server 2012 Integration Service Project with TFS 2013

by Donovan Brown 30. April 2014 01:50

I simply downloaded the ReleaseDefaultTemplate11.1.xaml and followed my own directions from here and replaced .vdproj with .dtproj.


TFS2013 Release Management Default Template ReleaseDefaultTemplate.11.2.xaml (107.45 kb)

Tags: ,

Work

About the author

My name is Donovan Brown and I am a Technology Specialist for DevTools with Microsoft with a background in application development.  I also run one of the Nation’s fastest growing online registration sites for motorsports events DLBRacing.com.  When I am not writing software I race cars for fun.  DLBRacing.com has given me the opportunity to combine my two passions writing software and racing cars.

AdSense

Month List

AdSense