I have a small WPF application which used to compile just fine but is not anymore. I can\'t really say at which point it stopped building. It just worked fine one day, and t
The problem is that when you create the x86 target, the output path for the particular project is set to bin\x86\Debug. It looks like Expression blend doesn't like this at all. It seems to only interested in whats in bin\Debug.
If you changed your output path(s) for the x86 project to bin\debug for example, then I'm sure you'd find it will work. Well, works for me anyway :)
Rebuild your solution (sometimes clean then build works better). Then look at your error list, scroll to the very bottom, and it will most likely indicate an error that is not allowing your assembly to compile, and the XAML compiler is most likely using a cached version of the assembly, not the new one you mean to build.
What worked for me: - Switch solution configuration from Debug to Release - Switch back configuration from Release to Debug
I Changed Target Framework My Application of ".Net Framework 4.5" to ".Net Framework 4.6" and it worked!
I faced the same issue when i was trying to call the namespace in xaml. was showing that class is not available in the namespace. I searched a lot. Finally i found this issue was with VS. I am using VS 2013. I tried below steps:
Change
xmlns:VM="clr-namespace:MyFirstAppViewModel"
to
xmlns:VM="clr-namespace:MyFirstAppViewModel;assembly=ViewModel"
What I found that helped (especially if this error occurs in App.xaml
) is to comment out the reference(s) that gives you trouble, rebuild, then uncomment. I think what this does is allows the entire project to actually build instead of stopping the build at the error.
From what I can gather, the app is trying to build the files in a certain order, so when App.xaml
or presumably any other class file errors in a reference, the file that is causing the error hasn't been compiled correctly, hence why it doesn't find the file in that namespace.