Using Visual Studio 2005 with the latest Service Pack.
I have a managed C++ solution with 38 projects (that I've just inherited.) When I build this solution, I'm receiving the following error from the Assembly Linker:
"error AL1019: Metadata failure while creating assembly -- The process cannot access the file because it is being used by another process."
I'm kind of at a loss as to how to resolve or troubleshoot this. The surrounding steps in the build output are:
- Writing Resource File... Done.
- Compiling resources...
- Linking...
- Creating library [PATH]\[FileName].lib and object [PATH]\[FileName].exp
- Creating resource satellites...
- Error Occurs Here.
There is no difference in the results between Build vs Rebuild vs Project Only with or without Cleaning the Solution first. And, in all cases, the DLL, EXP, ILK, LIB and PDB files for this project are created.
I've compared this particular project to other projects in the solution that are structured similarly and see no appreciable differences. I've looked at the batch files and temporary rsp files that get generated during the build process and see nothing that jumps out there either.
My current speculation is that the Linker is trying to embed the Intermediate Manifest file into the assembly while something else is still trying to write to the same Intermediate Manifest file (or to the assembly itself.) Though, I'm kind of guessing at this point.
If anyone knows how to resolve this or has any insight as to what else to look into to try and troubleshoot I'd greatly appreciate it. Thanks.
A sanitized version of the end of my build log, if it helps:
/ASSEMBLYRESOURCE:".\Debug\[Namespace].[ErringProject].dll.licenses"
]
Creating command line "link.exe @[Path]\[ErringProject]\Debug\RSP00030A20042852.rsp /NOLOGO /ERRORREPORT:PROMPT"
Creating temporary file "[Path]\[ErringProject]\Debug\RSP00030B20042852.rsp" with contents
[
/out:"[OutputPath]\[Namespace].[ErringProject].dll"
/c:Run
/template:"..\..\..\..\..\Run\[Namespace].[ErringProject].dll"
/embed:".\Debug\[Namespace].StringsNT.resources"
/embed:".\Debug\[Namespace].Strings.resources"
]
Creating command line "al.exe @[Path]\[ErringProject]\Debug\RSP00030B20042852.rsp /nologo"