Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type or namespace name Wpf does not exist in the namespace Project.Emoji #52

Open
timothyhamul opened this issue Dec 21, 2021 · 5 comments

Comments

@timothyhamul
Copy link

timothyhamul commented Dec 21, 2021

Apologies if I'm not using the lib correctly as I'm fairly new to this.

I followed the example in the README and installed via PM console but when I want to add a Name or x:Name to my <emoji:TextBlock>, this is the error I'm seeing in my logs. If I don't use x:Name or Name, the textblock is working as intended

Using

<Window ...
         xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
>

<emoji:TextBlock Name="TestName" Text="Test" />
</Window>

gives me: The type or namespace name "Wpf" does not exist in the namespace "Project.Emoji"

but this works fine

<Window ...
         xmlns:emoji="clr-namespace:Emoji.Wpf;assembly=Emoji.Wpf"
>

<emoji:TextBlock Text="Test" />
</Window>

This also happens when trying to use it with RichTextBox as well.

Thanks for your time

@timothyhamul timothyhamul changed the title The type or namespace name Wpf does not exist in the namespace emoji The type or namespace name Wpf does not exist in the namespace Emoji Dec 21, 2021
@timothyhamul timothyhamul changed the title The type or namespace name Wpf does not exist in the namespace Emoji The type or namespace name Wpf does not exist in the namespace Project.Emoji Dec 21, 2021
@timothyhamul timothyhamul reopened this Dec 21, 2021
@samhocevar
Copy link
Owner

This is a bit puzzling. Do you have an xmlns:x entry as well, in order to use x:Name?

@timothyhamul
Copy link
Author

This is a bit puzzling. Do you have an xmlns:x entry as well, in order to use x:Name?

I do, I'm actually able to use x:name elsewhere just fine which is quite strange

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

@samhocevar
Copy link
Owner

I’m afraid I was unable to reproduce the problem. Could you maybe share your project, or attach a minimal repro case? Thanks in advance!

@timothyhamul
Copy link
Author

I’m afraid I was unable to reproduce the problem. Could you maybe share your project, or attach a minimal repro case? Thanks in advance!

No problem! It seems like it might actually be a setup issue. When I cloned the sample and tried to build I actually got the exact same error. Seems like an issue specific to my machine since the package works fine when I'm not trying to use x:Name

@samhocevar
Copy link
Owner

Hi! Do you think this can be closed? I have not seen any other occurrence of the problem, so I would think too that this was a setup issue on your side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants