Known Issues for Visual Studio 2010 Release Candidate

This post provides information on a few high profile Visual Studio 2010 Release Candidate bugs and some additional information that will help developers have a successful experience with the WPF & Silverlight Designer.

Table of Contents

  1. Known Issues
  2. Application Compatibility
  3. Designer Limitations

Known Issues

Visual Studio crashes when IntelliSense displays

Problem: Users have reported frequent crashes of Visual Studio 2010 Release Candidate when IntelliSense displays.  This can happen in the XAML Editor or Code Editor.

Solution: If you are experiencing crashes please install this Hot Fix: https://code.msdn.microsoft.com/KB980610

Find in Files is very slow when the XAML Editor is open

Problem: Some customers have reported that the Find if Files feature of Visual Studio can by very slow if a XAML Editor document is open and the search is conducted shortly after opening the solution.

Solution: If this bug affects your work, close all Visual Studio documents and then close Visual Studio. Reopen Visual Studio and the solution you were working on. Before opening any documents, perform the Find in Files search.

This bug will be corrected for the final release of Visual Studio 2010.

Implicit Style using BasedOn Disables the Designer

Problem: If you have an implicit Style that uses BaseOn that is located in App.xaml or in a Merged Resource Dictionary that is merged in App.xaml, the WPF & Silverlight Designer will always be in a read-only error state.

Gold Bar Error: InstanceBuilderException was thrown due to a document error: a loop was detected in the property expressions

Error List Error: A loop was detected in the property expressions

Solutions

  • Use full XAML View or edit XAML files with the Source Code (Text Editor) rather than use the Designer.
  • Instead of merging resource dictionaries in App.xaml, merge them in the root Window or root UserControl as below.  The below solution while less than ideal, will enable using the Designer along with BaseOn styles in Resource Dictionaries.

Dictionary1.xaml content – note BaseOn Style

 <ResourceDictionary xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Background" Value="Green" />
        <Setter Property="Foreground" Value="Yellow" />
    </Style>

</ResourceDictionary>

MainWindow.xaml – note Dictionary1.xaml was merged here, rather than App.xaml.

 <Window x:Class="MainWindow"
    xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525" xmlns:my="clr-namespace:WpfApplication1">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Dictionary1.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        
        <TextBlock Text="Hello" />
        
    </Grid>
</Window>

Application Compatibility

Silverlight Support for Visual Studio 2010 Release Candidate

Silverlight 3 projects are supported with the Visual Studio 2010 Release Candidate build – however Silverlight 4 projects are not yet supported.

We will be adding Visual Studio 2010 Release Candidate support for Silverlight 4 with the next public Silverlight 4 drop.

If you are doing active Silverlight 4 development today we recommend staying with the Visual Studio 2010 Beta 2 build for now.

Tim Heuer has also blogged about this limitation here.

No Expression Blend Support for .NET 4.0 Projects

Expression Blend does not support for .NET 4.0 projects.  

Visual Studio 2010 Release Candidate customers can use Blend to target .NET 3.5 and SL3, but not .NET 4.0.

Designer Limitations

Custom MarkupExtensions should be located in a separate assembly

Developers writing their own MarkupExtensions should locate them in a separate assembly from the assembly that is consuming them for the best design support.  If located in the same assembly the following error may be displayed:

Error Message:  No constructor for type '[ClassName]' has 0 parameters

Image files with Build Action set to Content work at runtime but not at design time for Silverlight

Usually, Silverlight image files have their Build Action set to Resource.  The Silverlight run-time supports setting the Build Action to Content.  However the Designer will display the following gold bar error:

Error Message:  Project does not support paths relative to the root application directory.

Unhandled design-time exceptions in Converters and DataTemplateSelectors

At design-time, the Designer executes code in Converters and DataTemplateSelectors.  If those classes allow an unhandled exception to bubble up to the Designer, an exception will be displayed in the Designer.

Developers must ensure they code defensively to avoid this design-time problem.