MSBuild error in Cpp.Targets that searches for "True.dpr" with new XE4 project

I am encountering some odd msbuild errors with a project in RAD Studio XE4 and I am looking for help to diagnose what is happening. I have met this for a couple of weeks, but I have not been able to solve it - time to ask more broadly. Symptoms

  • With a project that was created and launched from the IDE, msbuild Project.cbproj works
  • Running msbuild Project.cbproj /t:Clean works and removes the intermediate files in order. When viewing the output visually, unusual files that are deleted are not displayed - only .obj files, linker status files, destination EXE, etc.
  • But running msbuild Project.cbproj /t:Build or just just msbuild Project.cbproj after cleaning or with a clean check failed with the following error message:

Microsoft (R) Build Engine Version 3.5.30729.5420 [Microsoft.NET Framework, version 2.0.50727.5472] Copyright (C) Microsoft Corporation 2007. All rights reserved.

The assembly began on 09/12/2013 10:35:03. project "C: \ projects \ Project.cbproj" on node 0 (default goals).

_PasDepCheck: Changed: Source \ Common \ resample.pas _PasCoreCompile: Embarcadero Delphi for Win32 compiler version 25.0 Copyright (c) 1983,2013 Embarcadero Technologies, Inc. C: \ Program Files (x86) \ Embarcadero \ RAD Studio \ 11.0 \ Bin \ CodeGear.Cpp.Targets (191 1.5): error F1026: File not found: "True.dpr" Done Building Project "C: \ projects \ Project.cbproj "(default goals) - FAILED.

Assembly FAILED.

"C: \ projects \ Project.cbproj" (default target) (1) → (_PasCoreCompile target) → C: \ Program Files (x86) \ Embarcadero \ RAD Studio \ 11.0 \ Bin \ CodeGear.Cpp.Targets (1 911 , 5): error F1026: file not found: "True.dpr"

 0 Warning(s) 1 Error(s) 

Some things amaze me about this:

  • It lists two .Net versions at the top, the older one in square brackets. Can there be loading or using parts of two frameworks?
  • True.dpr does not exist, and I cannot find a manual entry that looks for the True.dpr file for True.dpr or for a True entry that looks (to me) as if it might be misinterpreted as the project name. (If you are not familiar with Delphi, the .dpr file is an old-fashioned project file - it contains an entry point. Building may mean that msbuild is finding the source or project somewhere. "True" seems to me. The cbproj file is misinterpreted or corrupted, but it's brand new, so it shouldn’t be, and it works from the IDE.)

Other information about the system and projects:

  • The project is updated with RAD Studio 2010. However, the project file was created in XE4 from scratch, i.e. it is completely new by creating a new project in the IDE and adding existing blocks (Delphi and C ++ files).
  • A project is a C ++ project with one or two Delphi elements. You can see that it crashes when compiling a Delphi block at the beginning of compilation. For those who are not familiar with mixing C ++ and Delphi, as a rule, in projects with mixed sources, the IDE or msbuild first compiled Delphi blocks (this can create / update C ++ headers to interact with Delphi code.)
  • The project is one of the groups, but should be autonomous.
  • I have RAD Studio XE4 installed with Update 1.
  • msbuild launched from the command line of RAD Studio XE4, i.e. using the rsvars.bat file to configure paths, etc.
  • In the above view, I changed my current project name to Project because I don't want to identify it. However, the rest of the output is accurate.

Any ideas? I’ve been trying to solve it for ages, and I'm at a standstill.

+5
source share
3 answers

I had the same error in Delphi XE5. Running MSBUILD with /v:diag displays the full command line for DCC32, in which among the parameters there are rogue true .

The next page pointed to the solution: http://wiert.me/2013/11/20/when-the-delphi-xe5-commandline-compiler-fails-with/

In this case, I passed the /p:DCC_DebugInformation=true option /p:DCC_DebugInformation=true , but it could also be in the .dproj file. Changing true to 2 fixed the problem - i.e.

 MSBBUILD /p:DCC_DebugInformation=2 project.dproj 
+9
source

Answering my own question, in the hope, it will be useful to future readers.

This comment was key:

It lists two .Net versions at the top, the older squared brackets. Is it possible to load or use parts of two frameworks?

After all, this was not the name of the project. Instead, we had our own build log written for use with the msbuild version shipped with RS2010. It was built with a different version of .Net, and loading the log log dll caused serious problems inside msbuild - understandably, as I assume it meant loading two different versions of the .NET environment.

Why this answer may not be correct: I tried command lines without a custom logger (slowly tidying up our old working command lines in half and then working again to find the problem.) Those who sans-logger builds also failed, which leaves me a little puzzled . Perhaps some intermediate output from the failed msbuild instance has confused subsequent runs, or something in the .Net runtime has cached the use of DLLs or different loaded runtimes. I know that the user logger really caused problems and deleted the DLL itself (namely, when everything really started working), and also just deleted it from the command line, fixing the problem.

0
source

An answer similar to @ michael-g's answer using only the graphical interface can be found at this link: https://blog.spreendigital.de/2014/03/14/w1030_warning_xe5/

(that is, go to the Delphi debug settings and change the "Debug information" to something other than the existing "True".

0
source

Source: https://habr.com/ru/post/1501764/


All Articles