Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) in visual studio
Asked Answered
M

5

23

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?

Musette answered 19/3, 2016 at 22:33 Comment(2)
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.Forewent
Just closing and opening visual studio again seem to have solved the problem.Musette
B
26

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.

Bleareyed answered 21/2, 2020 at 9:58 Comment(9)
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.exeRohn
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.Serpasil
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.Serpasil
Restart Visual StudioPaulie
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 againParatrooper
happened to me on VS 2017 Professional while changing from Release to debug. Restarting VS fixed the problem.Maggs
Restarting a rebuilding the solution worked on my end.Poorhouse
The same problem happened to me in VS 2022, but restarting Visual Studio solved it.Filaria
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.Homosporous
A
11
  1. Close Visual Studio
  2. Go To Project Directory
  3. Remove .vs Folder
  4. If .vs folder not found show hidden files and then remove .vs folder
  5. Open project again , enjoy coding
Archival answered 21/9, 2023 at 12:11 Comment(1)
Thank you, this worked for me. The failure in my case was having the audacity to attempt to open a source code file. A heads-up to others who use this solution, it took a few minutes for VS to automatically recreate my NuGet packages, so a little patience is required.Cashmere
L
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!

Loring answered 22/5, 2020 at 22:30 Comment(1)
One way this happened was renaming the default form from Form1 to frmMain. I had to delete then re-add the form.Jellied
F
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.

Farny answered 29/1, 2023 at 11:24 Comment(0)
M
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.

Meatus answered 15/12, 2022 at 17:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.