Visual C++生成错误:无法注册输出

Kel*_*ton 5 c++ build visual-c++

所以我正在进行这个项目,每次构建时,它都会构建然后执行程序,然后完成构建错误.为什么会这样?我似乎无法在项目属性中找到它将在构建上执行文件的位置.
它有点烦人,它最终也会产生错误.这是输出的摘录

2>Link:
2>  Generating code
2>c:\users\d0c\desktop\jlrria.lottery.repo\trunc\hash\hl_hashwrapper.h(277): warning C4706: assignment within conditional expression
2>  Finished generating code
2>  lottery-gui.vcxproj -> C:\Users\d0c\Desktop\jlrria.Lottery.repo\trunc\build\Release\lotteryslayer.exe
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(741,5): warning MSB3073: The command ""C:\Users\d0c\Desktop\jlrria.Lottery.repo\trunc\build\Release\lotteryslayer.exe" /RegServerRedirect" exited with code 2.
2>  The previous error was converted to a warning because the task was called with ContinueOnError=true.
2>  Build continuing because "ContinueOnError" on the task "Exec" is set to "true".<br>
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(744,5): error MSB8011: Failed to register output. Please try enabling Per-user Redirection or register the component from a command prompt with elevated permissions.
2>
2>Build FAILED.
Run Code Online (Sandbox Code Playgroud)

所以我想我正在寻找两件事的帮助
首先,最重要的是:为什么要执行构建程序
第二:为什么我会收到这个错误?

谢谢.ALSO 有在后生成任何项目,否则,上面的日志会说"生成后":P

Aja*_*jay 13

从具有管理员权限的Visual Studio开始.您可以通过右键单击VS快捷键和选择来完成此操作Run As Administrator.或者创建一个启用的快捷方式Run As Admin.

原因:

看看错误:

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

此外,它似乎是一个DLL/ActiveX控件项目.查看:Linker-> General-> Register Output并将其设置为NO.

  • 它似乎是一个DLL/ActiveX控件项目.查看:Linker-> General-> Register Output并将其设置为NO. (3认同)