Home > OS >  Visual Studio 2022 Unauthorized Operation when opening .cs files
Visual Studio 2022 Unauthorized Operation when opening .cs files

Time:04-21

Does anyone know how to fix a "Attempted to perform an unauthorized operation" error in Visual Studio 2022 when opening a .cs file?

I worked on a VS Solution yesterday. Opened the laptop today, rebooted, opened the solution, and open a cs file via Solution Explorer, I get an error and a blank tab:

enter image description here

Also noticed that opening a Solution from the Windows 10 Jump List will cause the VS 2022 logo to be displayed and then the process will silently crash.


What I've tried so far:

  • Upgraded Visual Studio to v17.1.5
  • Upgraded all Extensions
  • Confirmed plenty of diskspace, memory.

Environment

Windows 10: 21H1
Visual Studio 2022 v17.1.5
3rd Party Extensions: AWS Toolkit, ReSharper, T4Editor, Git Diff Margin, ReSharper

CodePudding user response:

Rebooting fixed the problem.

Looks like Microsoft is aware of the issue but doesn't expect it to be fixed until version 17.2.

Workaround - Oleg Tkachenko [MSFT]
Unfortunately until 17.2 you might still experience this issue every time Windows Terminal is autoupdated, too many code paths to handle exceptions on… The proven workaround is to restart Windows though.

- https://developercommunity.visualstudio.com/t/Visual-Studio-Editor-is-blank-without-an/1568780


Thanks to pm100 for the original link!!

CodePudding user response:

according to this forum entry

https://developercommunity.visualstudio.com/t/Visual-Studio-Editor-is-blank-without-an/1568780

a reboot should fix it

gimme my points :-)

  • Related