检查VS2008中的自定义构建事件中文件是否被修改

发布于 2024-09-01 02:36:31 字数 103 浏览 4 评论 0原文

我在构建过程中使用自定义构建步骤从 .wsdl 文件生成 gSoap 代码。如果自创建 Soap 存根后未修改 .wsdl 文件,是否有任何方法可以让 Visual Studio 跳过此步骤?

I'm using a custom build step to generate gSoap code from a .wsdl file during my build. Is there any way to get Visual Studio to skip this step if the .wsdl file has not been modified since the Soap stubs were created?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

尝蛊 2024-09-08 02:36:31

我指的是 VS2005,但我认为这对于 VS2008 是相同的

当定义自定义构建步骤时,您需要将源文件输入到“其他依赖项”,并将生成的文件输入到“输出”。这有助于VS决定是否需要重建输出。如果任何输入文件的时间戳比输出新,则始终执行此操作。

如果没有定义依赖项或输出,VS 就无法判断构建是否是最新的,因此 VS 将始终运行此构建步骤。

I'm referring to VS2005 but i think this is the same for VS2008

When defining your custom build step, you need to enter your source files into "Additional Dependencies" and the generated files into "Output". This helps VS to decide whether the output needs to be rebuild. This is always done if the timstamp of any of the input files is newer than the output.

If no dependencies or outputs are defined there is no way for VS to tell if the build is up to date, hence VS will always run this build step.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文