“错误MSB4040项目中没有目标"使用msbuild + Delphi2009时 [英] "ERROR MSB4040 There is no target in the project" when using msbuild+Delphi2009

查看:228
本文介绍了“错误MSB4040项目中没有目标"使用msbuild + Delphi2009时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Delphi 2009中自动构建项目.

I'm trying to automate the build of a project in Delphi 2009.

我正在将msbuild与.net 3.5配合使用

I'm using msbuild with .net 3.5

我只是打电话给

Z:\Server>C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild "BestSellerAppServer.g
roupproj" /target:Build

并得到这个:

Build started 27/08/2009 01:15:45 p.m..
Project "Z:\Server\BestSellerAppServer.groupproj" on node 0 (Build target(s)).
Project "Z:\Server\BestSellerAppServer.groupproj" (1) is building "Z:\Server\Be
stSellerAppServer.dproj" (2) on node 0 (default targets).
Z:\Server\BestSellerAppServer.dproj : error MSB4040: There is no target in the
project.
Done Building Project "Z:\Server\BestSellerAppServer.dproj" (default targets) -
- FAILED.

Done Building Project "Z:\Server\BestSellerAppServer.groupproj" (Build target(s
)) -- FAILED.


Build FAILED.

"Z:\Server\BestSellerAppServer.groupproj" (Build target) (1) ->
"Z:\Server\BestSellerAppServer.dproj" (default target) (2) ->
  Z:\Server\BestSellerAppServer.dproj : error MSB4040: There is no target in th
e project.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.06

我在IDE中可以正常编译.

I compile fine inside the IDE.

我找到了这个 http://huwk .blogspot.com/2009/02/msbuild-fails-to-compile-delphi-2009.html ,但无法解决问题.

I found this http://huwk.blogspot.com/2009/02/msbuild-fails-to-compile-delphi-2009.html but not solve the issue.

推荐答案

有一个名为rsvars.bat的批处理文件(在RAD Studio文件夹中搜索).在调用MSBuild之前先调用它,它将设置必要的环境变量.如果您将编译器放置在默认位置之外,请确保rsvars.bat中的文件夹正确.

There is a batch file called rsvars.bat (search for it in the RAD Studio folder). Call that before calling MSBuild, and it will setup the necessary environment variables. Make sure the folders are correct in rsvars.bat if you have the compiler in a different location to the default.

这篇关于“错误MSB4040项目中没有目标"使用msbuild + Delphi2009时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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