Results 1 to 4 of 4

Thread: [RESOLVED] clr-namespace error WPF

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2012
    Location
    Denmark
    Posts
    216

    Resolved [RESOLVED] clr-namespace error WPF

    Hi,

    I am new to WPF and need help to solve an error with it.
    I have tried changing the Target Framework and set the target CPU to x86.

    When trying to build the solution I get the error:

    The name "CenterConverter" does not exist in the namespace "clr-namespace:NWpfTransitions".

    The tag 'CenterConverter' does not exist in XML namespace 'clr-namespace:NWpfTransitions'

    The type 'loc:CenterConverter' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

    Thank you in advance.

    Name:  pic1.jpg
Views: 743
Size:  32.0 KBName:  pic2.png
Views: 720
Size:  21.5 KBName:  pic3.jpg
Views: 655
Size:  14.6 KB

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: clr-namespace error WPF

    Right... the application has a RootNamespace that is generally the same as your app name. In this case it it NWpfTransitions ... when you added the Namespace tag, it creates a namespace WITHIN the root namespace... so the FQN for CenterConverter is NWpfTransitions.NWpfTransitions.CenterConverter ... the loc namspace is only aliased to the root... so the tag should be <loc:NWpfTransitions.CenterConverter ... OR ... the namespace definition needs to include both the root and the specified namespaces... OR ... you remove the namespace tag from the code.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2012
    Location
    Denmark
    Posts
    216

    Re: clr-namespace error WPF

    Hi tg,

    Thank you very much for your explanation.
    I just tried what you suggested and now my project compiles.

  4. #4
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,532

    Re: clr-namespace error WPF

    Great!


    If your question has been answered, please make sure to mark the thread as [RESOLVED]. This can be done by selecting the "Mark as RESOLVED" option under the Thread tools menu found at the top right of post #1.
    Thanks!

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width