views:

380

answers:

2

I have Visual Studio 2008 (9.0.30729.1 SP) installed on my computer and a build machine. On my computer, a project builds fine. On the build machine, I have started getting this error. ALINK operation failed (80070005) : Access is denied

This is incredibly irritating because it doesn't say Access TO WHAT??? is denied.

I've tried rebooting the machine, and changing the output directory of the project. It's a C++/CLI DLL. The project links with a large number of libraries so it's not really practical to extensively check everything it links with, but a quick scan of the project and nothing seems to be missing or locked.

Anyway I can figure out what the heck linker is complaining about? Sounds like a bug in the linker(1), but as I said I have the same Visual Studio installed in my PC and the project builds fine.

(1) You could argue that an error message that unhelpful IS a bug.

A: 

It's always good to have FileMon as a tool in your toolkit: it can log every file operation, and will help showing what exactly the linker wants to do with what file.

(Find it at sysinternals.com)

xtofl
That worked. I used Process Monitor and filtered on link.exe and found a problem in the MS cryptography API which made me realize it is some problem it's having signing my DLL. If I take out the keyfile I don't get the linker error. Now I just have to figure out what the problem is...
mhenry1384
I fixed the problem by adding administrator access to the "C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys" folder. Not sure how that got screwed up, but whatever. It works now.
mhenry1384
A: 

In the output window, can you see where it is failing while doing what operation?

Often you might get an error because a file it is trying to modify is under source control / not writeable because of SOME reason.

Also, you might just be missing some file which it is looking for.

Mostlyharmless