jrk007
jrk007

Reputation: 395

Why VS2019 Professional shows errors on all UI Elements in MainWindow.xaml.cs but Builds The Project successfully?

I have a very simple WPF application in VS2019 Professional. It was running perfectly fine till the moment and as I changed build configuration from Debug to Release and Build All, it did build successfully and run but it now shows 215 errors (underlined with red) on all UI elements in MainWindow.xaml.cs.

My MainWindow.xaml is clean.No errors.

There is no Bracket or semi-colon missing.

I tried -

  1. Rebuild All.
  2. Clean and Rebuild All.
  3. Closed VS and reopened
  4. Reverted to Debug from Release and all errors gone in Debug. Changed again to Release, all errors are back again.
  5. Some solutions on StackOverFlow referred to clearing cache of Resharper. I don't have Resharper.

Any other thing to try?

Upvotes: 0

Views: 501

Answers (1)

jrk007
jrk007

Reputation: 395

Actually, what worked for me is simply Unloading and Reloading the project in Solution Explorer.

Upvotes: 1

Related Questions