Invalid pointer | This file does not have an app associated with it - visual-studio

I have an ASP.NET Core application which was running fine but while developing (and after the Windows 10 April update, most likely just a coincidence) suddenly, I got two messages:
This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed,
create an association in the Default Apps Settings page.
Unable to start program 'programName' Invalid pointer
Result: I cannot debug/ run my application anymore. (Start Debugging/ Start Without Debugging)
I found some scary search results talking about a corrupt file system but I don't think that it is something like that in my case...
I checked my startup projects, restarted Visual Studio, restarted the whole system... nothing helped.
Update: After installing the latest Visual Studio update (15.7.1), the message I get when I activate the JavaScript debugging again has changed. Now it states:
Cannot connect to runtime process, timeout after 10000 ms - (reason:
Cannot connect to the target: connect ECONNREFUSED 123.0.0.0.1:53232)
Result: Still the same. Only the error message changed.
Any hints, ideas about that one? Thank you!

If not an answer at least a workaround. I can work again if I tweak the debug options
Debug -> Options -> General -> Enable JavaScript debugging for ASP.NET
(Chrome and IE)
If I disable this feature, I can debug and run my application again. But I still don't understand why this is happening now nor how to use JavaScript debugging now...

I had this problem with Visual Studio 2017. It was caused by my antivirus (bitdefender) blocking a chrome temp file. I set it to ignore that file and that fixed my debug issues.
The file was C:\Users\[username]\AppData\Local\Temp\vschrome_diag.lnk
According to this, re-installing chrome may fix the problem.
Error launching vschrome_diag when Visual Studio 2017 starts debug on Chrome

Related

Visual Studio 2017 HRESULT: 0x80070005 / E_ACCESSDENIED on project creation

