2

I'm attempting to build an Unreal project on TeamCity. I have a build step failing at .NET running msbuild (cross-platform MSBuild). The configuration is Development Editor. Error:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\Microsoft.Cpp.InvalidPlatform.Targets(22,7): error MSB8007: The Platform for project '<project-file>.vcxproj' is invalid.  Platform='arm64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project.

When building locally the Platform is Win64 (I think). But I dont know how to set this when building through TeamCity?

Stu456
  • 51
  • 1
  • 7
  • Is the agent you're building it on also Windows or is it Linux based? Not too familiar with `msbuild` exactly but I'd start by trying to make your local build similar to how it'd be built in TeamCity. This guide may also be helpful: https://learn.microsoft.com/en-us/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2022 – Troy Poulter Nov 27 '21 at 02:47
  • Duplicate of: https://stackoverflow.com/questions/3155492/how-do-i-specify-the-platform-for-msbuild – sxleixer Nov 27 '21 at 09:19

1 Answers1

1

This can be set at the .NET build step in Teamcity. There is a field for Command Line Parameters in which you can include

/p:Platform="<platform>" 
Stu456
  • 51
  • 1
  • 7