Horrific Windows Server 2012 R2 & Visual Studio Crash - c#

So, I have a question someone here may know the answer to... I am trying to debug and trace through some C# code on a remote Windows Server 2012 R2 with Visual Studio installed. I am using a Debugger.Launch() call to hook into the program and Visual Studio properly launches and shows me the proper break point.
However, once I try to step-in, step-over, or even just resume execution, the entire server crashes and reboots. There is absolutely nothing being recorded to explain what the problem is in the event log other than the usual 'previous reboot was unexpected' message. This problem happens regardless of whether I try to debug the application as a console application or as a Windows service.
The server is being accessed via Remote Desktop and the source code files are located on my local drive (e.g. "\tsclient\X\path\to\source.cs"). I've already scoured the web for a few days trying to find anything and everything that might help but I have not found anything that helps. I have even tried to make sure that VS is excluded from DEP and that did not change the end result either.
This is happening with Visual Studio 2012, 2013, and 2015 (all with the latest updates applied). In addition, all Windows Updates have been applied to the server. The strangest part is that this was all working as of about a month or two ago when I needed to debug a different application.
So gurus of stackoverflow, does anyone know a) what would cause this and b) how to fix it?
eG
EDIT: Fixed path example which didn't like angle brackets. =\

Related

The process cannot access the file 'CustomTabsClient_CustomTabsCallbackImpl.class'

I've upgraded my Windows to 10.0.16299 (latest) and my Visual Studio to 15.5.1 (latest). Since then, I am seeing this error message when I clean or build my Xamarin solution containing an Android project:
obj\Debug\android\src\android\support\customtabs\CustomTabsClient_CustomTabsCallbackImpl.java:4:
error: error while writing CustomTabsClient_CustomTabsCallbackImpl:
obj\Debug\android\bin\classes\android\support\customtabs\CustomTabsClient_CustomTabsCallbackImpl.class
(The process cannot access the file because it is being used by
another process)
I figured that the locking process is Visual Studio itself after I tried to run and debug the app.
The issue appears no matter whether I want to run the app on an emulator or a connected real device.
There's lots of advice what to do when a process locks a file including SO such as the famous the process cannot access the file because it is being used by another process. However, all provided answers don't help as Visual Studio itself locks the file and the only workable workaround is to restart Visual Studio - that's not a solution.
What is causing this file to be locked? Any idea? Any advice?
Sometimes it helps to kill the MsBuild.exe. Also, you could find other solutions such as described here: Xamarin Android project cannot build....
Basically, it seems to be a problem with Studio 2017 Version 15.5. It will be fixed with the next versions probably.
Darn it, my suggestions won't fit in the context of a comment, so here goes:
Sounds like the process being debugged, or the emulator hosting the debugged process, itself, has not fully closed down, and is in a hung or semi-hung state. Have you checked the process manager to see if this is the case? You may want to to try adding Environment.Exit() to see if this helps come back to a good state.
Another thing to check is, whether your access levels are the same between the two machines. Check not only the PC, but also at the emulator as well. Check everything, and ensure the access levels/modes are identical.
Finally, try running VS 2017 in administrator mode, and see if the problem persists. It's entirely possible that the level of access that you used to run pre-Windows 10 is different in the Win10 world that you live in, now.

Coded UI codeduiswitchfromimmersive.exe crashes

I'm hoping that someone can help me I'm working on some Coded UI tests and when I try to play them back they run though but I get the below when they are finished.
Is there anything I am missing or do you have any ideas.
I get this from both recorded and hand written tests.
I'm using Visual Studio 2015 enterprise.
I have never seen anything like this, but you can allwais try to:
Reboot VS and try to run the test again
Reboot the PC and try to run the test agin
Make sure you are running VS in administrator mode
If the problem is still there then check the event viewer on the PC where you are running the test:
Right Click My Computer - Manage - Event Viewer - Windows Logs - Application
It is possible that you have some more information regarding that error there!

Visual Studio 2015 Remote Debugger 'not implemented'

I'm getting crazy with Visual Stusio 2015 remote debugger.
What I want:
I have running a .Net console application on a Azure VM.
I want to remote debug my application and make some performance measure.
What I've done so far:
Application was compiled in debug mode and is running on the remote machine.
Over the Server-Explorer of VS2015 I added the Remote Debugger extention to the VM. Firewall on the VM is down for testing. Tested on two devices with the same result.
What I get:
I select my VM over the Server-Explorer and choose 'Attach debugger'.
I select my process of my running application (yes all processes running are shown).
Then after a few seconds I get the great error window 'Not implemented'!?
Where I need help:
Does anybody have a similar problem? Where can I find an error log to get more information on whats going on?
Further
I also created a Connect entry for this (Thanks for the hint #Vova). So if you have the same problem you can upvote it. Microsoft Connect
I'm thanksfull for every help. Greetings Steffen
According to Microsoft Connect guy (Eliver) its a bug. It only effects Visual Studio 2015 with display language other then english.
Solution 1
Wait for next Azure SDK release with fix inside
Solution 2
Install english language pack from here and switch ths VS language to english from option dialog.
Update - 2015-11-21
I just wanted to let you know that the Azure SDK 2.8 has been released and this bug I'am facing have been resolved in this.
https://azure.microsoft.com/en-in/blog/announcing-the-azure-sdk-2-8-for-net/

Remote Debugging Error

I've been refactoring some code which was previously working.
Now when debugging I get to a break point in the refactored code and when I step into the Property in question I get a message saying that Windows firewall is currently blocking remote debugging.
It doesn't make sense because the application is a console application being debugged through visual studio on my local machine. I am using VS2010 and .net 4.0.
Does anyone know why vs might be trying to remote debug?
what does your code do? does it access any external files and or databases?
It could also be an administratrion issue, try rightclicking VS and run as admin first off and see if that fixes the issue.
secondly trace your code and see if there is any links to externals, and thirdly go to windows firewall and change the settings to allow access to Visual studios~ and or databases/.net instances.

include .NET dll references with the project

AoA,
I am trying to make a music player app in wpf C#(Visual Studio 2012, Win 8), I have made a demo(to chk the app on different computer, whether the app is running or not). 4 out of 7 passed, but I cant figure out why my app is not executing on the remaining 3?
6 out of 7 have windows 8 and visual studio 2010 or 2012. One is using windows 7 with Visual Studio 2010(app runs fine on this one)
I cant figure out the problem! There is no error, the app unable to execute on the 3 pc's
Is there a way that I can use my app with the references included? so that there is no need of external
references?
Any help?
You should try to debug it on one of the machines where your app refuses to run.
If it should be a runtime enviroment issue even if something like user account control (UAC) interferes, u get exceptions. So this doesn't seem to happen, so there must be a flaw in your code. Again, try to debug it on one of those machines. Or programm control of an installed firewall is blockin your app silently in the background...

Categories