I have a Windows server running Jenkins where I'm building Android and iOS applications (mac agent). I prefer to build the csproj as we only have one solution file for both platforms.
I'm using the latest Visual Studio 2017 along with the most up-to-date msbuild.
What I'm seeing is that when I specify configuration and platform at the command line, it's not actually using the configuration defined in the csproj file, nor does it throw any sort of error whether the configuration is correct or not. It simply uses the Default configuration regardless of what I tell it to use.
Here is what my build looks like for iOS:
msbuild name.of.csproj /p:Configuration=Debug /p:Platform=iPhone /p:ServerAddress=x.y.z /p:ServerUser=user /p:ServerPassword=pass
Within the name.of.csproj file there is a configuration specified for Debug | iPhone complete with various settings like OutputPath, BuildIpa, etc.
What I'm seeing is that it defaults to the default Debug|AnyCPU regardless of what config/platform I want. Even trying Release it still uses Debug/AnyCPU.
I'm able to successfully build and deploy an IPA to an iPhone when I specify all of the extra parameters in the command line.
Why doesn't the command pick up the correct configuration? I used to build this way with vs2015 with a previous app and it worked.
Anyone have any idea as to why it wouldn't pick up the correct configuration in the csproj when I specify it in msbuild?