Fixes https://github.com/mono/mono/issues/10602 .
From the issue:
```
We need to enable this to support the system assemblies conflict
resolution which we now rely on for any new packages to enhance
developers experience and get us out of dependency on specific package
versions.
```
This is part of PR 2430: avoid duplicating degine constants if they exist. This commit splits the condition and definition of the properties in two, because xbuild doesn't support the regex part in a condition. msbuild does, but we need to support both.
The previous change had the fault of considering __UNIFIED__ANYTHING__ the same as __UNIFIED__ and if a user set that property, then he would lose the other (pointed out by jstedfast in the PR).
This commit fixes that.
In VS the property page for Build will show whatever is in DefineConstants, and then save it. Without this, that means that any time the Build page is saved, it duplicates the constants.
This fixes bug#32765: Bug 32765 - Conditional compilation symbols are duplicated everytime I reload the project or restart visual studio (https://bugzilla.xamarin.com/show_bug.cgi?id=32765)
* [msbuild] Set $(CscDebugFileExt) also, whenever overriding $(CscToolExe)
- This property was introduced in mono's msbuild, but will be upstream
also
- This *must* be set before Microsoft.CSharp.targets file is imported.
- Even though the msbuild targets will automatically select `.mdb` if
the `$(CscToolExe)` is `mcs` or `mcs.exe`, it would be a good
practice to set both the properties together.
- This came up in cases where we use `smcs`, because in that case the
msbuild targets end up using `.pdb`.
* [msbuild] Set `$(CscDebugFileExt)` == `.mdb`
Xamarin.ObjcBinding.CSharp.targets: Set the debug file extension also,
since we are overriding the compiler via `$(CscToolExe)`. Also, move
the property definition around to ensure that they are set *before*
importing `Microsoft.CSharp.targets`.