xamarin-macios/tests/xammac_tests
monojenkins daf5006281 [d16-2] [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6035)
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.

Fixes https://github.com/mono/mono/issues/13483 :

```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```

* [msbuild] Implement the same fix for XM projects as well.

* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.

We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.

Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         #1
      Expected: 6
      But was:  7

we now print:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         References
      Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
      But was:  < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >

* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.

The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).

The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.

So modify the test to verify that there's no System.Drawing.dll in the final
bundle.

* Remove workarounds for mono/mono#13483.

* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.

* [msbuild] Adjust variable name and boolean logic according to review.
2019-05-10 16:16:01 +02:00
..
Entitlements.plist Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
Info.plist Mono 2018-08 requires macOS 10.9+, so Xamarin.Mac must as well. 2018-10-25 09:54:43 +02:00
xammac_tests.csproj [d16-2] [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6035) 2019-05-10 16:16:01 +02:00