I'm running Visual Studio 2017, version 15.0.0+26228.9
When I'm trying to create a new project via File > New > Project... in Visual Studio 2017, I'm receiving the following error message and the project is not created:
Access denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Don't mind the german message text in the screenshot:
This happens for every project template I use (e.g. C# WPF, VB WPF, C# Console App...).
If I try to create a project via the quick search box on the starting page of visual studio, VS just crashes instantly with no exception message at all:
Has anybody else ran into this issue and might know how to fix it?
I had the same error.
I solved it by following the procedure :
Shutdown all instances of Visual Studio
Delete %LocalAppData%\Microsoft\VisualStudio\15.0_f4938f75\privateregistry.bin file (the ID after 15.0_ may be different per machines)
Start VS as normal user
all credit for this should go to https://developercommunity.visualstudio.com/content/problem/31188/access-denied-error-1.html
Ok, I fixed it.
Long story short, the reason for the problem was an incomplete and/or corrupted setup.
But it was a rather bumpy road to the solution, including several un-installations and re-installations until I eventually figured out why the setup was indeed faulty.
Sometimes I got an exception during the installation, other times it finished just fine, but the HRESULT-error persisted when I tried to create a new project.
I my special case, this was caused by the corporate firewall, that blocked some of the setup packets from being downloaded by the web installer. I solved the issue by connecting to an open WiFi, that's not filtered by the firewall.
As I'm working with a standard user, UAC kicks in when I start any installation routine. When I first started the setup via UAC and connected to the free WiFi, it wasn't able to find the packet servers.
It took me a minute to realize that the admin user I used for UAC had his own internet proxy settings, that wouldn't work with the open WiFi.
After I logged on as administrator, disabled the proxy and logged on as my main user again, I ran the setup again - and it failed again with a bunch of "incomplete workload" messages. As frustrated as I was at this point, I simply ran it again via the "Change" button without even closing the webinstaller and this time it finally completed without any errors!
After this, I could start VS just normally and creation of a new project was possible.
So, if you experiencing any troubles like this, I would strongly recommend to run a "Repair" or "Change" installation just over your existing one but try to avoid any firewalls between you and the internet.
1/ open control panel -> program and future - > IIS Express -> select Repair
2/ Refresh some time -> open Visual Studio
This 's about IIS Express in your computer . you only need to repair it in control panel is ok .
I tried and success.
My solution,
The Clang-format caused this. just disable clang-format:
Options->Text Editor->C/C++->Formatting->General->Eable ClangFormat Support
I had the same error when I tried to create a test certificate.
I have just launched VS as administrator.
And everything is Ok
The below solution worked for me
Make sure all the instances of Visual studio are closed.
Go to %LocalAppData%\Microsoft\VisualStudio\15.0_****
Delete the file privateregistry.bin
I tried changing the version of .Net Framework from 4.0 to 3.5 while creating the project. This solved my error.
enter image description here
Changing version of Net Framework

msvsmon.exe crashed when debugging

When I debugging in VS2013 update3, msvsmon.exe crashed when hit at a breakpoint.
It shows "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted".
I'm not using remote debug.
Is it possible to shut down the msvsmon.exe to avoid calling it when debugging ?
Deleting all of the breakpoints solves the problem when I hit this error. Disabling the breakpoints was not enough - they had to be deleted.
I was able to attach to a process numerous times. Once I added a conditional breakpoint (with a few checks), I started getting this error when attempting to attach to that same process.
The error provided in the question is one problem. I also received an error stating that a debugger was already attached when I tried again. Either way, deleting breakpoints solved it.
Try turning on Options > Debugging > General > "Use Managed Compatibility Mode"
I got this error/crash too while debugging and trying to inspect a variable with 50 MB of text data in it. This option worked in both VS2013 and in VS2015 to allow me to debug and inspect the variable with large data.
A couple of things that worked for me:
Try Closing VStudio and relaunching.
If not, reboot helps.[I know thats generic, but its worth a shot]
Disable unnecessary break points.
I had this error also, and I too have Astrill installed. Completely uninstalling Astrill fixed the issue.
I reached out to Astrill support, and they answered (within 2 hours) saying the correct fix is to hold Ctrl and press the "Help" button on the Astrill application, and then choose "Uninstall LSP". This has fixed the issue without needing to un-install Astrill.
I don't know what LSP is, but I presume it's some sort of proxy.
In my case, it was caused by a VPN software. It changed my hosts file and my localhost was not 127.0.0.1 anymore.
So check your localhost in the hosts file (e. g. %WINDIR%\System32\drivers\etc\hosts) and make sure it is 127.0.0.1.
This error just occurred for me with visual studio 2015 RTM. Deleting all the breakpoints resolved the "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted" condition.
So If you clear all your breakpoints, in your version, you will not need to avoid using MSVSMON.exe.
I was using the OzCode debugger extension. Unfortunately they don't have a way to completely disable the extension - you can only disable certain features - so I had to completely uninstall it to confirm it was what was contributing to the crashes.
I got the same error. No effect after deleting all breakpoints and repairing Visual Studio (I have 2013 Community Edition). The problem was the Bitdefender software. I have Bitdefender Internet Security 2016 and had set Active Thread Control (Modules->Antivirus) to Normal level. But after setting this settings to Permissive the error doesn't show up anymore.
This error occured to me, when I tried to debug with Visual Studio / Service Pack 3, when Service Pack 4 was already released. After updating to the Service Pack 4 I was able to debug.
So, try installing the newest version of Visual Studio
Regards
This (or something that manifests in exactly the same way) is still an issue in VS2017. In my case it was caused by a dependency being too large to debug. The dependency in question was a generated client for a large REST API. I was able to debug again after slimming down that dependency.
Here's yet another answer: I changed my project from "Platform Target: Any CPU" to "Platform Target: x86". Went from needing about 5 attempts to debug to working every single time.
I had previously tried every suggestion in this thread: I reinstalled, I killed all breakpoints, and looked for fishy software interactions.
I started getting this exact error today in my VS2019 project. Attempting to expand/inspect simple data structs in VS debugger would make it freeze for a minute and then I'd get that "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted" message:
If I add msvsmon.exe process to windows defender exclusions list, then the problem disappears.
I hit this in Visual Studio 2019 (16.4.3) (C++) with a cause that I have not seen mentioned: I had accidentally added a Watch with incorrect syntax that was attempting to instantiate a singleton rather than returning the existing instance.
Repeatedly choosing right click > Clear All in the Watches view while debugging fixed the issue.
Fixed by changing Options->Projects and Solutions->Web Projects -> Use 64bit version of IIS......... to False.
In my case i am using the wcf Service on the wpf application and inputting parameters from here.The Wpf Application Execution on Facing this error "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted".
That case i am hosing the Wcf service and run the wpf application exe
In this type of Execution on I didn't Facing any Error like -- "The debugger's worker process (msvsmon.exe) unexpectedly exited. Debugging will be aborted"
please,try this proceed error solved because some execution process didn't supporting the debugging..... we are removing the Debuggers on also we face same error.
that case on helped this process.......
I just experience this with VC2017 Community Edition 15.7.2. Turning off the Microsoft Symbol Server lookup while debugging fixed it for me.
I've just had the problem in VS 2015. I hadn't noticed that one of my breakpoints was bogus - I had inadvertently pressed F9 to set a breakpoint when the disassembly window was showing in the previous debugging session. The solution was simply to delete that one bogus breakpoint - I got to keep all my others.
I tried almost every answer in here, but for my case, nothing worked.
Switching to 32-bit just made Visual Studio 2019 crash instead of msvsmon.exe crashing.
What did work for me is to set a very early breakpoint and use that opportunity to close the "Parallel Stacks" window. I didn't need that anyway, but it was open by default in my layout.
In my case, I had this error when I had the "Locals" tab opened during debugging and hitting a breakpoint. For some reason VS might've been unable to display one of the local variables. The error disappeared when switched to a different tab before hitting the breakpoint where the error was occurring.
My problems started after moving a project to a new folder. I wasn't having any luck with any of these answers using VS2019. I even deleted the entire .vs folder thinking maybe something got corrupted. No luck.
But on a whim I tried starting the project with CTRL-F5 instead of just F5 and that actually worked. It's consistent. CTRL-F5 runs fine. F5 gives me the msvsmon.exe error.
I have no idea what's going on, but at least I can get the project to run again.
This problem is at least 1 1/2 years old maybe more. Today is 6-11-22 and I have the problem in Ms Studio Pro 2022 with a fresh install of windows 11 not much of anything else in the computer. Then I uninstalled it and install Ms Studio Community 2022 put in 1 breakpoint at the beginning and I got the error.
Today 6-12-22 I reinstall Ms Studio Community 2022. For some reason I switch from x86 to x64 went through a about 1000 changes of errors and a crashed form1.resx file thank goodness for a backup I had or I'd be done again. anyways so far have several break points with no problems.
I deleted all my watch variables. That fixed the problem for me.
I know it doesn't directly address the error, but as a workaround, I'm using the Rider IDE from JetBrains, and am not encountering the error (code, system, etc. the same).
Visual Studio version: Professional 2017, 15.5.4
Rider version: 2017.3
None of the other answers worked for me, when I encountered this error. If you are not actually remotely debugging, you can use another editor until you figure out the problem or it resolves itself (the latter was the case for me).

VS2010 debugging just stopped, Unknown error: 0x80072ee6

For some reason, my ability to attach a debugger to ANYTHING has just stopped. It has persisted after a computer reboot, and it's really making things difficult.
This is the error I get:
---------------------------
Microsoft Visual Studio
---------------------------
Unable to attach to the process. Operation not supported. Unknown error: 0x80072ee6.
---------------------------
OK
---------------------------
I mean, what the hell? It stopped working whilst VS2010 was running: worked for one debug, I stopped it, and then the next one didn't work.
Any help? Thanks in advance.
EDIT:
I have tried:
a) rebooting the computer
b) regsvr32 MSXML3.dll
c) repairing MS VS2010
d) attaching the debugger manually, and by using the debug button
I had this exact problem and found that it only affected one of the projects I was working on. If I opened Visual Studio with other .sln files, they were able to attach to any process without problems. Deleting the .suo file for the affected solution didn't help, however moving the whole project to a different directory fixed the problem.
I think that Visual Studio keeps additional data for each solution file in a common location(maybe in %AppData%\Microsoft\VisualStudio somewhere) and somehow that data got corrupted for that specific path to a solution file...
EDIT: I found it! Deleting the cache in %LOCALAPPDATA%\Microsoft\WebsiteCache fixed the problem without me having to move the project files.
I got it working again, but I'm not going to mark this as a answer.
Here's what I did:
Started debugging a WP7 project - success!
Stopped debugging the WP7 project.
Started debugging the ASP.Net project (runs on a remote machine) that was in the same solution as my silverlight project I was attempting to debug - success!
Started debugging the silverlight project I was having problems with - success!
Stopped debugging both
Started debugging just the silverlight project - success!
Apparently it works now, but as I said, but I'm not marking this as the answer.
For those of you whose problem wasn't solved by deleting cache, check your Project URL in:
Debug > [project name] Debug Properties > Web (tab) > Servers (section).
I had the same error as the OP, and after adding a URL into that field it cleared the issue.

