Development

roger's picture

Symbol Store: How are EXE files stored?

If you're using the Microsoft Symbol Server to pull down symbols for Windows, or if you're using SYMSTORE.EXE for your own stuff, you'll see that EXE (and other binary files) are stored in a path similar to C:\WebSymbols\user32.dll\4226015990000\user32.dll.

Where did the magic number come from?

roger's picture

Source Server indexing fails with "SVN: Can't Get details for <sourcefile>"

I'm making some improvements to our build scripts at work, and I ran into a problem where Source Server indexing wasn't working.

roger's picture

LINQ's ForEach doesn't work on IEnumerable<T>

For some reason, LINQ's ForEach extension method doesn't work on IEnumerable<T>; it only works on IList<T>. Easy fix:

public static class EnumerableExtensions
{
    public static void ForEach<T>(this IEnumerable<T> values, Action<T> action)
    {
        foreach (var value in values)
        {
            action(value);
        }
    }
}
roger's picture

"Internet Explorer cannot display the webpage" when using Cassini on Windows Vista

I was doing some ASP.NET MVC this weekend, and I couldn't get the project to start: all I got was "Internet Explorer cannot display the webpage", when using Visual Studio's built-in development web server (Cassini).

I think it's because Cassini doesn't support IPv6, and on Vista, "localhost" refers to the IPv6 address ::1, rather than the IPv4 address 127.0.0.1.

If you use http://127.0.0.1:12345/Home/, then it works fine.

To resolve this, you can go to the project settings and set the Start URL explicitly.

roger's picture

Note to self: Don't call a .NET console project Something.Console

...because then you can't (easily) use Console.Write, because "Console" clashes.

roger's picture

Getting IntelliSense to work for NHibernate mapping files (.hbm.xml)

Getting IntelliSense to work for NHibernate mapping files (.hbm.xml)

You'll need to copy the XSD files from C:\Program Files\NHibernate\src\NHibernate-src\src\NHibernate to C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas.

roger's picture

Using SQL Server Compact Edition for Unit Testing

Using SQL Server Compact Edition for Unit Testing

Ayende shows how to use SQLite with an in-memory database for unit testing your NHibernate code (here). This is a great idea: your unit tests will run more quickly, and you don't have to worry about tearing the database down when you've finished.

roger's picture

<define> task for NAnt

Essentially, you write a new task like this:

<define name="echo3">
  <echo message="${this.message}"/>
  <echo message="${this.message}"/>
  <echo message="${this.message}"/>
</define>

...and then you call it like this:

<echo3 message="Hello World"/>

Any parameter passed to the defined task is available as this.foo inside the defined task. I've found it useful when you don't want to write a task in C#, perhaps because all you're doing is calling a bunch of other NAnt tasks.

roger's picture

Tweaking TeamCity

I just started using TeamCity Professional Edition for some personal projects (and we're evaluating the Enterprise edition for use at work).

roger's picture

Roger's ReSharper Live Templates

ReSharper allows you to define "Live Templates". They're like Visual Studio snippets, but much more useful. So that I don't lose mine, I'm going to stash them here.

Syndicate content