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!
Related
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.
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. =\
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/
I develop C# applications using VS 2010 Ultimate.
Usually, those applications run for long time, without user interaction and, of course, they usually have bugs inside.
Unfortunately, often the application crashes randomly and you just can't reproduce the error. Also sometimes I only have the message "The application has stopped working" with no more informations.
I can install Visual Studio on the machine of the customer, but I can't let him run VS and compile/start the source code in debug mode! What I need is to start VS after the application was started and crashed. It seems to be possible to do this, in fact when an exception happens at runtime, Windows ask you "do you want to debug with VS?", but if I answer YES, then VS starts but simply I can't see the source code (it is on the pc as well), thus I can't inspect the row of code that is causing the exception. VS just tells me "source code not available". Actually, I can't imagine how Windows could start VS and know where the source code of the crashed application is!
Does anyone knows how does this debugging scenario is intended to work, and how to configure it??
Thanks a lot,
Simone
Windbg debugging tool solves the purpose.
Take dump of the process state and start analyzing with windbg. It gives you the exception information
To debug from an already-running Visual Studio instance, select the "Debug" menu item, then "Attach to Process..."
Next, select the executable from the list, press "Attach" (or double-click), and you are now debugging the application. When you select "Yes" and Windows says that source code is not available, this most likely means that the PDB wasn't able to be loaded, so make sure that you have loaded the symbols for the module by examining it in the "Modules" window pane.
If you want to catch errors while running compiled program, you should use some sort of logging mechanism. These days you don't have to write it on your own, there's a great opensource logging engine designed for .NET applications, it's called NLog. It's capable of saving logs into files, emails, console or database, pretty much all you can want :).
Hope this helps :)
I have a program that I built that reads and writes files. I built it in Release mode, then tried to run the exe on Win7. At first, with troubleshooting on, Windows simply told me the application closed and it was looking for a solution. After a few seconds, the dialog would disappear and show nothing more.
So with some significant effort I got the debugger attached to the process, but it was only showing me disassembly, which tells me that the error taking place wasn't in my application code, but in the framework somewhere.
The strange thing is that when I let the debugger attach, then press "stop" in VS, and exit the debugger, the program actually runs at that point!
So now I'm stumped. I have an application that builds, that seems to be having a permission error when I run it, but if I let the debugger attach then close it, it runs, and there's no Exception to really look at.
How I troubleshoot this issue?
Edit: Responding to Merlyn:
It's a custom app written from scratch in c#. The only dependency it has outside of core .NET namespaces is the Ionic.Zip DLL.
Visual Studio 2008 (Writing in C# 3.5)
Windows 7 - Home Premium, v6.1 build 7600
CPU - x64 quad core
CPU are you compiling under: Any CPU
I haven't tried it on another machine or a different version of VS.
Edit: I was able to try the compiled version on another win7 computer, and it worked without issue, so it looks like a security (?) issue on my computer only.
Try it in the debugger with Just My Code disabled and Native Code enabled, then check the call stack.
Also, what happens if you run it directly in Visual Studio?
Uncheck Enable Visual Studio Hosting Process in Project Properties and see whether it still works in VS.
I'd suggest sending the issue to Microsoft support. Especially with the data given here, you will have an easy time convincing them it's their problem. You might need an MSDN subscription for that.