VS2010: "Unable to start debugging"

My VS2010 debugger has stopped functioning suddenly today on my Dell M4500. I had reinstalled VS2008 SP1 last week, but the 2010 debugger ran fine since then, so I'm not sure its the culprit.
I can launch a project once just fine, & afterwards I get a message that reads "Unable to start debugging," without any error # or explanation of why. Doing IISRESET doesn't help, I get the same message until I close VS with the entire solution and reload it. Here are some things I've tried:
Verified I have the latest project files
Repair option for VS2010
Complete uninstall/reinstall VS2010
Replaced Web.config with known good copy
Added localhost to the list of trusted sites in IE
Performed \aspnet_regiis -i in the 2.0 & 4.0 directories
Through IIS Services Mgr -> Default Website:
verified Enable HTTP Keep-alives checked
placed check in Integrated Windows authentication
Ensured Debug on "Any CPU" is selected
Tried building to Platform targets "Any CPU," "x86" & "x64"
Added DisableLoopbackCheck registry key entry in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Tested under both IIS & VS Development web server
Does anybody have any suggestions I can also try? Any help is very greatly appreciated!
Just a side note. I got a similar error in VS2013 trying to attach to chrome the error was:
Unable to attach the application 'chrome.exe' using XXX The 32 bit
version of the visual studio remote debugging monitor (msvsmon.exe)
cannot be used to debug 64 bit processes or 64-bit dumps. Please use
the 64-bit version instead
I had to untick "Silverlight" in the web project Web section:
I received this same message, preventing my web project from running and opening in a browser. Turns out another developer had made a change in the project properties to "Use Custom Web Server" which pointed to an external URL instead of to the web server on my machine.
Try this:
Right-click your project in Solution Explorer - click Properties - click Web tab - under Servers click "Use Visual Studio Development Server". For reference the usual port value here is "Auto-assign Port". Best of luck.
Here's why I got this error.
In Debug properties, verify that Start external program is not empty.
VS 2010 will warn you about it being empty, but will let you save it
I was trying to switch it from IE to Chrome, lost track of changes I was making, and spent an hour trying to figure out where this error was coming from.
I had the same issue but it worked when I switch Build => Platform target from x64 to x86.
Kindly turned off Debug Edit and Continue option
Turn on vs2010, run debug.
turn off debug, shut down all lunched webServers (i had few of them for different services)
Turn off VS2010
Turn on VS2010.
After that everything works perfect.

