views:

196

answers:

1

I cannot imagine how this is anything other than a bug, but since I do not currently have a login for the MS Connect website I will ask here first.

I have Visual Studio 2008 SP 1 with all post SP1 hotfixes I could find relating to the crash installed. Can you reproduce the following crash?

  • Create a new "WPF Application" project using VB as the language (though I suspect it will happen in C# as well).

  • Enter the following code in the Window1.xaml.vb file.

Friend MustInherit Class A

End Class

Friend MustInherit Class A(Of T)
    Inherits A

End Class
  • Add a namespace declaration the Window1.xaml file so that it looks like the following.
<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WpfApplication1"
    Title="Window1" Height="300" Width="300">
    <Grid>
    </Grid>
</Window>
  • Now attempt to edit the xaml file by opening a new xml tag via the < character.

  • CRASH!

Edit: Microsoft has confirmed this bug. The issue still exists in VS2010 beta 2, but will be fixed in the next release.

+1  A: 

I was able to reproduce this by following your instructions, so I'd say a bug exists.

More information on my setup:

  • Windows 7 Ultimate
  • Visual Studio Team System 2008 (Version 9.0.30729.1 SP)

I wasn't able to reproduce this using C#, only VB.NET.

Ryan Versaw
Thanks for confirming. This was a particularly difficult bug to figure out. It took me about 4 hours to troubleshoot it and find the minimal steps necessary to reproduce. I never thought having two classes with the same name would be the culprit. I also could not reproduce this with C#.
Brian Gideon
If you want to make this example as concise as possible, you can also leave out `Friend MustInherit` from your class definitions.
Ryan Versaw