However it didn’t build the Sandbox config I have designed in the IDE, but the Release one. At first I blamed Delphi, but then noticed in the Train console output that it didn’t pass the configuration to msbuild properly:
It passes the configuration as /property:Configuration=Sandbox, while it should be /property:Config=Sandbox as far as I know. Is it something in my Msbuild version or a bug in Train?
builds not the configuration that I set, but the one that was last active in the IDE, which in my case was the Release one. While executing the line below works fine.
msbuild project.dproj /t:Build /p:Config=Sandbox
Are you checking with Delphi or a Visual Studio project and could there be a difference in the structure?
In the DPROJ file I see lines like < Config Condition="’$(Config)’==’’">Release</ Config>", which leads me to believe that it is indeed called Config.
It is also mentioned here
Well, there you go. The dproj is broken then. “Configuration” is the msbuild standard. If Embarcadero doesn’t follow that, than it’s not surprising this fails :(.
Yeah… It’s good to have standards and even better if everyone follows them
I guess I will have to modify the script to launch msbuild directly instead of using the Train API in that project.
I’m not sure how to specify the configuration with delphi.build(…).
It uses the DCC compiler directly and not msbuild. I think DCC doesn’t know about named build configurations, but I could be wrong… I will test it if you tell me what how to pass the configuration.