xamarin-macios/msbuild
monojenkins 684642a926 [xcode11] [msbuild][xm][xi] Fix building with netstandard libraries (#6959)
* [msbuild] Use task assembly path via a property

Xamarin.Mac.Common.ImplicitFacade.msbuild.targets: $(_NETBuildExtensionsTaskAssembly)

* [msbuild] Fix path to NET.Build.Extensions task assembly

.. which is no longer available for `net46`. Instead use the latest
`net472` path.

The incorrect path effectively disabled the `GetDependsOnNETStandard`
task, causing the issue.

Partially fixes https://github.com/xamarin/xamarin-macios/issues/6552 .

* [msbuild] Fix XM builds which use netstandard libraries.

`Xamarin.Mac.Common.ImplicitFacade.msbuild.targets`:

`ImplicitlyExpandDesignTimeFacades` adds a reference to `netstandard.dll`
by expanding the facades, if any of the references depend on it. Usually,
this gets handled by msbuild SDKs but in case of XM, this doesn't happen
in all cases. So, we need to scan the references for a `netstandard`
dependency.

The `ResolveAssemblyReference` task does this for us and populates
`$(_DependsOnNETStandard)` property. If it does not, then we use
`GetDependsOnNETStandard` task to get the same information.

Issue:
- the target incorrectly uses `$(DependsOnNETStandard)` instead of
  `($_DependsOnNETStandard)`.
- Fixing that means that condition `$(_DependsOnNETStandard) == ''` fails
  whenever `ResolveAssemblyReference` task runs (setting the property
  to `true` or `false`), causing `$(XM_DependsOnNETStandard)` to be unset.
    - thus failing the following logic to expand the facades when `$(_DependsOnNETStandard) == true`

So, we use the `$(_DependsOnNETStandard)` as the default value for
`$(XM_DependsOnNETStandard)`, so that it is correctly set to `true`,
irrespective of how we got that information, allowing us to correctly
expand facades when required.

Partially fixes https://github.com/xamarin/xamarin-macios/issues/6552 .

* [msbuild] Fix XI builds which use netstandard libraries.

`Xamarin.iOS.Common.targets`:

Issue:
- the target incorrectly uses `$(DependsOnNETStandard)` instead of
`($_DependsOnNETStandard)`.
- Fixing that means that condition `$(_DependsOnNETStandard) == ''` fails
whenever `ResolveAssemblyReference` task runs (setting the property
to `true` or `false`), causing `$(XI_DependsOnNETStandard)` to be unset.
- thus failing the following logic to expand the facades when `$(_DependsOnNETStandard) == true`

So, we use the `$(_DependsOnNETStandard)` as the default value for
`$(XI_DependsOnNETStandard)`, so that it is correctly set to `true`,
irrespective of how we got that information, allowing us to correctly
expand facades when required.

Prompted by: https://github.com/xamarin/xamarin-macios/issues/6552
2019-09-10 22:58:24 -07:00
..
Xamarin.Mac.Tasks [xcode11] [msbuild][xm][xi] Fix building with netstandard libraries (#6959) 2019-09-10 22:58:24 -07:00
Xamarin.Mac.Tasks.Core [vsts-938452] Clean up file names and indentations 2019-08-07 16:09:58 -04:00
Xamarin.MacDev.Tasks [msbuild] Update xbuild assembly references to msbuild ones 2018-05-22 13:26:55 -04:00
Xamarin.MacDev.Tasks.Core [msbuild] Improve altool task by logging execution errors (#6815) 2019-08-23 08:38:08 -07:00
Xamarin.ObjcBinding.Tasks [msbuild] Remove support for XI/Classic. (#976) 2016-10-13 10:47:46 +02:00
Xamarin.Shared [d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279) (#6361) 2019-06-19 17:28:01 +02:00
Xamarin.iOS.Tasks [vsts-938452] Clean up file names and indentations 2019-08-07 16:09:58 -04:00
Xamarin.iOS.Tasks.Core [xcode11] [msbuild][xm][xi] Fix building with netstandard libraries (#6959) 2019-09-10 22:58:24 -07:00
tests [msbuild] Disable broken iOS msbuild tests (#6971) 2019-09-11 01:03:11 -04:00
.editorconfig Provide .editorconfig support for easier contributor formatting 2016-06-13 00:43:37 -03:00
.gitignore [builds] Improve mono/llvm dependencies. (#1948) 2017-03-31 20:23:38 +02:00
Makefile [xm][msbuild] Fix full profile FrameworkList file (#5674) 2019-02-27 12:38:38 -05:00
Xamarin.MacDev.Tasks.sln [msbuild] Added support for building CoreML models (#2714) 2017-11-28 11:16:44 -05:00