I found that I had a similar situation (but using TeamCity as a CI environment). In my particular case, the project was a command line application. To solve this problem, I had to manually edit the project file.
Find the following lines:
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
Change the second line to:
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Find other platform-related strings in the project file and modify them. Example:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
becomes:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
My suspicion is that our build servers are 64-bit, and the Console Application project type in Studio will not allow you to make the project suitable for the AnyCPU platform ...
After these changes, TeamCity had no problems with my build script.
source share