Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

Pitfalls of cancelling a VSIX project template in an IWizard

I’ve been creating a VSIX project template for Visual Studio over the last week or two. The project contains an IWizard class implementation to allow the user to define some information for the template.

I have noticed one weird quirk when it comes to cancelling the wizard. The project template is written to disk before the IWizard.RunStarted method is invoked. This raises some questions about how to cancel the wizard process and make the solution (and disk) look like nothing ever happened.

Read More

Unable to preserve pending changes on gated check in

Gated check in with TFS 2010 is a brilliant feature. Unfortunately the “Preserve my pending changes locally” checkbox is sometimes disabled and it isn’t clear from the UI why this is the case.image

There is an MSDN forum thread (here) that provides some reasons why this happens. The checkbox will be disabled if there are locks on some of the files in the changeset, the changeset contains binary files or exclusive check-out option is used on the team project.

The one that has been hitting me a lot recently is a docx deployment guide that is disabling this checkbox.

Read More

Neovolve.BuildTaskExecutor 1.0 Released

Over the last week I have posted a series of entries about how to execute custom tasks as part of a build process without TFS. The result of this process is the Neovolve.BuildTaskExecutor 1.0 application which is now available on Codeplex.

The following posts document how BuildTaskExecutor has come about:

You can download Neovolve.BuildTaskExecutor from here.

Enjoy.

Read More

Executing build tasks without a build server – Creating a custom ITask

Following on from the previous posts in this series, this post will look at how to create a custom task that can then be executed via BTE.

This post will provide an example of how to create a task that will allow execution of multiple tasks from a single command line execution. The task itself is fairly meaningless as you can simply invoke BTE several times to get the same result. It does however provide a good example of how to use some of the services provided by BTE.

The first thing to do is create a new library project in Visual Studio. You will then need to add BuildTaskExecutor.exe as a reference. You will also need to add a reference to System.ComponentModel.Composition.dll to get access to MEF.image

Read More

Executing build tasks without a build server – Example scenario

My last few posts have described the process of building an application that can manage custom build tasks without the availability of a full TFS environment (here, here and here). This post will look at how I use this application and all its tasks to manage the product version of a Visual Studio solution. The product I originally wrote BuildTaskExecutor (BTE) for is the .Net port of my old VB6 Switch program which is now hosted out on Codeplex (here).

The build tasks I want to execute when this solution compiles are:

  • Increment the build number of the product version
  • Check out from TFS as required
  • Sync updated product version into wix project
  • Check out from TFS as required
  • Rename wix output to include the product version
Read More

Executing build tasks without a build server – Implementation

My previous post outlines my design requirements for a set of build task actions. I want to execute these tasks for my personal projects that do not have the backing of a fully functional TFS deployment. This post will look at how to implement these requirements using a console application.

Neovolve.BuildTaskExecutor (or BTE) is the application that will execute specific tasks based on command line parameters. It implements MEF for the extensibility support so that additional tasks can be added at any time with zero impact on the application itself.

Read More

Executing build tasks without a build server – Design

At work we run TFS2010 with build controllers, build agents and lab management. I have customised the build workflow so that we can get a lot more functionality out of the automated build process. Some of these customisations are things like:

  • Finding the product version number
  • Incrementing the product version number
  • Updating the build name with the new product version
  • Updating files prior to compilation
  • Updating files after compilation
  • Building Sandcastle documentation
  • Deploying MSIs to remove servers
  • Filtering drop folder output (no source, just build output like configuration files, documentation and MSIs)
Read More

WPF and the link that just won’t click

I’ve been playing with WPF over the last month. It has been great to finally work on a program that is well suited to this technology. One of the implementation details that has surprised me is that the Hyperlink control doesn’t do anything when you click the link.

I can only guess what the design reason is behind this. The only thing the control seems to do is fire off a RequestNavigate event. Every implementation of this control in a form then needs to manually handle this event to fire off the navigation uri. This is obviously going to be duplicated effort as each usage of the hyperlink control will execute the same logic to achieve this outcome.

I have put together the following custom control for my project to suit my purposes.

Read More

Neovolve ReSharper Plugins 2.0 released

It has been a few years since I have updated my ReSharper plugin project that was originally released three years ago. The reason for the project was that ReSharper natively converts CLR types (System.Int32) to its alias (int). StyleCop also adds this support in its ReSharper plugin. Unfortunately nothing in the marketplace provides a conversion from an alias type to its CLR type.

I always prefer the CLR types over the alias type names. This allows me to easily identify what is a C# keyword and what is a type reference.

The original 1.0 (and subsequent 1.1) version provided the ability to switch between C# alias types and their CLR type equivalents using ReSharper’s code cleanup profile support. This version adds code inspection and QuickFix support. It also adds better support for type conversions in xmldoc comments.

Read More