Answered by:
Visual Studio Crashing

Question
-
User-1995224491 posted
Hello. I have recently moved a project from the original development PC to a new laptop. I have been successfully making modifications and deploying to the solution through Visual Studio 2017 for a few weeks although most changes were primarily relating to new/adjusted views and some changes to the database through entity framework.
This morning I attempted to add a new model to the project and when I attempted to add a new class I received the error: "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))." On closing the error dialog box the new class did appear in Solution Explorer and I'm able to start inputting properties. When I attempted to add a data annotation for one of the properties ("[Required]") prior to having referenced annotations the normal error dialog appears with the 'Show potential fixes' option which normally then suggests referencing the annotations. When I click on 'Show potential fixes' it causes VS to crash.
I launched the debug and the following exception had caused the crash:
System.UnauthorizedAccessException was unhandled
Message: An unhandled exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.VisualStudio.Shell.15.0.dll
Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Not sure what is causing this but obviously very limiting if I can't add new classes. I tried adding new classes to other folders (views, controllers) and the same issues occurred. I am able to add new Views and Controllers without incident.
Monday, August 14, 2017 9:31 AM
Answers
-
User347430248 posted
Hi lclift61,
try to close all your projects and Visual studio.
go to the control panel and try to repair the visual studio.
also try to check whether some new update get installed with in last week or not.
after repairing the visual studio check whether it is working correctly or not.
if the problem persist and there is some update got installed then try to remove that update try to use the project again.
also try to open visual studio as an Administrator.
let us know whether it is worked or not, so that we can try to provide further suggestions.
Regards
Deepak
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 15, 2017 1:32 AM
All replies
-
User-1995224491 posted
I've now found that I also cannot create new projects in VS, being informed that 'project creation failed' when I attempt to create new projects.
Monday, August 14, 2017 9:44 AM -
User-1995224491 posted
Realised that this is occurring whenever I click on 'Show potential fixes' option in the project; this was not occurring last week when I was using VS so appears to have been some change of the weekend.
Monday, August 14, 2017 10:25 AM -
User347430248 posted
Hi lclift61,
try to close all your projects and Visual studio.
go to the control panel and try to repair the visual studio.
also try to check whether some new update get installed with in last week or not.
after repairing the visual studio check whether it is working correctly or not.
if the problem persist and there is some update got installed then try to remove that update try to use the project again.
also try to open visual studio as an Administrator.
let us know whether it is worked or not, so that we can try to provide further suggestions.
Regards
Deepak
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, August 15, 2017 1:32 AM -
User-1995224491 posted
Thanks for the comments. I'm waiting for IT department to provide me with some support as it's a work computer and I don't have administrator privileges. Will feedback on what result I get.
Tuesday, August 15, 2017 8:20 AM -
User-1995224491 posted
Hi. A reinstall resolved the issue although a repair failed. Thanks for your help and input.
Wednesday, August 16, 2017 4:46 PM