none
(Element Name) is not supported in a windows presentation foundation (WPF) project.

    Question

  • Hi all,

    I have a large WPF project with many separated resource files for each custom control in the project. All was fine until a couple of weeks ago when I tried to open up the application in Blend. When I try to open any .XAML file I get an error for each element saying:

    (Element Name) is not supported in a windows presentation foundation (WPF) project.

    This is for every single WPF element throughout the entire project. I don’t know what was changed as a lot of work happened in between openings in Blend.

    We are using a .NET 4 solution in the Any CPU Solution Platform configuration.

    Has anyone experienced this before? Has anyone got a solution?

    Thanks people. I look forward to hearing back from you.

    Adam
    • Edited by Adam Smith Tech Friday, September 10, 2010 8:35 AM Updated title to be more descriptive
    Friday, September 10, 2010 8:15 AM

All replies

  • Hi Adam,

    It seems that an issue about opening a Visual Studio solution in the Blend (4 ?) . I performed a test, it is hard to find the cause without a sample. Could you please share a sample that can reproduce this issue?

    By the way, "(Element Name) is not supported in a windows presentation foundation (WPF) project." It seems you do not add the XML namespace for this XAMl file, please ensure below two namespce in the XAMl file:

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    

    and for Blend 4, you may need below namespaces extra:

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    

    For more about XML namespace in XAMl, please refer to this document: http://msdn.microsoft.com/en-us/library/ms747086.aspx

    Meanwhile, there is a fit for it: Microsoft Expression Forums you could ask Blend related questions there.

    Sincerely,
    Bob Bao

    MSDN Subscriber Support in Forum 

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Are you looking for a typical code sample? Please download all in one code framework !
    Sunday, September 12, 2010 10:47 AM
    Moderator
  • Hi Bob,

    Thanks for your reply. I am not in the office today but I do not think I will be able to reproduce this issue. I will give it a go on Monday. I have ensured that I added all the relevant namespaces, checked and double checked. This is for every single XAML file in the entire project, even ones I add from Blend. The only significant thing I think of what I did between openings was create an Any CPU platform then delete the x86 and x64 build platforms. Could this cause an issue with the namespaces and Blend trying to find them?

    Thank for your time and response,

    Adam

    Sunday, September 12, 2010 12:38 PM
  • Hi,

    Thanks.

    The target platform is set in the solution file (.sln). Could you try to build this solution in the Blend successfully? I will wait for your response on Monday, do not be too anxious. Any problem, feel free to let me know.

    Sincerely,
    Bob Bao


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Are you looking for a typical code sample? Please download all in one code framework !
    Sunday, September 12, 2010 1:01 PM
    Moderator
  • Just in case anyone else gets this error I can confirm that it IS to do with the build platforms. I deleted all mine and just had 'Any CPU' and Blend didn't like it. Just make a new platform for x86 for all your projects. It doesn't have to be the active one, you can leave that as Any CPU.
    Wednesday, March 30, 2011 5:39 PM
  • It has to do with your project confiuration. Check out this post that describes the fix

     

    http://dotnetgui.blogspot.com/2012/02/expression-blend-bugcant-open.html

    Thursday, February 2, 2012 6:18 PM
  • Is it .NET 4 Client Profile by any chance? Or just .NET 4?
    Wednesday, February 14, 2018 7:19 PM