# Errors when writing manifest

 Hi all.I'm on Windows and I'm building my CMake project using MSVC. When I select Visual Studio as the CMake generator, everything works perfectly. However, when I use either the NMake or Ninja generator (in a properly configured command prompt), most of my DLL linking steps fail with the following error:  C:/Program Files (x86)/Windows Kits/8.1/bin/x64/mt.exe : general error c101008d: Failed to write the updated manifest to the resource of file "path\to\the.dll". The operation failed.Re-running the exact same command (nmake or ninja) without doing anything else occasionally solves the problem (it seemed to me it was solved more often with NMake than with Ninja, but I can't be sure), but now I've reached a point where all remaining DLLs consistently fail to link due to the manifest issue.I'd be happy to try to debug/locate the issue myself, but since the error message I get is so wonderfully unhelpful, I don't know *how* to look into it, or even where to start. Would anyone have any ideas how to look what the issue could be?My googling came up with two possibilities: a race with an antivirus for checking the binary file, or write protection on the output directory. I've verified that the directory in not write-protected, and it's in a location which is excluded from AV checks. And anyway, if either of these were the cause, I'd expect the exact same errors when using the Visual Studio IDE to build, but such errors *never* happen there.Any ideas?Petr -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQKitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.htmlCMake Consulting: http://cmake.org/cmake/help/consulting.htmlCMake Training Courses: http://cmake.org/cmake/help/training.htmlVisit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.htmlFollow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake