构建时未执行预构建事件 [英] prebuild events not executed when building

查看:73
本文介绍了构建时未执行预构建事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我遇到了类似未执行预构建的问题.
我在VS2010中有一个很大的团队项目.在构建之前,我需要运行sereval命令来调用perl.exe来修改attribute.cpp文件.
我确定perl已正确安装,文件路径和命令也正确,因为它始终可以在其他人的计算机上运行.
因此,我想我的IDE或环境中的某些配置项目可能不正确?

有人可以给我一些想法吗?
谢谢.

我们正在从事由clearcase管理的团队项目.
我想这可能是设置/配置问题.
我详细阅读了构建日志文件.
发现未执行任何命令..日志文件如下所示:


Hi, I encounter a problem that is something like prebuild not executed.
I have a quite large team project in VS2010. Before build, I need to run sereval command to call perl.exe to modify the attribute.cpp file.
I am sure perl is correctly installed ,the file path and command is correct also, because it always works on other guy''s computer.
So, I guess maybe some item of configurations in my IDE or environment is not right?

May any guy give me some idea??
Thanks.

We are working on the team project managed by clearcase.
I guess it might be the setting/configuration problem.
I detailly read the build log file.
It is found that no any command was executed..The log file is like this:


1>Target "PreBuildEvent" in file "C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets" from project "D:\xchftt\AS.vcxproj" (target "BuildGenerateSources" depends on it):
Task "Message"
Description: modify
Done executing task "Message".
1>Done building target "PreBuildEvent" in project "AS.vcxproj".
Target "CustomBuild" skipped, due to false condition; (''@(CustomBuild)'' != '''') was evaluated as ('''' != '''').


我只是想重新安装.net 4.0..


I am just trying to reinstall the .net 4.0..

推荐答案

这是您可以用来解决问题的方法

1.观察输出"窗口,看是否在build下抛出了任何异常.
2.在PERL上的几行之间打印一些消息,以检查您的PERL程序是否正常执行.

我们使用命令批处理这类东西.
This is what you can do to figure the problem

1. Watch the Output Window, whether the any exception is thrown below build.
2. Print some messages on the PERL, between few lines to check whether your PERL program is executing perfectly.

We use command batches to these kind of stuffs.


您说过"... 它总是可以在其他人的计算机上运行".
如何将另一个人的计算机开发设置/配置与您的比较?可能是您的设置不正确.可能是您要求其他人检查您的开发设置/配置.
You said "...it always works on other guy''s computer".
How about comparing the other guy''s computer development setting/configuration against yours? May be something in your setting is not right. May be you ask the other guy to check your development setting/configuration.


我找到了根本原因:
microsoft.common.target文件损坏.

我重新安装了.net 4.0和vs2010.
问题解决了.

谢谢大家!
I have found the root cause:
microsoft.common.target file corrupted.

I reinstalled the .net 4.0 and vs2010.
the problem was solved.

Thank you guys!


这篇关于构建时未执行预构建事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