views:

438

answers:

1

I just installed Visual Studio 2010 and converted one of my Visual Studio 2008 WPF projects over for testing. While the project builds and runs correctly, the VS Designer cannot handle the custom namespace mappings I have giving the error:

Assembly must be specified for XAML files that are not part of a project. Reopen this XAML file after adding it to a project, close this file and reopen it using the project it is associated with, or modify the clr-namespace to include the name of the assembly.

The namespaces in question are part of the project. Visual Studio 2008 had no problems with the XAML. So I created a new blank WPF project called Test1 with the namespace being Test1. I then edited the generated MainWindow.xaml to add a single mapping for local:

<Window x:Class="Test1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Test1"
    Title="MainWindow" Height="350" Width="525">
    <Grid />
</Window>

This gives the same error. And, amazingly, Google reports no results for the error! I tried a few variations such as appending ;assembly= or ;assembly=Test1, but that did not help.

Can anyone spot what I'm doing wrong? If nothing, I'd greatly appreciate suggestions for why this may be failing.

Edit: As per the comments, it turns out that this only occurs when the project is opened from a networked share. It does not occur if the project is opened on a local drive. I would like, however, to be able to open it on the network share so I'm going to leave the question open.

A: 

Dear Greg

I’ve had the same problem but I found using a mapped drive letter instead of the UNC path works for me.

Regards

Neil Allen

Neil Allen