views:

36

answers:

1

I am starting to learn WPF and I grabbed the Family.Show project as a real-world example to help me learn. It's got a pretty good UI, and some cool animations in the main panel for the family tree -- I'd love to see how they did it.

So I downloaded the source code (http://familyshow.codeplex.com/releases/view/23637#DownloadId=59428), opened the solution for 3.0 in VS2010 Professional, let it do the conversion ... tried to open MainWindow.xaml and then got:

Error   1   Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Microsoft.FamilyShow' that is not included in the assembly. C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   7   15  FamilyShow
Error   2   The type 'local:DiagramViewer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   118 12  FamilyShow
Error   3   The type 'local:Details' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.   C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   128 10  FamilyShow
Error   4   The type 'local:NewUserControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   133 8   FamilyShow
Error   5   The type 'local:Welcome' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.   C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   136 8   FamilyShow
Error   6   The type 'local:PersonInfo' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   139 8   FamilyShow
Error   7   The type 'local:FamilyData' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.    C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   142 8   FamilyShow
Error   8   The type 'local:OldVersionMessage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Users\nloding\Documents\Visual Studio 2010\Projects\Family.Show-3.0\FamilyShow\MainWindow.xaml   143 8   FamilyShow

The designer shows nothing. I've verified that the reference to the FamilyShowLib project is there -- I even built the DLL and added it to the main project. This resolved some other minor errors, but that's it. I also had to re-add the references to PresentationCore, PresentationFramework, and WindowsBase. Now I'm just stuck with the above.

So I Googled it and found references to the fact that the XAML designer in the VS doesn't work. This seems odd, but maybe that's the issue.

How do I get this working so I can actually learn WPF?!?!?

A: 

I'm not sure what you found through Google, but the VS 2010 XAML designer does work. The error you're getting indicates that you're missing a reference to an assembly that contains the Microsoft.FamilyShow namespace.

Check your References folder to ensure that none of the references listed have a yellow bang next to them, indicating a missing assembly. You may also need to build the project before you attempt to view the designer.

UPDATE:

I downloaded the project and did the conversion to VS 2010. I had to manually set the Familylib project to compile to .NET 3.0 (right-click the project, open Properties) due to some build warnings. The projects then built without error and I was able to view the MainWindow.xaml in the designer.

Dave Swersky
There was no assembly for Microsoft.FamilyShow -- it was the namespace used in the code-behind for the XAML file. That's what started my confusion, but I never did hit "Build" ... after I did that, it works just fine. Very interesting.
Nathan Loding
The Microsoft.FamilyShow namespace is defined in the Familylib project/assembly. The assembly doesn't exist until you build, hence the error.
Dave Swersky