MSBuild does not work anymore with Tokyo
Asked Answered
D

1

2

I have multiple project groups that I want to compile at batch. There are over 100 projects in there.

In 2010 we had a "make" file like this:

call "c:\Borland\RAD Studio\19.0\bin\rsvars.bat"
"c:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" /t:Clean,Build  Group1.groupproj 

Under Tokyo it does not work anymore. I get:

C:\Borland\RAD Studio\19.0\Bin\CodeGear.Cpp.Targets(3695,5): error : Error: Unable to open file 'L_ER_FD.RES' [P:\Ent\_common\er\prj\l_er_fd.cbproj]

However, the project group compiles just fine from IDE.
We think it is related to the creation of the .vres file (from .rc) which are create in memory by the IDE and never written to file.

Notes:
- I tried this from C++ Builder Tokyo but I guess it happens also under Delphi. I will test that soon.
- I have MSBuild v12.

Duodecillion answered 13/7, 2018 at 13:33 Comment(1)
Any updates on this? I have the same problem.Audubon
C
2

I had the same problem and I managed to get around it. So I had the following script on older version of Rad Studio and it was working:

call rsvars.bat
call msbuild Utils25.cbproj /t:Clean;Build /p:Configuration=Release /p:platform=Win32 > result.err

but on Rad Studio 10.2.3 this was producing me a linking error like yours. After a lot of testing I found that if you do clean and build on separate msbuild calls it works as expected. So the following works:

call rsvars.bat
call msbuild Utils25.cbproj /t:Clean /p:Configuration=Release /p:platform=Win32 > clean.err
call msbuild Utils25.cbproj /t:Build /p:Configuration=Release /p:platform=Win32 > build.err
Cumine answered 13/2, 2019 at 15:12 Comment(1)
This still applies to RAD Studio 10.4.1 and your workaround helped - thanks!Carnivorous

© 2022 - 2024 — McMap. All rights reserved.