O'Reilly Forums: Invalid Markup - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Invalid Markup Head First C# Third Edition

#1 User is offline   jmalik 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 04-February 14

Posted 04 February 2014 - 04:20 PM

Hi Guys,

My name is Jamal, this is my first time using the forum. I am stuck on chapter one. Here is my dilemma, I am using Visual Studio 2013, at first, I completed chapter one, everything working great. But then i dediced to redo chapter one again, but whenever I open a solution that I closed, I constantly get Invalid Markup, when i open MainPage.xaml. I rebuild, and get the same thing. I normally get 28 errors

When I delete the original mainpage.xaml, and create a new one, the new mainpage.xaml displays, but if i close it, thats it. Cause when I open it, it will display invalid markup.

Thanks,
Jamal Malik


Note: Also the original exercise files, if i open them for the first time it shows great. When I close it, and open again, it says invalid markup, and for the life of me, I can get it to display the designer again.Attached Image: 2.png
0

#2 User is offline   wunderwaffe 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 26
  • Joined: 14-January 14

Posted 05 February 2014 - 01:16 AM

Are you missing an import?
0

#3 User is offline   AndrewStellman 

  • Andrew Stellman
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 736
  • Joined: 08-October 08
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:Author of: "Head First C#", "Beautiful Teams", "Head First PMP", "Applied Software Project Management"

Posted 05 February 2014 - 05:44 PM

That's really weird. Can you upload the files somewhere?

Just FYI -- you'll be switching to Windows Forms Applications projects partway through Chapter 2, and then won't touch Windows 8 apps again until Chapter 10, so this won't be an issue for quite a while if you want to move on in the book.
Andrew Stellman
Author, Head First C#
Building Better Software -- http://www.stellman-greene.com
0

#4 User is offline   jmalik 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 04-February 14

Posted 07 February 2014 - 04:11 AM

Ok guys, thanks for the responses. Pardon my english, for the previous post. I was completely frustrated, and had no idea how to move forward. I spent the most of yesterday searching the net, and I found a solution,well not actually a solution, but a workaround. Here it is:

"
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:
%LocalAppData%\Microsoft\VisualStudio\12.0\Designer\ShadowCache"

My link

It now works well. I no longer receive that error, however, I must delete the .suo file before loading my project. I am unsure if it is a bug,however as soon as possible, I will download the updates, as Microsoft has made them available. If you guys are aware of a solution, please, any assistance will be wonderful.

Thanks

By the way, a wonderful book.I LOVE it! I am only reading 12 pages a day, taking notes, and studying 3-4 hours a day. I am now dreaming in C#, hope that's a good thing. I was a complete noob before 'Head First C#, Third Edition' now I am on my way on becoming a great programmer.

This post has been edited by jmalik: 07 February 2014 - 04:19 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users