Running Batch Files on Visual Studio 2010 Project Items

Sunday, June 26th, 2011

This is something I wrote as an answer on StackOverflow. I dug it out again the other day as I needed it for something else. I have a horrible memory and my blog is essentially just a glorified indexing system for it. Ade’s brain is now, like everything else indexed ...

Gotchas: Assembly Level Attributes in F#

Wednesday, October 13th, 2010

This is something I discovered ages ago and should have been in my original Gotchas: Common Traps for the F# n00b post. I figured out how to add assembly level attributes to one of my F# assemblies but forgot to include it in the post. The gotcha is ...

Gotchas: The Profiler Uses Processor Resources Too!

Wednesday, July 14th, 2010

I was doing some work on the Parallel Programming with Microsoft .NET book yesterday. We’ve added some additional content to Appendix B to show some of the “visual patterns” that can tell you what’s wrong with your parallel code. Here’s one of those patterns… The image on the left ...

Gotchas: Common Traps for the F# n00b

Sunday, January 3rd, 2010

I spent a bunch of time over the holidays getting to know F# a bit better. I think I now consider myself to be truly dangerous with it. A couple of things which repeatedly bit me as I stumbled through learning F# as a n00b.

Gotchas: Adding Attributes to Properties on Interfaces in F#

Tuesday, September 15th, 2009

I ran into a couple of issues when writing an F# class to be consumed by C#. Specifically when it came to adding attributes to a property declared on an interface. You would expect the following code to decorate the SofteningLength property with the Dependency and DefaultValue attributes: ...

Gotchas: MSBuild Conditional Import Ignored by Visual Studio

Thursday, September 3rd, 2009

Here’s nasty little quirk of MSBuild and Visual Studio which took me some time to solve last night… I have a C# project file which has been modified to import a custom .targets file. This targets file in turn imports some settings (property and item groups) using the following ...

Gotchas: Getting C++ Projects Building on a CI Server

Friday, May 1st, 2009

The other day I added a VC++ project to my main solution file and all hell broke loose on the TeamCity CI server. Errors like this started appearing. D:\TeamCity\buildAgent\work\71a700fe606e0795\trunk\NBody.sln error MSB3411: Could not load the Visual C++ component "VCBuild.exe". If the component is not installed, either ...

Gotchas: Debugging WPF Data Binding

Thursday, December 18th, 2008

I've been playing around with WPF data binding recently and was struggling a bit with how to debug it when things weren't working right. Translation: cursing a lot when everything was hawked and I couldn't figure out why. Suppose I have the following binding that doesn't work the way I expect. ...

A Combined Module Enumerator For The Prism Bootstrapper

Thursday, December 4th, 2008

I ran into the following issue with p&p's Composite WPF guidance (Prism). Prism allows you to configure your application with multiple modules. These can either be statically referenced or dynamically discovered at runtime In my scenario I have two assemblies each containing a module; assembly A and assembly B, containing ...

Composite Application Guidance for WPF with EntLib 4.1

Tuesday, November 18th, 2008

I've been working on an application that uses Composite Application Guidance for WPF (Prism) and wanted to upgrade to use Enterprise Library 4.1 rather than the 4.0 version that Prism originally shipped against. Turns out updating this is pretty straightforward (but not trivial)...