Jump to content

XAML Designer : "The Resource 'x' Could Not Be Resolved"

Go to solution Solved by Aleksa Djordjic,

So, i have been messing around with my Project for a bit too maybe find out what the error was...

Turns out the XAML Designer doesn't like when the Project is set to build for x64 CPU's only

 

So, here is my solution (maybe) :
If you have set your Project to build for x64 CPU's only, next time you close your project set it to Any CPU and when you open your project, open the Designer while it is set to Any CPU, once the designer loads you can change it back to x64

Capture_1.PNG.16630863ad0df99e7b5a06fe1959bdd1.PNGCapture_2.PNG.3cc873443d4d998c768d4c575ecf60d8.PNG

 

I was working on our app, some .cs file ....
When i switched back to the XAML Designer i was bombarded by errors, warnings and a broken UI ....

We use "Material Design In XAML" NuGet package for our UI.

IDK why, but everything just instantly broke, and the error that are displayed in the second picture say "The resource 'x' could not be resolved"

 

I have a couple of other projects that use this UI Package and they seem to be working fine,

here is what i have tried to fix this : (nothing worked)

  • Rebuild the whole project ... nope
  • Rebuild the whole solution ... didn't work ether
  • Reinstall the NuGet package ... 
  • Downgrade the package to a older version ...
  • Remove its reference from the App.xaml, reload Visual Studio and add back the reference ...
  • Clear all of Visual Studio cache and user settings ...
  • Reinstall the XAML Visual Studio Package 

Nothing worked ... and most of this stuff i have found on their "Issues" in GitHUB repo.

Last thing that i have to try is to reinstall Visual Studio, but because my net is s***, i want to see if someone has a solution before i spend a whole day reinstalling it :/

 

Also, note, im using Visual Studio 2019 Preview v2.1 (i think v2.1)

 

If any more info is required ... please ask, i didn't know what else to add.

 

Thank you !

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Visual Studio reinstall didnt work ether ... i guess i will make a new Solution and add the existing projects to it

 

Link to comment
Share on other sites

Link to post
Share on other sites

NVMD ..... i created a new project and wanted to move everything to it ...
I loaded up the old project once again, just to see what references i need .... and it .... somehow fixed itself xD

Link to comment
Share on other sites

Link to post
Share on other sites

So, i have been messing around with my Project for a bit too maybe find out what the error was...

Turns out the XAML Designer doesn't like when the Project is set to build for x64 CPU's only

 

So, here is my solution (maybe) :
If you have set your Project to build for x64 CPU's only, next time you close your project set it to Any CPU and when you open your project, open the Designer while it is set to Any CPU, once the designer loads you can change it back to x64

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×