Archive forNovember, 2007

Early Christmas :)

One thing I associate with Christmas time is cherries… not that I buy cherries or anything in particular, but it’s one of the fruits of the season that for some reason remind me it’s that time of the year 😉  This year for the first time ever I actually got a heap of cherries of […]

Click here to read more »

Don’t "p" on your XAttributes..

If you programmatically add attributes with namespaces to an XElement, when the XElement is written out it will give each attribute a namespace prefix and then define a xmlns for that prefix.  The way XElement does this is first it examines the namespaces already active and also those defined in the element for a match. […]

Click here to read more »

Nice recovery…

I was working with Visual Studio and a few other applications, and put the computer to sleep while I took a break. Shortly after I resumed the computer did a hard restart. I presume it is something to did with Vista and the power management, but the nice thing was Visual Studio actually recovered the […]

Click here to read more »

XML namespace prefix ‘xmlns’ is not defined

When working with VB9 you may get this cryptic error :XML namespace prefix ‘xmlns’ is not defined If you are using only default namespaces you can fix this by including a definition for the xmlns as an Import statement or as an xmlns attribute on the XML literal.  But if you are using prefixed namespaces […]

Click here to read more »

Cleaning up your XML literal namespaces

If you use XML literals in your code, adding one to another: Dim e1 = <a:books></a:books>dim e2 = <a:book></a:book>e1.Add(e2)You will have the xmlns declaration repeated in each of the elements, when really it is only needed once per the document or outer element. The problem is caused by VB adding a xmlns declaration as an […]

Click here to read more »

VB samples in VS 2008 SDK ?

Beth posted about the VS 2008 SDK saying it had many VB samples.  When I installed it I didn’t see any in the DSL tools, so I thought there weren’t any at all. turns out there are some VB samples, but no DSL samples as well as others completely missing. This is what is there: […]

Click here to read more »

This month’s Microsoft FU awards…

Despite VB being the *most popular* language on .NET, many teams over at Microsoft like to give VB the finger.  But before I start on this month’s FU awards, a big anti-fu award (aka kudos) goes to Don Box who said :“I’d be an idiot not to walk in their shoes as much as possible“ […]

Click here to read more »

What a nasty compiler bug !!

Kathleen has posted about a real nasty bug in the VB 9 (VB 2008) compiler. And I mean nasty !! The compiler won’t warn you, won’t give an error of any sort.. it will just omit lines of code from your application !  Yep, it will compile as if nothing is wrong, yet it will […]

Click here to read more »

Snippet paths and duplicates in VS 2008

If you install VS 2008 on a machine that has VS 2005 on it, you’ll be prompted to let VS 2008 import as many of your settings from 2005 as possible.  Generally this is a good thing, but you might run into some issues with code snippets as you might have both the 2005 and […]

Click here to read more »

Bug in XML literals around the Imports keywords..

 In VB9, there’s a bug when using XML literals with any type member that is a protected keyword.  For example, given the following psuedo types,   Class Doc   Public Property [Imports]() As List(Of DocImports)End Class Class DocImports   Public Property [Namespace]() As String End Class   The following code won’t compile:   Dim d As New […]

Click here to read more »

Next Page »