Thursday, January 16, 2014

Invalid markup in XAML in Visual Studio 2013

If you get this error in designer when there’s clearly no error in your XAML:
- close all files open in Visual Studio
- close Visual Studio
- delete the .suo file near the .sln
- delete bin and obj folders

if still doesn't work you can try to delete all directories from:

More info:


Gabriel said...

Dude!! Your a boss!!!!I was going nuts, search all over on the net. No Solution, my C# code had no errors, and XAML had none!

Andrei Nitescu said...

It's nice to see it's helpful to someone else too.

Twan said...

One solution I found was unloading the project and reloading it, just the project not the solution. Right click the project, choose 'unload project' and then right click the project again and choose 'load project' the designer came back to life.

For me I think it has something to do with being unable to reach the TFS server I use at work. Working offline throws these issues for me I guess.

Anonymous said...

Thank you Twan!
I tried the OP's suggestion, but I still couldn't get past the error.
Unloading and reloading the project worked perfectly though.