TeamCity Automatically Adding anycpu32bitpreferred

Hello, I have a VS2013 .NET 4.5 console application that is being built with Teamcity.
When I build the Release configuration locally and run it, it correctly runs as a 64bit application.
When I build it with Teamcity, the /platform:anycpu32bitpreferred is added to the compile line, resulting in the console running as a 32bit application.

I've confirmed in the project file, all solution configurations are set to <Prefer32Bit>false</Prefer32Bit>.

The build step is using MSBuild to build the csproj file. Only configuration and output path variables are being passed to MSBuild. Using Microsoft Build Tools 2013, TooslVersion none, Run Platform x64, Targets Build.

We are using a currently licensed Enterprise version of TeamCity 8.1.4.

How do I get my project to build as expected as 64bit?

Thanks

7 comments
Comment actions Permalink

Hi,

Please turn on debug-all login preset, run build and attach teamcity-agent.log file.

0
Comment actions Permalink

Hi Alina,

I didn't see any difference in the build agent log file between the default logging and debug-all, every line was just an INFO line.
I've sent the log file to teamcity-feedback@jetbrains.com as I did not want to attach it here publicly.

Thanks

0
Comment actions Permalink

Sorry, I've misinformed you. To turn on debug loggin on agent please modify <agent home>/conf/teamcity-agent-log4j.xml. See the comments in the file for enabling DEBUG mode: you will need to increase the value in "<param name="maxBackupIndex"..." node and uncomment "<priority value="DEBUG"/>" nodes into "<category" elements. Please reproduce the issue and send new log to our email.

0
Comment actions Permalink

I've emailed you the correct log file.

0
Comment actions Permalink

Hi Alina,

Any updates on this? Tried changing the platform target/runtimes but haven't been able to get TC to not add the 32bit preferred param.

Thanks,
Matt

0
Comment actions Permalink

Hi,

Sorry for delay. I've created an issue - https://youtrack.jetbrains.com/issue/TW-38152, please watch it for updates.
Also please attach logs of .NET runner while the issue is reproduced (you can attach files securely - visible for JetBrains team only).

0
Comment actions Permalink

Hi, I resolved this issue by adding a new environment variable called Prefer32Bit and settings its value to false.



Attachment(s):
2014-10-20_12-04-12.png
0

Please sign in to leave a comment.