- [email protected]
- Posts: 19
- Joined:
xaml x:Name on UserControl results in compiler error
Why does this fail in error in the "Blend"-project?
<local:Search x:Name="search" />
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Assets' does not exist in the namespace 'SystemTwo.Assets.Scenes.SystemTwo' (are you missing an assembly reference?) SystemTwo-blend C:\Projects\Unity\Noesis\SystemTwo 0.4\SystemTwo\Assets\Scenes\SystemTwo\Scripts\NoesisGUI\CaseView.xaml 28 Active
If I just leave out the name and write
<local:Search />
it works just fine.
This only results in error when I run the Blend-project (In VS, have not tried Blend), if I run the same code with Unity with the Noesis VS-project it works fine.
For now I don't even use the "search" name reference, which is also why it took me a long time to figure out that the reference was the problem.
Steps to reproduce:
Create whatever container xaml file and include a Usercontrol and put x:Name on the xaml referenceobject inside the container.
<local:Search x:Name="search" />
Severity Code Description Project File Line Suppression State
Error CS0234 The type or namespace name 'Assets' does not exist in the namespace 'SystemTwo.Assets.Scenes.SystemTwo' (are you missing an assembly reference?) SystemTwo-blend C:\Projects\Unity\Noesis\SystemTwo 0.4\SystemTwo\Assets\Scenes\SystemTwo\Scripts\NoesisGUI\CaseView.xaml 28 Active
If I just leave out the name and write
<local:Search />
it works just fine.
This only results in error when I run the Blend-project (In VS, have not tried Blend), if I run the same code with Unity with the Noesis VS-project it works fine.
For now I don't even use the "search" name reference, which is also why it took me a long time to figure out that the reference was the problem.
Steps to reproduce:
Create whatever container xaml file and include a Usercontrol and put x:Name on the xaml referenceobject inside the container.
- [email protected]
- Posts: 19
- Joined:
Re: xaml x:Name on UserControl results in compiler error
I have been made aware that this is not specific to Noesis : https://stackoverflow.com/questions/335 ... tion-error
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: xaml x:Name on UserControl results in compiler error
Was that answer from stackoverflow the source of your problem?
- [email protected]
- Posts: 19
- Joined:
Re: xaml x:Name on UserControl results in compiler error
Kinda yes, I think my problem was that I had two folders with the same name in the path. I didn't exactly change the name of the folder to fix it, I completely changed path and that solved it.Was that answer from stackoverflow the source of your problem?
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: xaml x:Name on UserControl results in compiler error
Ok, thanks for sharing the solution here.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 9 guests