Visual Studio detaches from application as soon as debugging starts

I have a web application that I've always been able to run in Visual Studio and it debugs just fine (breakpoints work, I can pause execution, etc). Recently, the behavior changed suddenly, and a few things happen:
I start debugging, it lauches IE and loads the application, but after a few seconds (sometimes the page hasn't even displayed yet), Visual Studio acts as if debugging has stopped - I'm able to edit code in VS again, and the "Play" button on the toolbar is enabled. The application continues to run in the IE window just spawned, but I'm not attached to it
During this few seconds that VS is "debugging", because it detaches, my breakpoints show as hollow - as if I'm set to "Release" mode and they won't be hit. In fact, I have a breakpoint set in Page_Load, and it skips right by. I've checked, and I'm set to debug mode, though the compile mode dropdown is missing from my toolbar (I checked in the build properties to ensure I was in debug mode).
Can anybody shed some light here?
It turns out that this was actually a result of an upgrade to Windows Vista. VS wasn't being "Run as an Administrator", which caused it to lack the rights to attach to other processes for debugging. As a result, debugging would stop right after it started. Changing the VS shortcut to run as an administrator resolved this problem.
I've experienced samely looking behavior. The cause was in existence of several <system.web> sections (which is allowed by web.config schema). Visual Studio debugger (versions 2008 and 2010 were tested) looks in the first encountered section only. So if your <compilation debug="true"> tag is not in the first one, it thinks that there are no compilation.debug setting present and genrally tryes to add <compilation debug="true"> to the first <system.web>. In some cases VS2008 just silently procceds in this case. For example look here: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=510354#details"
Have you installed anything else on the server / workstation recently?
We have a third party app that doesn't allow us to debug, w3wp.exe crashes immediately upon an attempt to debug.
I ran into something similar when I had placed some code in a constructor that was crashing. Exact same issues where the Debug would disconnect just after the application started up.
The short if it, check that you haven't configured a class constructor to run during web startup that is crashing...
Quick windows 7 update: I had to add "localhost" to my list of trusted sites to correct this issue...go figure.
Just a workaround for those (like me) for whom the above solutions do not work: After starting the app you wish to debug, go to Debug -> Attach to Process, and attach it to the process you want to debug. Works on my machine.
In my case, I faced this issue with Visual Studio 2019 and 2022 as well.
I tried upgrading/downgrading Visual Studio versions but nothing helped.
On debugging, I finally found the root cause and sharing it here to help others facing the same problem.
I was using Brave browser with Visual Studio and whenever I uploaded a file in my application, the Visual Studio debugging stopped automatically. The root cause of this issue is the feature in Visual Studio to stop debugging on closing the browser. With Brave browser Visual Studio feels like we have closed the browser on uploading the file. So to fix this issue I have turned of this setting as given here.
You can find this setting here
Tools > Options > Projects and Solutions > Web Projects > Stop debugger when browser window is closed, close browser when debugging stops
Just turn it off and everything should work fine.

Resources