Visual Studio 2005 - Build/Debug problem process already in use error message


When trying to build or debug my application on Visual Studio 2005, I often get an error, according to which the process would already be in use. However I am pretty sure it’s not the case. After a few consecutive retries, it eventually executes properly, but it is very inconvenient to go through this 2-4 times restarting the build/debug process.

Anyone had and solved this problem???
Here is the output:

1>------ Rebuild All started: Project: matrixmul, Configuration: Release Win32 ------
1>Deleting intermediate and output files for project ‘matrixmul’, configuration ‘Release|Win32’
1>Performing Custom Build Step
1>Embedding manifest…
1>mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file “…\bin\win32\Release\matrixmul.exe”. The process cannot access the file because it is being used by another process.
1>Build log was saved at “file://c:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\projects\matrixmul\Release\BuildLog.htm”
1>matrixmul - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Thanks for any help

Hi Fran,

I remember having the same problem over a year back, but unfortunately “a year back” means I don’t remember the solution well ;) . But I remember that I ran into some posts which discussed the ollowing issues with the manifest tool (mt.exe):

One issue was about manifest files being messed up, so remove any manifest files you created by your own (VS will generate a new one).

Another issue was about /MT or /MD compiler flag (Multithreaded-DLL or Multithreaded-RunTime support) when linking to other libs which are compiled in different ways (e.g. you have a lib which was compiled with /MT flag and you want to use it in application compiled with /MD flag).

And the last I remember was an issue about the manifest tool being used on FAT32-partitions, which means that you have to enable the FAT32-Workaround (an option already provided with the manofest tool) for FAT32-partitions and disable it for use with NTFS.

Well, hopefully I could lead you to getting faster to the problems solution.

I’m really sorry I can’t remember the solution.


PS: If I will remember you’ll be the first one to know ;)

EDIT: as it is one of the sample-projects as they were provided I suppose, you should perhaps check the FAT32 issue at first…

Are you sure you don’t have the executable open in another window (waiting for return to exit or something like that)? Has happened to me :)


Thanks for your help. I tried what you told me:

  • enable/disable FAT32 workaround in the Manifest properties (under Project properties)
  • use different run-time libraries (/MD and /MT)
  • deleted the manifest files

However the problem still remains. Actually you were right sometimes I get this “process in use” error message for the mt.exe and for my own executable… really weird…
Any other idea?

@the gallier
Obvioulsy I double checked this ;-) Thanks still ;-)


Hi Fran,

I also got the same problem a couple months ago, and it might be related to your antivirus scanning the newly created executable while visual is trying to put the manifest in. So you can try to disable it temporarily and see if it helps.

Unfortunately I still can’t tell you the right solution to your problem, but I have some additional ideas which you could check ;) .

After trying the antivirus issue described by hufo, you could look for updates/service-packs (I don’t know if there are any) for your version of VS as it could be a bug in VS itself which causes mt.exe to try writing to the output file while the output file is still being built.

Afterwards you could simply disable the whole “manifest-blabla” :) (Project Properties->Linker->Manifest File->Generate Manifest = No and Project Properties->Manifest Tool->Input and Output->Embedd Manifest = No) it should build without that… (I know, we would still not know where the error comes from but… ;) )

And after having read a thread about that problem in another forum which told to try recreating the whole project manually (with stupid copy-/pasting the source and everything but the solution/project files… ) I won’t deny that I might got rid of the problem that way when I was in your situation. :whistling: (But I still can’t really remember that)

Good luck,

Thanks guys. Actually the problem was the anti-virus software.
I disabled the monitor on the CUDA directory and subdirectories and now everthing works fine.