Error with MSBuild and Delphi: "VCL" not found...


I am trying to build a large groupprj within TeamCity. My issue is that it keeps returning an error about VCL not being found. I can build it myself in CMD but I cannot build it in TeamCity at all. Even if I use the exact CMD command that I used in CMD alone. Can someone help me get to this build in TeamCity?

"Fatal: E2202 Required package 'vcl' not found" is the error from within TeamCity's build log. I'm using a msbuild runner with all the targets that are found in the projects groupproj xml.

Comment actions Permalink

Hello Nick,

Did you run command on the same machine as the TeamCity agent and under the same user? Please follow all the steps described in this doc section.

If the reason is not clear, then please attach all the build step settings, the build log, all agent logs covering the build, the command you used in the console to run the build and the full console output of the build.

Comment actions Permalink


try to create a step before the MSBUILD using the command line option and enter this as the script:

"C:\Program Files (x86)\Embarcadero\Studio\18.0\bin\rsvars.bat"

The above (18.0) is for D10.1 Berlin. You may need to change the path depending on the version of Delphi you have.

This will load all the environmental variables for Delphi and hopefully MSBUILD will be able to find the VCL libraries.



Please sign in to leave a comment.