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".
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:
Environment: Running Visual Studio 2017 Enterpirse 15.9.11
WPF: .NET Targeting 4.6.1