Posts in category .net - page 23

Switching from Boot Camp to Parallels

A few weeks ago I managed to screw up my Windows XP installation on my MacBook using some low-level tools and driver related stuff.

I’d already run out of space on the 30GB partition I’d allocated, I was missing the OS X side and not running any 3D applications so I took the plunge to remove the partition entirely and switch over to using the Parallels VM product I’d purchase instead.

Installation was a breeze and I soon had a clean XP install with Visual Studio 2005, SQL Server 2005, .NET Reflector, IE7 and a bunch of other useful tools for work operational again.

Whilst the speed isn’t as nippy as the raw Boot Camp option was it’s fast enough – certainly faster than the Pentium 4 box my client provided for development although having 2GB of RAM certainly helps.

With XP just running the dev tools this meant I could access my iTunes library on OS X whilst I work and get back to using Colloquay and Adium.

Safari crashes every time I try to blog post even though it doesn’t even try to support HTML editing abilities so Firefox and Camino are my staple on the Mac side.

I use a dual-monitor configuration during the day and Parallels works like a breeze with OS X on one display and Windows on the other. The mouse just glides between the two seamlessly – no clicking in/out or awkward keys to press to jump between the two although Parallels did need to be manually told what the resolution was.

It seems I’m not alone in choosing this set-up.

All Parallels need to do now is to enable the virtual machine to utilize multiple cores and 3D acceleration and it would be perfect.

Well, switching over to a Core 2 powered MacBook Pro with 4-8GB of RAM might be perfection… and a bigger hard-disk…

[)amien

.NET quick samples: Up-times, ages, rounding to n places

Just a few quick .NET samples for performing some common tasks that the .NET Framework doesn’t do for you:

System uptime

using System.Diagnostics;

public TimeSpan GetUptime() {
    var systemUpTime = new PerformanceCounter("System", "System Up Time");
    systemUpTime.NextValue(); // Required to work!
    return TimeSpan.FromSeconds(systemUpTime.NextValue())));
}

Calculating age

public int GetAge(DateTime birthday) { 
    int years = DateTime.Now.Year - birthday.Year;
    return (birthday.DayOfYear >= DateTime.Now.DayOfYear) ? years : years - 1;
}

Rounding to n decimal places

public decimal ArithmeticRound(decimal d, int decimals) {
    var power = (decimal)Math.Pow(10, decimals);
    return (decimal.Floor((Math.Abs(d) * power) + 0.4m) / power) * Math.Sign(d);
}

[)amien

AnkhSVN & TortoiseSVN

DamienG joins AnkhSVN team!

I’m proud to announce that I’ve joined the AnkhSVN team, albeit in a rather minor capacity.

For the last few weeks I’ve been working on a set of new icons to add a bit of sparkle to the user interface for the forthcoming AnkhSVN 1.0 release. There is a good chance they will make the next release candidate that’s on it’s way to address some issues with delete/remove functionality.

A couple of nights ago I checked in the current icon set as it stands although there is a little more work left to do. Specifically there are a couple more commands buried in the Repository and Working Copy Explorers.

Maid, spray, sparkle-folder and glowing t-shirt iconsOnce 1.0 goes gold I’ll post a couple of screen-shots and icons here. In the mean time here are a few of the rejects including my 16×12 pixel French maid. Yes, they’re Firefox style and not XP/Visual Studio style, sorry.

TortoiseSVN ignore patterns

Occasionally you may use TortoiseSVN against projects and find it trying to add all sorts of junk to your repository. This is where the global ignore pattern list fits in and rather than loose mine again I’ll post it here for future reference although it is applicable to more than just the Tortoise…

*/bin */obj */Release */Debug *.suo *.err *.log *.obj *.bin *.dll *.exe *.LOG *.user *.pdb [tT]emp [tT]empPE Ankh.Load thumbs.db

[)amien

Visual Studio 2005 Service Pack 1 Beta experiences

Like most people I’ve run into my fair share of oddities and problems in Visual Studio 2005 including the dreaded VB compiler dying a death on reasonable-sized projects so I jumped at the chance to get my hands on the beta of SP1.

There are several versions of the service pack including one for Visual Studio 2005, one for each of the Express editions and one for the Team Foundation Server. My experiences here are with the 350MB SP1 beta for Visual Studio 2005.

Installer

The first major gripe is with the installer itself. It’s slow, it needs 2.5GB of free space to apply the SP and it doesn’t tell you to uninstall Web Application Projects until several minutes in so make sure you:

  1. Don’t need to use Visual Studio 2005 for about 25 minutes
  2. Have uninstalled Web Application Projects (you can keep Web Deployment Projects tho)
  3. Have over 2.5GB of free space once the installer is on your system

If you’re short of disk space you could try turning on the Compress contents option on c:\windows\installer if you don’t mind waiting a little longer.

What’s New?

Web Application Projects are now built in!

What’s Fixed?

The list of fixes is quite comprehensive although many of the KB articles state ‘Info Not Yet Available’. It also includes all the previous hot-fixes to VS2005 (many of which are available on request only).

There are some interesting ones regarding performance of large C++ and VB.NET projects/solutions.

Interested?

If you feel like giving it a shot head over to to MS Connect and grab it but be quick, the beta ends October 31st. The beta is available in English and Japanese only.

[)amien