Archive for May, 2010

Ever get this exception in a C# program?


 

This post is a bit of a tip on how to solve the following Exception. It does rely on the Code Analysis feature new in Visual Studio 2010.

clip_image002

Well here are a couple of tips to determine just where in the format string the error is:

  1. Rebuild the project with Code Analysis (menu Project -> <<Project name>> Properties).
    • clip_image004 is the option which need to be switched on.
    • Rebuild
    • Check the Errors Window: clip_image006
    • Which is all well and good but, where on earth is 3208 in the string?
  2. Debug the project.
    • Break on where the string is being used (not necessary but helps me keep my mind on what I’m trying to do)
    • Quick watch the string variable.
    • The Do a substring of the string to show the segment which has the error in it.
    •  clip_image008
  3. Correct the error (need “{{“and “}}” in the format string for the single braces in the input string.

Technorati Tags: ,,,,,,,,,,,,,,,,,

Windows Live Tags: exception,Code,Analysis,Visual,Studio,error,Rebuild,menu,Project,Properties,option,Check,Errors,Debug,Break,Quick,segment,Correct

WordPress Tags: exception,Code,Analysis,Visual,Studio,error,Rebuild,menu,Project,Properties,option,Check,Errors,Debug,Break,Quick,segment,Correct

,

Leave a comment

Upgrading from 32bit to 64bit Windows 7


Introduction

This post continues the saga of the installation Windows 7 (previous post The start of the saga)

Problem 1 Resolved – Sort Of

I’ve finally got the machine to boot from the DVD – the 64 bit one at that!

Solution

Hit F2 when the BIOS is loading (the first thing after a reboot). Change the sequence that the machine was looking for bootable devices. The original settings had the hard drive before the DVD. What was needed was the DVD before the hard drive.

Conclusion

  1. I was on the right track to start with, but fell down a “trap for young players”. I should have been smarter (but then again, it is the first time I’ve done this, so I’ll let myself off – just this once).
  2. Waiting for the next “issue” to be fixed". At present it is quite happily “Expanding Windows Files” (I hope it does not jamb up like it did in the Vista upgrade).

, ,

Leave a comment

Upgrading From Windows 7 32bit to 64bit


Introduction

I come to an impasse with my 32 bit Windows 7 some of the software I’d like to be running at home (for experimentation purposes) is now 64 bit (SQL Server Analysis Services, SharePoint 2010 being the main 2), So I’ve decided it’s time to bit the bite the bullet and make the upgrade.

The Pre-Upgrade Steps

Before making this upgrade, I’ve purchased a new Dell Netbook. I’ve no desire to be half way through the upgrade an have to look something up on the internet, or need to download something, and not have working machine.

I’ve made backups of everything which is on the machine.

The Upgrade

  • Inset the Windows 7 Upgrade DVD (64bit),
  • Reboot
  • Boots normally – does not boot from the DVD
  • Insert the Windows 7 Upgrade DVD (32 bit) – Maybe I need to start in 32bit mode and then swap to 64bit.
  • Reboot
  • Boots Normally – does not boot from the DVD (again)
  • Start the 32 Bit Setup from the DVD. – Result Problem 1

Problem 1

DiskDriveError

Answer

Go and Google and see what someone else nay have had to say about this error.

Problem 2

AnswerError

Just my luck! Microsoft decide to do an upgrade just when I do. Well I’ll have to wait for the answer to this one.

Stay tuned to the next exciting episodes of this saga.

, ,

Leave a comment

%d bloggers like this: