How to solve "File is in use" Windows 10 error when the file is actually not in use - windows-10

I develop software using Visual Studio 2017 on Windows 10 Home with the latest updates. When my application throws an exception, the executable according to Windows remains open by itself. When I (or Visual Studio) try to delete (overwrite it with newly built executable) Windows says test.exe is open by test.exe and cannot be deleted even though test.exe is not running and there are no other processes that have a handle to test.exe (verified by running Sysinternals handle.exe tool). The only way to deal with this problem is to reboot Windows or log off and log on.
test.exe uses test.dll. If the exception happens in test.dll code, then test.dll will stay locked until reboot.
I did not have this problem on my previous old laptop with the same OS and I don't have it on my work laptop with Windows 10 Pro.
The .net application is a console one written in c#. The content of the code does not matter, it can be just one line that generates any exception. If I run the binary from explorer, I do not experience this problem, only when I run it from the command line. If I kill the main thread test.exe of my test.exe process in sysinternals process explorer before I hit "debug" or "close" button, then I can delete the file without a problem.
It looks like a Windows bug but why I did not have it in my old laptop and my work laptop?
I wonder if anyone else has experience the same problem? Or even better if someone knows how to fix it.
Thanks a lot!

Related

Install-Shield 2010 SP1 Not opening on windows 7

My install-shield 2010 is not opening only the splash screen is opened , it was working fine earlier.I have uninstalled it and deleted all the files in app-data,program-files and the registry,im confused if some other app might be blocking this EXE to run (Because it was working properly earlier).
it happen to me from time to time, the problems is usually because the auto reactivation of my licence failed.
their's a tools for that called TSConfig.exe in C:\Program Files (x86)\InstallShield\2015\System.
If it's not that, you can still check in the InstallShield.log in the same directory, it might give you more clues.
EDIT :
I Just found the email that the Flexera support send me back in the day
Close InstallShield
Locate tsconfig.exe on the machine (the default location is:
C:\Program Files\InstallShield\2011\System)
From a command prompt, run the following command: tsconfig.exe /return
Launch InstallShield
If prompted proceed with activation using serial
number

turning off youtrack java process

I have been running a trial version of youtrack on my windows pc couple months back. I would like to get rid of this.
It seems like there is a javaw.exe process with Username JetBrainsYouTrack consuming almost 1GB of memory on my computer. The program restarts with a restart of computer. There is no signature of an installed JetBrains program in control panel.
How do I remove this program from the computer?
Is there a folder in which the program has all of its files etc..?
I imagine there will be, if so, there will probably be an uninstall executable that you can run.

How to get crash dump in Windows 8.1 without using WinDbg

I have a user who is running one of my apps, and he is seeing the app crash. How can I get a crash dump from his computer without asking him to use WinDbg?
I have read other questions, and this was easy to do in Windows XP using Dr. Watson, but it seems that option is not available in Windows 8.1 anymore.
Other answer points to c:\Users\[user]\AppData\Local\Microsoft\Windows\WER\ReportArchive directory, but I only see WER files there.
Any idea how to get crash dumps?
Thanks.
I wrote a program to trap WER crash dumps. I was able to use the keys mentioned in this article to trap the dump file locally. The only subtle requirement was that the program had to run with administrator rights. If you follow this methodology, make sure you run the program again to disable trapping crash reports because changing those keys could affect all future crash dumps for other applications.
ProcDump from SysInternals.
Register as the Just-in-Time (AeDebug) debugger. Makes full dumps in c:\dumps.
C:\>procdump -ma -i c:\dumps

Remote debugging a process that crashes on launch using Visual Studio 2012

I recently converted a mingw/cygwin build to a Visual C++ cl.exe build and upon initial testing found it crashes at launch. I then installed it in my developer environment to debug it, under which it runs just fine. My initial suspicion was that I was linking to a different DLL in that context, but examining both processes in both contexts with Process Explorer showed that they were using the same versions of the same DLLs.
Since I can't reproduce the issue with Visual C++ installed I installed the remote debugger on the client machine, but I can't manage to attach to the process quickly enough before it crashes. Is there a good way to go about doing this? This would be easy if I could launch the process under the debugger locally, but that doesn't look like a viable option here.
Any help would be greatly appreciated. Thanks for your time!
You should be letting the remote debugger start the debugee process on the remote machine.

"A remote operation is taking longer than expected" x64

First off, I think I've been to every website and forum there is that's discussing this issue and I've tried many different things. I'm at my wits end. This is the dumbest thing and I just want to start coding again!
I'm using Visual Studio Express 2012 for Windows Desktop. I have a x64 project I'm trying to run in Debug mode using the local windows debugger. The only external library I'm using is that of which is required to run DX11.
I attempt to run my program and it freezes. A window pops up saying "A remote operation is taking longer than expected."
I click Terminate and another window pops up asking if I'd like to terminate the remote session. Why yes, I would.
Then it says, "Unable to start program (my path leading to my .exe). The network connection to the Visual Studio Remote Debugger has been closed."
To my understanding, because Visual Studio itself is a 32 bit application, it needs to use the Remote Debugger to compile to x64. Is that correct?
Regardless, I'm still failing to see where that would break down. I've ran several repairs on VS and upgraded to Service Pack 2 (or 1, whichever is the latest).
I've ran a windows repair and uninstalled any VMWare type stuff on my computer. I'm not using a VPN.
I've even copied msvsmon.exe from my laptop (working instance of the project) over to this computer and still no luck.
I'm about ready to Nuke my OS and do a clean install on everything. sigh
Found the problem. It wasn't Windows Firewall like other threads describe. It was my internet filter. I guess it decided to try and block msvsmon.exe because it was using the network. Adding it, along with WDExpress.exe to the application exceptions list did the trick.

Resources