Bug with manifest generation in C++ build

It seems that the manifest step is not running due to a path issue (??), but I am not sure.
It is easily reproducable, just need an MFC App from the MSVC wizard, and build the solution file in teamcity.

Note that building the solution file using cmd line and msbuild from the same directory in the build server works fine.

Log file is attached.
C:\Program : general error c1010070: Failed to load and parse the manifest.

Is that a bug that I should report or am I missing something ?

Comment actions Permalink

Hi Christos,

Could you please try to run the same build via command line on the agent machine (in the checkout directory) under the same user that the agent running? Please follow the instructions from the corresponding documentation section.

Comment actions Permalink

I've tried many many things.
Here are a few of them

Logged in remotely to the machine and was able to build it from
1) cmd line using msbuild
2) Visual studio
3) cmd line and msbuild as the system user (used microsoft psexec to make myself the System user)

What I tried and did not work
Through Teamcity Cmd Line Script
1) Run a .bat script that calls vcvarsall.bat followed by msbuild
2) Powershell script that calls cmd \c same as before
3) Powershell script that calls Start-Process for the same .bat script

Through Teamcity Powershell
1) Run function that calls msbuild.

They all failed with the same error.

If I disable manifest generation all is good.
In the same server we got about 10 other C++ projects building fine and that is the first time that I run into an issue.

I've also checked https://confluence.jetbrains.com/display/TCD9/Visual+C+Build+Issues
But as I said I never had issue with compiling anything else.

Edit :
I've also tried
1) Using  devenv.exe etc...
2) Oin the teamcity cmd line script win
call "%%VS140COMNTOOLS%%..\..\VC\vcvarsall.bat" amd64
msbuild ****.sln /t:ReBuild /property:Configuration=Release;Platform=x64 /m

Comment actions Permalink

I've changed the build agent service to run under my own user account and the build still fails from teamcity

Comment actions Permalink

Thank you for details. Could you please:

  1. Configure MSBuild build step in TeamCity, run it, attach the screenshot of build step settings and full build log
  2. Configure CommandLine build step in TeamCity, look up the command line used by TeamCity in the build log. Attach the command used and the resulted build log
  3. Run the build via console (not using TeamCity). Post the command you used and the full console output of the build.
Also please attach agent logs covering the builds.
Sorry for the inconvenience.
Comment actions Permalink

As I said the issue is reproduced easily with just the default MFC app from wizard (MSVC 2015), so this is what I am using here.
Not the the build fails only if in MSVC Configuration Properties -> Linker -> Manifest -> Generate Manifest is set to Yes

Numbering is the same as your per your post

1)  An interesting thing about building MSBuild build step in TeamCity is that in the build agent folder "C:\Program Files (x86)\TeamCity\buildAgent\temp\buildTmp" there is a file
"lnk{CB028CEB-FB56-4532-AD1B-2E1BC6C992E9}.tmp" which is the manifest file that should be created
Attaching that as well. All files related to this are inside 1.zip

2) Not sure if that is exactly what you are after but this is the command I used
"C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe" test_manifest.sln /t:ReBuild /property:Configuration=Release;Platform=x64 /m
Similarly there is a lnk{79F9BB6C-2B9A-4D28-808A-9D9FE6FBF4C6}.tmp generated in the buildTmp Folder
Build file has been prefixed with 2_

3) Commands used
cd C:\BuildServer\e9e58f1f266b9d5e
"C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe" test_manifest.sln /t:ReBuild /property:Configuration=Release;Platform=x64 /m >> cmd_line_log.txt
Build file has been prefixed with 3_

I should also add that I run the cmd line as with the same user as the service as well and there were no issues
psexec -i -s cmd.exe
nt authority\system


Please sign in to leave a comment.