Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Starting VS2015 in Safe Mode shows strange error in NCrunch window
abelb
#1 Posted : Sunday, October 9, 2016 11:54:45 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 9/12/2014(UTC)
Posts: 155
Location: Netherlands

Thanks: 19 times
Was thanked: 11 time(s) in 11 post(s)
When I start Visual Studio 2015 in safe mode (as with devenv.exe /SafeMode), the NCrunch Configuration window (which I have usually open), looks as follows:



It is actually a text box and the error is:

Quote:
An exception was encountered while constructing the content of this frame. This information is also logged in "R:\AppData\Microsoft\VisualStudio\14.0\ActivityLog.xml".

Exception details:
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()


Now, I don't expect NCRunch to work in any way (in fact, I think it should be unloade?) when running Safe Mode, but certainly, the error itself is unnecessary and/or ought to be suppressed?

(I am not trying to solve the error, when running in safe mode, I actually expect extensions not to be loaded, but I notice that quite a few extensions, including NCrunch, PostSharp, .NET Reflector, ResX, get loaded anyway, albeit with odd behaviors, but that is besides the point here)
Remco
#2 Posted : Monday, October 10, 2016 4:31:33 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for sharing this issue.

Under safe mode, VS likely isn't fully initialising the NCrunch package. However, it looks like VS is still loading the solution.user file which contains the various tool window layouts.

So what we have here is a tool window that has been left open belonging to an extension that is disabled. Because the code behind the tool window isn't allowed to execute, you see an error.

I don't see a way for NCrunch to cleanly handle such a situation. Because the VS instance is in safe mode, NCrunch isn't actually allowed to execute any code. The exception you're seeing here is probably benign and closing the tool window will likely solve the problem entirely.
abelb
#3 Posted : Monday, October 10, 2016 3:09:31 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 9/12/2014(UTC)
Posts: 155
Location: Netherlands

Thanks: 19 times
Was thanked: 11 time(s) in 11 post(s)
Yes, you are probably right. I had the impression that VS was executing *some* code of the extension, but if it is executing no code at all, there'll little to nothing you can do. Besides, I think that by maintaining the window layout, as VS is doing, at least I won't use any window layout related issues.

Strange, when I run VS in Safe Mode again, this time the menu items (NCrunch, .NET Reflector, PostSharp, even Architecture) have disappeared, while they were showing the first time around.

Also, in my Window Layout are windows of .NET Reflector Analyzer and .NET Reflector Object Browser, and they simply show up empty (dark background, no error). Which appears to me that at least for some extensions they managed to "die silently" when requested to open in Safe Mode. I checked online for some references in the VS documentation on writing extensions but couldn't readily find it.

Of course, like you mention, the error itself is clearly harmless.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download