Set assembly and app version to a matching build name in TFS 2015 or VSO Build.VNext

One of the most common customizations in TFS XAML build templates was to automatically update the assembly version number. This can also be done in build vNext using a small power shell script. I also added the option to apply … Continue reading Set assembly and app version to a matching build name in TFS 2015 or VSO Build.VNext

Trigger a vNext Release from build in TFS 2013/2015 on premise

I always had a lot of problems triggering a release from a build (Vnext or Xaml) on premise if I work with agentless deployments. In the cloud this works like a charm – but on premise it never worked for me. I tried it with the blog post on msdn – but no success. Today I started to use Fiddler to monitor the api calls that the Release Management Client makes. (BTW: I know now, why the app is so slow if you have limited network bandwidth. The client is really chatty!). With Fiddler and the Invoke-RestMethod commandlet its quite … Continue reading Trigger a vNext Release from build in TFS 2013/2015 on premise

Be careful with custom variable names in Release Management

If you use Visual Studio Release Management vNext / 2013 with PowerShell/DSC you probably have a lot of custom configuration variables that you pass to your scripts. Be careful when you choose the names for these variables because! There are a lot of reserved words. For example the word UserName is reserved. This leads to very odd error messages that are really hard to track down: System.AggregateException: One or more errors occurred. —> Microsoft.TeamFoundation.Release.Common.Helpers.OperationFailedException: Permission denied while trying to connect to the target machine <hostname> on the port:5985 via power shell remoting. Please check the following link for instructions: http://go.microsoft.com/fwlink/?LinkID=390236System.Management.Automation.Remoting.PSRemotingTransportException: … Continue reading Be careful with custom variable names in Release Management

Moving from PowerShell DSC to Release Management vNext DSC

If you’ve learned plain PowerShell Desired State Configuration (DSC) and then move to Visual Studio Release Management vNext there are a lot of gotchas that can cost you many hours or event days to figure them out. I thought I share some things I’ve learned the hard way to get people up and running more quickly. If you use plain DSC you normally have one structural configuration for the entire environment and an environment specific configuration that you change for each environment. Environment Configuration(Dev/Test/Prod) $TargetFolder = “C:\inetpub\wwwroot\Demo”$WebServerCount = 2 .psd1 Structural Configuration WindowsFeature IIS{    Name = “Web Server”    Ensure = … Continue reading Moving from PowerShell DSC to Release Management vNext DSC

Packaging DSC configurations for Visual Studio / TFS Release Management vNext

If you are using Visual Studio Release Management vNext to release your applications you’ll probably have DSC (Desired State Configuration) configurations that are shared between applications or provided by your operations team. In both cases they have a different lifecycle than your application and should be provisioned individually. But how do you publish PowerShell scripts or other files with the TFS build engine without creating empty solutions and adding the files? What you can do is to add a simple project file like TFSBuild.proj that calls a PowerShell script. This project file can be used in a team build. The … Continue reading Packaging DSC configurations for Visual Studio / TFS Release Management vNext