Speaking at TechEd Europe 2014!

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 BreakoutPrimary Speaker(s): Claude Remillard, Donovan BrownSpeaker 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 BreakoutPrimary Speaker(s): Donovan BrownSpeaker 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.

Increase the reach of Code Lens and Code Map

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

I can't register the Microsoft Deployment Agent 2013

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.

Start and stop Hyper-V VMs from Release Management

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. Open the Release Management client. From the Inventory tab select Tools. 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__ Click the Add button under the Resources section. 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. 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. Open the Release Management client if not open already. From the Inventory tab select Actions. 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. 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__ 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)

Stop and deallocate an Azure VM from Release Management

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)

Can't deploy Through Release Management Server over HTTP(S)

Problem: Configuring the “Drop Location Access” as “Through Release Management Server over HTTP(S)” with Release Management I get the following error:“Message: Could not load file or assembly 'Newtonsoft.Json, Version=, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies.” Solution: Copy Newtonsoft.Json.4.5.1, net40 into the bin folder of Release Management “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\bin”. To get a copy of the correct version of newtonsoft.json I created a class library project in Visual Studio and issued this command from the package manager console:“Install-Package Newtonsoft.Json -Version 4.5.1” Then I copied the file from the packages folder “Newtonsoft.Json.4.5.1\lib\net40”.