2009-08-27 32 views
11

Estoy tratando de automatizar la construcción de un proyecto en Delphi 2009."ERROR MSB4040 no hay un objetivo en el proyecto" cuando se utiliza msbuild + Delphi2009

estoy usando msbuild con .NET 3.5

simplemente me llaman:

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

Y conseguir esto:

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 

compilo bien dentro del IDE.

Encontré esto http://huwk.blogspot.com/2009/02/msbuild-fails-to-compile-delphi-2009.html pero no resuelvo el problema.

Respuesta

13

Hay un archivo por lotes llamado rsvars.bat (búscalo en la carpeta RAD Studio). Llame antes de llamar a MSBuild y configurará las variables de entorno necesarias. Asegúrese de que las carpetas sean correctas en rsvars.bat si tiene el compilador en una ubicación diferente a la predeterminada.

+0

Gracias, hacen el truco. – mamcx

+0

sí, incluida la actualización de la variable PATH a MSBuild.exe. – Nashev

5

¿Ha establecido una variable de entorno llamada "BDS", igual a su carpeta RAD Studio?

+1

Sí. Esto es exactamente lo que debe hacerse. ¡Gracias! –

Cuestiones relacionadas