Tuesday, May 07, 2013

VS2010 build error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions

This is a known issue. The cause and the solution are stated on a MSDN forum.
Here is an excerpt from that online forum:
Starting from Windows Vista, including Vista, Win2008 Server, Windows7, build process cannot write to HKEY_CLASSES_ROOT (HKCR) hives unless the process is started as administrator. To be able to register in non-administrator mode, VS2008 and VS2010 offer the feature of "registrer per user". The registration information is written to HKEY_CURRENT_USER (HKCU). You can set Linker -> General -> Per User ReDirections to "true" if Linker -> General -> Register Output is set to "true". If you have your own custom registration step, you can use the per user registration command: regsvr32 /s /n /i:user "xxxx.dll". If VS2010 is installed on Windows XP, you don't need to have the elevated privilege or per user registration to register your application since the security requirement is OS specific.

No comments: