简体   繁体   中英

LNK1104 Error in Visual Studio Express 2015: Cannot open .exe file

I've been troubleshooting this issue for hours to no avail.

Visual Studio will not run any new projects I create. Here's what happens:

  1. Say I have the simple "Hello world" program written. When I choose "Run without debugging," the command window will pop up, but nothing will be printed to it.

  2. The command window is closed, and I try to run the program again. This time, I get the LNK1104 error, saying

LNK1104 cannot open file 'c:\\users\\randyprice4\\documents\\visual studio 2015\\Projects\\pls work\\Debug\\pls work.exe

If I exit out of Visual Studio and try to delete the entire project, my computer will tell me that the project is being used in another application. The part being used is in

C:\\Users\\randyprice4\\Documents\\Visual Studio 2015\\Projects\\pls work\\Debug\\pls work.exe

The file is being used in System. I cannot kill the debug process or delete the file unless I reset my computer.

I uninstalled Visual Studio and deleted all files associated with it, then reinstalled it, and I am still getting the same error.

If I do ctrl+alt+F7 to rebuild the project, it will build successfully, but that's about the only positive thing that's happening.

I'm at a loss. Help would be very much appreciated.

EDIT: The following are not the issue:

-Task Manager (doesn't appear in task manager)

-Antivirus

Theories:

  • the file being used by System most probably means that some intrusive resident code (like an anti-virus) is opening it and interfering with your actions. You may use procmon to see all the operations that happen with your program's file (and, for the suspicious System activity, see relevant stacktraces). This may very well be a virus, FYI (in which case, you might not be able to run procmon at all).
  • your program itself does something funny and keeps running after the console window closes. Though, if it's a simple "Hello, world" in a freshly-created project with default settings, this is very unlikely unless the aforementioned "virus" has augmented it in some way. Still, you can check this with procexp .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM