14

I attempted recreating the Hamburger menu for a uwp application I am creating by following the instructions on a GitHub page.

Everything was going on well till I encountered the error "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) ". After debugging, I realized the following line of code caused the error

<Setter Property="BorderBrush" Value="{x:Null}" /> 

Just to explain the project from the GitHub page; assuming you have a blank uwp xaml page, you have to add 2 files shell.xaml and shell.xaml.cs to your project as well as modifying the app.xaml. Further instructions are on the Github page. I added this but after running this I encountered the error.

I also tried the instructions from here but to no avail. Am quite confused with the explanation because I could not find the COMPONENTS as described on the page.

Any suggestion?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Tolani
  • 499
  • 2
  • 9
  • 27
  • 8
    The only thing "catastrophic" is the quality of the error reporting. A big liability of COM error codes, you'll see more of it when you program UWP. It takes randomly trying stuff until it works. You did, move on. – Hans Passant Mar 19 '16 at 23:28
  • 3
    Just closing and opening visual studio again seem to have solved the problem. – Tolani Mar 20 '16 at 15:30

4 Answers4

20

I encountered this Error: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) in Visual Studio 2017 when just changing the Solution Configuration from Debug to Release.

Fortunately, reopening Visual Studio eliminate this error.

mr NAE
  • 3,144
  • 1
  • 15
  • 35
  • 2
    Having the same problem in VS2019 16.8.1. The problem is I can't even save the open files without getting the error. Gotta copy/paste the code elsewhere then kill devenv.exe – A. Niese Nov 20 '20 at 05:33
  • Same problem VS2019 16.8.2 on going from Debug to Release. Did not go away on restart. I had changed the .ico file on a Form (among other things). The .resx showed "Object reference not set to an instance of an object." I deleted the .resx. It regenerated it (with no .ico). Reset the .ico and it was ok. – Kenneth Evans Nov 21 '20 at 18:46
  • Spoke too soon. Then it happened when I went back to Debug. Worked on this quite a while. It was clobbering the .resx. At one point I had the correct icon on the Form in Debug, but the default icon in Release. Mostly I got the Catastrophic Failure. Obviously screwed up. What seemed to fix it was closing VS, deleting the bin and obj directories, then restarting. – Kenneth Evans Nov 21 '20 at 19:45
  • 2
    Restart Visual Studio – Sydney_dev Jul 01 '21 at 10:39
  • I had two instances of visual studio running (same project in both), in one instance the error occurred, the other one worked fine. when closing the working instance the bugged one started working again – Zui0per Sep 10 '21 at 16:51
  • happened to me on VS 2017 Professional while changing from Release to debug. Restarting VS fixed the problem. – J'e May 06 '22 at 16:54
  • Restarting a rebuilding the solution worked on my end. – Edward Garcia Sep 06 '22 at 00:15
  • 1
    The same problem happened to me in VS 2022, but restarting Visual Studio solved it. – Jonathan Taylor Oct 26 '22 at 14:44
  • Exactly the Same issue has happened in Microsoft Visual Studio Community 2022 (64-bit). Issue had come after changing the settings in the Solution Explorer > Configuration Manager > Active Solution platform : from "Any CPU" to "x86" and while rebuilding the solution in the debug mode and also parallelly toggling to release mode. Problem has got resolved after closing the solution and then reopening the solution in vs 2022. – Kanthi87 Mar 31 '23 at 12:57
1

Seems various causes lead to this error: in Visual Studio 2019 Community Edition (Studio Version 16.5.3) I added a Windows Form to an existing project, named it including the ending .cs - did not like that at all. I was not able to save the project, neither that specific file nor the project but was confronted with the 'catastrophic error...'. Luckly copy/past to Visual studio 2017 and past into newly added, blank form (that worked smoothly!) although the same problem occurred until I added the new form without suffix .cs!

Andy3D
  • 97
  • 6
  • One way this happened was renaming the default form from Form1 to frmMain. I had to delete then re-add the form. – C.M. Oct 22 '21 at 16:06
1

I faced the Same error in Visual Studio 2022; it took me 3 hours to resolve this problem. I had no idea why this error occurred when I opened the View Designer of myForm.h file. To resolve the problem, I deleted unnecessarily debug build folders from the project's repository. I only kept the single Debug directory and deleted the Release 64X and 84 directories. If you face the same problem, you can delete the unnecessary directory from your project repository and rebuild the project.

Vinay Khatri
  • 312
  • 1
  • 8
0

I had the same error when creating a project in Visual Studio 2019.

So I tried changing the location where the project is created and it worked. Seemed the path was too long but Visual Studio gave this super unhelpful error instead of just saying the path is too long.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Kaane Guji
  • 115
  • 1
  • 7