Is this a bug or something I am doing wrong?

Posted by Brian Gideon on Stack Overflow See other posts from Stack Overflow or by Brian Gideon
Published on 2009-10-08T04:54:54Z Indexed on 2010/06/15 20:02 UTC
Read the original article Hit count: 282

Filed under:
|
|

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?

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

2) 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

3) 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>

4) Now attempt to edit the xaml file by opening a new xml tag via the < character.

5) CRASH!

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

© Stack Overflow or respective owner

Related posts about wpf

Related posts about vb.net