xamarin-macios/tests/mmptest
Rolf Bjarne Kvinge a619226b36
[msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512)
* [msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237.

In Xamarin.iOS.Common.targets, just before the _CompileToNative target, we
modify the mtouch references to ensure that we get the lib assemblies for
nugets, and not the ref references:

9e31d07ecc/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets (L784-L791)

This logic removes nuget references, and then re-adds any copy-local dll
references.

This works fine in executable projects, but not in library projects (aka
extensions), because nugets aren't copied for library projects:

cf4b0a12cf/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets (L86)

So we need to set the CopyNuGetImplementations variable to 'true' for our
library projects.

Fixes https://github.com/xamarin/xamarin-macios/issues/4235.
Fixes https://github.com/xamarin/xamarin-macios/issues/4237.

* [tests] Redirect MSBuildExtensionsPath to MSBuildExtensionsPathFallbackPathsOverride when running msbuild for package reference tests.

This fixes a problem where nuget restore would fail for projects with
PackageReferences, because a variable would be empty and msbould would try to
write to /:

    nuget restore ../MyAppWithPackageReference/MyAppWithPackageReference.csproj
    MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/'.
    Restoring packages for /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/msbuild/tests/MyAppWithPackageReference/MyAppWithPackageReference.csproj...
    Committing restore...
    Generating MSBuild file /MyAppWithPackageReference.csproj.nuget.g.props.
    Path / is a directory

This will become unnecessary when PR #4111 is merged.

* Add Xamarin.Mac test showing that fix is not needed (?!?)

* Add AppExtension test with packagereference

* Make extension actually have json code generated

* Fix ProjectTypeGuids of checked in extension projects, as they were not openable in VSfM

* XM extension test now correctly fails

* Now that we have a failing test, fix XM same as rest of platforms

* Disable XM tests due to msbuild redirect sadness

* Disable iOS tests as well due to #4110

* Disable iOS tests by using the Ignore attribute.

Disable tests by using the Ignore attribute, because just commenting out the
TestCase attributes makes the test fail:

    1) NotRunnable : Xamarin.iOS.Tasks.ProjectReferenceTests.BasicTest
       No suitable constructor was found
2018-08-20 13:43:48 +02:00
..
regression Bump to mono/2018-04 (#3856) 2018-06-27 10:59:59 -04:00
src [msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512) 2018-08-20 13:43:48 +02:00
.gitignore [tests] Import 2016-05-26 15:06:52 +02:00
CustomBuildActions.targets [tests] Fix relative paths in mmptest and make cloned XM nunit projects work properly. (#3464) 2018-02-13 17:19:31 +01:00
Info.plist [tests] Set LSUIElement in the mac tests' Info.plist so that they don't show an icon in the dock. (#329) 2016-06-30 01:01:11 -07:00
Makefile [tests] Convert mmp tests to a standard NUnit test library. (#2067) 2017-05-08 13:20:01 +02:00
mmptest.csproj [msbuild] Set 'CopyNuGetImplementations' to true for app extensions. Fixes #4235 and #4237. (#4512) 2018-08-20 13:43:48 +02:00
packages.config [tests] Convert mmp tests to a standard NUnit test library. (#2067) 2017-05-08 13:20:01 +02:00