2

Yes! Asking one of the most common questions! Every case is different, right?

I have a WPF application already for about a year, didn't touch it that much the last months and now tried to make some tweaks.

When I set my Build Configuration of the application to Any CPU, then there is no problem. I can see the designer for the XAML files just fine. But due hardware and driver related things, I need to run it in x64 environment to test functionalities. When I switch the Build Configuration to x64, I get "Invalid Markup" error.

For example I have this code:

<CheckBox Style="{StaticResource CustomCheckBox}" Content="{x:Static language:Resources.Setup_Login_RememberPassword}" IsChecked="{Binding ShouldRememberCredentials}"/>

The error message that shows up below it:

The name "Resources" does not exist in the namespace "clr-namespace:Project.Language;assembly=Project.Language".

enter image description here

I have defined the namespace of course:

xmlns:language="clr-namespace:Babywatcher.Language;assembly=Babywatcher.Language"

It does come up with suggestions when I press the dot after Resources.

I have also set the projects that this WPF project references to the same Platform target:

enter image description here

Environment: Running Visual Studio 2017 Enterpirse 15.9.11

WPF: .NET Targeting 4.6.1

CularBytes
  • 9,924
  • 8
  • 76
  • 101
  • I'm assuming that you have already cleared and rebuilt your solution, and closed and opened VS. An option would be testing with "Generics.xaml" – Zer0 Aug 05 '19 at 09:14
  • If you search your entire codebase for `Project.Language` are there any matches? – mjwills Aug 05 '19 at 10:12
  • @Zer0 yes I tried all of that except from "Generics.xaml". How do you suggest doing that? My project uses Caliburn framework and `` elements are used as starting point of each page. @mjwills yes, it comes up with all xaml files using it and .cs namespace references – CularBytes Aug 05 '19 at 11:29
  • @CularBytes well `Generics.xaml` is probably off-topic, but here is a link what It does [https://stackoverflow.com/questions/1228875/what-is-so-special-about-generic-xaml] I thought you need it for your styles. Is that a designer issue? Can you run your application without any problems? – Zer0 Aug 05 '19 at 11:33
  • It seems to be a designer issue as I can run my project just fine and in `Any CPU` the designer is working correctly. – CularBytes Aug 05 '19 at 14:04

0 Answers0