Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINK : fatal error LNK1104: cannot open file 'D:\...\MyProj.exe'

Using Visual Studio 2010, when I build + run my application in short intervals I often get the following error. If I just wait a minute or two and try again it works fine. Unlocker claims no handle is locking the executable file.
How can I discover what's locking it?
If it's Visual Studio itself, what should I do to make it stop? or alternatively to release the file?

1>------ Build started: Project: MyProj, Configuration: Release Win32 ------ ... 1>InitializeBuildStatus: 1>  Creating "Release\MyProj.unsuccessfulbuild" because "AlwaysCreate" was specified. 1>ClCompile: 1>  All outputs are up-to-date. 1>  SomeFile1.cpp 1>ResourceCompile: 1>  All outputs are up-to-date. 1>LINK : fatal error LNK1104: cannot open file 'D:\...\MyProj.exe' 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:00.94 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 
like image 546
Jonathan Livni Avatar asked Oct 11 '10 13:10

Jonathan Livni


People also ask

How to fix LNK1104 error?

To fix this issue, stop the program and unload it from the debugger before building it again. If the app is open in another program, such as a resource editor, close it. If your program is unresponsive, you may need to use Task Manager to end the process. You might also need to close and restart Visual Studio.

Where is Msvcrtd lib?

it is also worth checking that MSVCRTD. lib file is present in "C:\Program Files\Microsoft Visual Studio 10.0\VC\lib" for x64 and in C:\Program Files(x86)\Microsoft Visual Studio 10.0\VC\lib for 32 bit. Sometimes VS might not be installed properly OR these files might get deleted accidentally.

What is Msvcrtd lib?

msvcrtd.lib. Static library for the Debug version of the native CRT startup for use with DLL UCRT and vcruntime. Not redistributable. /MDd.


1 Answers

Had this issue after a reinstall today. Make sure the Application Experience service is started and not set to disabled. If its set to manual, I believe VS will start it.

like image 140
user963228 Avatar answered Sep 20 '22 17:09

user963228