An xUnit.net Assert.Throws() Code Snippet

Tuesday, June 24th, 2008

I was mucking around with code snippets over the weekend - it killed the time in between feeling sick. As my unit testing framework of choice is XUnit I thought I've have a go at adding a snippet or two around that. xUnit already comes with a nice code snippet for ...

Visual Studio Startup Script

Sunday, June 22nd, 2008

Given that occasionally I'm prone to playing the odd game on my home computer I didn't want a lot of the services that are only used for development running all the time. Solution... use the Services tab in the Computer Management console and configure them to start manually. Then use ...

#region around implemented interfaces and code smell

Friday, April 18th, 2008

Some (not so) random surfing got me to this... How to get rid of the auto-generated #region for implemented interfaces - Daniel Cazzulino's Blog There's a setting in VS that allows you to turn off the #region generation when using VS's implement interface feature (ALT-SHIFT-F10). 99% of the time ...

Gotchas: SN.EXE problem on Vista fixed in VS 2008!

Tuesday, March 18th, 2008

Back in September I ran into some issues using SN.EXE on Vista. SN would look like it had added a strong name verification skipping entry when really it hadn't. Doing the SN -Vr *,######### with the SN.EXE tool that ships with Visual Studio 2008 gives a much better behavior.   ...

PHP and Visual Studio

Wednesday, March 12th, 2008

Recently I've been making some changes to some WordPress templates written in PHP. How did I edit my PHP files? Turns out that David Cumps has added coloring support for PHP Visual Studio 2008! Notepad2 also supports PHP coloring but doesn't copy/paste into LiveWriter with the coloring and doesn't allow you ...

Delay Signing VSTO Add-In Projects

Tuesday, March 4th, 2008

As promised, another post on actually writing code as I've been busy trying the help the p&p DocTools project out the door. One of the final hurdles was getting the VSTO Word Document Add-In use delay signing. I was missing a key step in this process... Build ...

Gotchas: Fusion Log Viewer, your best friend for assembly load errors

Wednesday, January 23rd, 2008

Fusion is Microsoft's name for the technology that resolves and loads assemblies requested by your application. It turns out that the .NET framework comes with a little application that allows you to see what caused each assembly in your application to get loaded, how it was loaded (context) and where ...

Continuous Integration in Visual Studio 2008

Tuesday, January 8th, 2008

Martin Woodward has a PowerPoint deck available on his blog. This covers the new features of Visual Studio team System 2008 with lots of information on the "Visual Studio 2008 Team Foundation Server Build" feature. I've not had a chance to try out the new Team Build features for CI ...

Gotchas: Upgrading your unit test projects to VS 2008

Monday, January 7th, 2008

Consider the following test... [TestMethod] [ExpectedException(typeof(ArgumentException))] public void TestExpectedException() { throw new ArgumentException("Bad argument"); } All looks pretty trivial right? You'd expect this to pass and indeed on my VS 2008 box it works fine. If you've upgraded your test project ...

Gotchas: MSTest AppDomain changes in VS 2008

Friday, January 4th, 2008

Here's something we at p&p ran into the other day while moving some of our unit tests from Visual Studio 2005 to 2008. This was actually on the EntLib forum and a bug logged by the community against the issue with the MSTest team. Unfortunately it didn't get fixed but ...