Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xabuild] Improve Configuration detection (#671)
`xabuild` determines the xamarin-android installation prefix by looking at the `bin/Debug` and `bin/Release` directories, in that specific order. If one wants to build a project in the `Release` configuration and both `bin/Debug` and `bin/Release` are present, `xabuild` will use `bin/Debug` as the prefix regardless of the configuration passed to `{ms,x}build` with `/p:Configuration=Name`. Your project will still be built in the specified configuration but xamarin-android assemblies/etc. will come from the `Debug` build -- probably not the desired outcome. To work around it you would need to invoke `xabuild` as follows: CONFIGURATION=Release xabuild /p:Configuration=Release my.csproj which is unnecessarily verbose. This commit makes `xabuild` slightly smarter by making it understand the `/p:Configuration` parameter and extracting the configuration name from it and setting `CONFIGURATION` to this value for you. This is done *only* if `CONFIGURATION` is not set when invoking `xabuild`
- Loading branch information