title: Visual Studio 2017 is not executing any code nor generating any meaningful errors
body: <p>I am having trouble with Visual Studio, so I created as simple a program as I could. I created a Console Application that should display a single line to the console, then wait for the user to press a key. Instead, it gives me an error message.</p>
  <p>I looked up the error message, and it is discussing an invalid handle. I am not sure what handle could possibly be invalid. The code is not in any way complex (and would have worked without issue any other day I've used Visual Studio). I have no clue what could have possibly caused this issue. I have not used Visual Studio in about two and a half weeks, but I still cannot fathom what could have happened to it in that time.</p>
  <p>Here is a screen shot of the error message:
  <a href="https://i.stack.imgur.com/OyYoU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OyYoU.png" alt="Visual Studio Error" /></a></p>
  <p>I've been to Microsoft Help and Support web sites (although I did not find any web site specifically named Help and Support, but I did find MSDN and the various forums). I looked up that HRESULT. In every article I read, it is discussing some Web application error. I have yet to come across a single article that mentions this occurring in a Console application, which is why I am so stymied. My next step is to try to repair my installation of the .NET Framework to see if that does anything (I found some oblique references saying that may help). If anyone else has any ideas, I am very interested!</p>
  <p>Additionally, I tried this same code in Visual Studio 2013. It runs fine with that IDE. It only fails with Visual Studio 2017 (which I have had nothing but problems with since installing it, and uninstalling and reinstalling it). But, my copy of VS 2013 is the Community edition, and my job just purchased the Professional license for 2017 for me, so I would prefer to use that if I can ever get it to work. It is quite frustrating at this point. If I cannot find any other answer, my next resort is uninstalling it and reinstalling it again. This will make the fifth or sixth time that I have needed to do that, so I am hoping for another solution.</p>
  <p>Edit:
  Doing more research, I discovered it is only an issue when debugging code. If I run code through Visual Studio using the 'Start Without Debugging' option, it runs without issue. And since I am able to use VS 2013 on the same machine in debug mode without issue, that seems to rule out a Windows issue. The issue is probably confined to VS 2017.</p>
  <p>I have plans to uninstall and reinstall VS 2017, but that is a lengthy process. So, before I do that, I am still looking for any other possible solutions.</p>
  <p>UPDATE:</p>
  <p>I found the crash report in Event Viewer. Here is the log:</p>
  <blockquote>
  <p>Fault bucket 2243818120991372909, type 1
  Event Name: APPCRASH
  Response: Not available
  Cab Id: 0</p>
  <p>Problem signature:
  P1: HelloWorldTest3.exe
  P2: 1.0.0.0
  P3: cc00d718
  P4: StackHash_cad8
  P5: 0.0.0.0
  P6: 00000000
  P7: c0000008
  P8: PCH_E2_FROM_ntdll+0x0006A2DC
  P9:
  P10:</p>
  <p>Attached files:
  \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB1A6.tmp.dmp
  \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB427.tmp.WERInternalMetadata.xml
  \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB486.tmp.xml
  \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB494.tmp.csv
  \?\C:\ProgramData\Microsoft\Windows\WER\Temp\WERB4D3.tmp.txt</p>
  <p>These files may be available here:
  C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_HelloWorldTest3._40a823464c1b7f1a36d57ccec8a525baac94eb58_92da583c_48deb87c</p>
  <p>Analysis symbol:
  Rechecking for solution: 0
  Report Id: a085ff02-7bff-4a22-8d90-3f52094b2f8f
  Report Status: 268435456
  Hashed bucket: 334244e30a9d2a234f23a4b15a46766d
  Cab Guid: 0</p>
  </blockquote>
  <p>Does this tell anything about why it crashed? I also have a list of .dlls that were loaded at the time, but I cannot see anything in particular that would cause it to crash.</p>
  <p>UPDATE #2:</p>
  <p>I tried rebooting in Safe Mode. That fixed the issue. So, then I tried restarting services one-by-one to find the one that was causing the debugger to crash. But, Windows would not allow me to start any additional services in Safe Mode. So, I decided to try it in the opposite direction. I rebooted in normal mode and started turning off services one-by-one. In the end, I had every service Windows would allow me to turn off set to off, but the issue was still occurring. This is looking more and more like a Windows Update broke something.</p>
  <p>UPDATE #3: We activated our Microsoft Technical Support Contract. The Support Engineer they assigned had me send memory dumps and results from running Procmon during the APPCRASH event. After I sent the information, I have yet to hear back and still no word on what could be going wrong. The engineer has been ignoring my emails for the past two days (Friday last week and Monday this week). So, I cannot even get an update on progress. This is an extremely frustrating issue to troubleshoot, as it does not really generate easily found error messages. I will keep updating as I learn more. Thanks to all who have tried to help.</p>
  <p>UPDATE #4:
  Microsoft reviewed the dump files and the Procmon results. They discovered the error is in the CLR (which is odd, because VS 2013 can debug without issue...) It is specifically in the following dll method:
  win32u!NtUserMsgWaitForMultipleObjectsEx</p>
  <p>Microsoft says the dump did not contain the details of that issue, and they would continue working on the issue. In the meantime, I uninstalled Trend Micro, restarted my computer, uninstalled VS 2017, restarted my computer, reinstalled VS 2017, restarted my computer, and the VS 2017 debugger still does not work. I also repaired every .NET Framework version in case any of them were corrupted, restarted again, just in case I hadn't rebooted enough, and still no luck. The only thing that has worked is booting the computer in safe mode.</p>