取消 VS2010 的 “正在创建 <项目名>.unsuccessfulbuild ,因为已指定 AlwaysCreate 。”

本文介绍了解决Visual Studio 2010中因AlwaysCreate设置而导致的重复编译问题的方法,包括删除无效文件及调整设置文件。

-------------------

2012-10-22 16:24

 

重新安装了系统,和VS2010专业版,打开以前的项目,每次 F5 都会重新编译,要知道 VS的编译器 有时候效率可真低。

每次VS2010  显示  “正在创建 <项目名>.unsuccessfulbuild ,因为已指定 AlwaysCreate 。”

查找AlwaysCreate 也找不出来 再哪里设置的。

后来 去 Document\Visual Studio 2010\settings\CurrentSettings.vssettings

将 这个 VS2010 的目录全部删除,再次运行 貌似不会默认指定AlwaysCreate为true了。

 

 

-----------------------

2015-12-31 今日再次碰到这个问题,项目总是会构建,这次问题是这样解决的:

@ 删除项目中不存在的头文件

 

参考了:

http://blog.youkuaiyun.com/xuxinhua/article/details/14125623
 解决unsuccessfulbuild”,因为已指定“AlwaysCreate”
===================================

1.出现这个问题基本上如下排除

a 看看工程文件中是否包含了不存在的文件,譬如你加入了一个readme.txt到工程中,在计算机中又删除了该文件,导致该文件实际上已经不存在了,这时候编译时总是去查找该文件导致每次都要编译。


b 查看文件的修改时间,这个很关键baidu中很少有人提到这个原因,如果个别文件的修改时间大于了当前时间,会导致每次生成都要出现上面的信息。特别是通过git从网站上同步源码的时候特别容易出现。

 

 

转载于:https://www.cnblogs.com/ayanmw/archive/2012/10/22/2734122.html

>------ 已启动全部重新生成: 项目: ModelConfigPlugin, 配置: Debug Win32 ------ 1>生成启动时间为 2025/9/13 21:18:33。 1>_PrepareForClean: 1> 正在删除文件“Win32\Debug\ModelConfigPlugin.lastbuildstate”。 1>InitializeBuildStatus: 1> 正在创建“Win32\Debug\ModelConfigPlugin.unsuccessfulbuild”,因为已指定AlwaysCreate”。 1>CustomBuild: 1> Rcc'ing resource.qrc... 1> Moc'ing batchstepconfigdialog.h... 1> Moc'ing cj_sj_paramconfigdialog.h... 1> Moc'ing modelconfigplugin.h... 1>D:\613\Platform\plugins\ModelConfigPluginProject3\modelconfigplugin.h(207): warning : Class ModelConfigPlugin implements the interface IPluginsWidget but does not list it in Q_INTERFACES. qobject_cast to IPluginsWidget will not work! 1> Moc'ing modelconfigactivator.h... 1>ClCompile: 1> batchstepconfigdialog.cpp 1> cj_sj_paramconfigdialog.cpp 1> moc_batchstepconfigdialog.cpp 1> moc_cj_sj_paramconfigdialog.cpp 1> moc_modelconfigactivator.cpp 1> moc_modelconfigplugin.cpp 1> modelconfigplugin.cpp 1>modelconfigplugin.cpp(548): warning C4189: “projectCJSampleButton”: 局部变量已初始化但不引用 1>modelconfigplugin.cpp(510): warning C4189: “saveAttackAreaResultButton”: 局部变量已初始化但不引用 1>modelconfigplugin.cpp(583): warning C4189: “saveSJSampleButton”: 局部变量已初始化但不引用 1>modelconfigplugin.cpp(584): warning C4189: “projectSJSampleButton”: 局部变量已初始化但不引用 1>modelconfigplugin.cpp(547): warning C4189: “saveCJSampleButton”: 局部变量已初始化但不引用 1> ModelConfigPluginActivator.cpp 1>ModelConfigPluginActivator.cpp(33): warning C4100: “context”: 未引用的形参 1> 正在生成代码... 1> qrc_resource.cpp 1>Link: 1> 正在创建..\..\bin\Win32\Debug\Plugins\\ModelConfigPlugin.lib 和对象 ..\..\bin\Win32\Debug\Plugins\\ModelConfigPlugin.exp 1> ModelConfigPlugin.vcxproj -> D:\613\Platform\plugins\ModelConfigPluginProject3\..\..\bin\Win32\Debug\Plugins\ModelConfigPlugin.dll 1>FinalizeBuildStatus: 1> 正在删除文件“Win32\Debug\ModelConfigPlugin.unsuccessfulbuild”。 1> 正在对“Win32\Debug\ModelConfigPlugin.lastbuildstate”执行 Touch 任务。 1> 1>生成成功。 1> 1>已用时间 00:00:08.99 ========== 全部重新生成: 成功 1 个,失败 0 个,跳过 0 个 ==========
09-14
The system is: Windows - 10.0.22631 - AMD64 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: Build flags: /DWIN32;/D_WINDOWS;/W3;/GR;/EHsc Id flags: The output was: 0 Microsoft(R) 生成引擎版本 4.8.9032.0 [Microsoft .NET Framework 版本 4.0.30319.42000] 版权所有 (C) Microsoft Corporation。保留所有权利。 生成启动时间为 2025/3/26 10:49:51。 节点 1 上的项目“D:\Program Files (x86)\opencv\build\x86\CMakeFiles\3.14.1\CompilerIdCXX\CompilerIdCXX.vcxproj”(默认目标)。 PrepareForBuild: 正在创建目录“Debug\”。 InitializeBuildStatus: 正在创建“Debug\CompilerIdCXX.unsuccessfulbuild”,因为已指定AlwaysCreate”。 ClCompile: D:\VS2012\VC\bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Debug\\" /Fd"Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:queue CMakeCXXCompilerId.cpp CMakeCXXCompilerId.cpp Link: D:\VS2012\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X86 /SAFESEH Debug\CMakeCXXCompilerId.obj CompilerIdCXX.vcxproj -> D:\Program Files (x86)\opencv\build\x86\CMakeFiles\3.14.1\CompilerIdCXX\.\CompilerIdCXX.exe PostBuildEvent: for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i :VCEnd CMAKE_CXX_COMPILER=D:\VS2012\VC\bin\cl.exe FinalizeBuildStatus: 正在删除文件“Debug\CompilerIdCXX.unsuccessfulbuild”。 正在对“Debug\CompilerIdCXX.lastbuildstate”执行 Touch 任务。 已完成生成项目“D:\Program Files (x86)\opencv\build\x86\CMakeFiles\3.14.1\CompilerIdCXX\CompilerIdCXX.vcxproj”(默认目标)的操作。 已成功生成。 0 个警告 0 个错误 已用时间 00:00:00.33 Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe" Compilation of
03-27
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值