Fix package for supported iOS/Android/UWP platforms#2378
Conversation
…d and fix Xamarin platform packaging
| <file src="bin/netstandard13/nunit.framework.dll" target="lib\monoandroid" /> | ||
| <file src="bin/netstandard13/nunit.framework.xml" target="lib\monoandroid" /> | ||
| <file src="bin/netstandard13/nunit.framework.dll" target="lib\uap" /> | ||
| <file src="bin/netstandard13/nunit.framework.xml" target="lib\uap" /> |
There was a problem hiding this comment.
A separate UWP dir here isn't strictly necessary, as it would pull in the netstandard1.3 build anyway - but given the problems, I wanted to be explicit about the platforms we wanted to support.
|
This looks good to me. Thread related functionality was always intended to be part of the .NET Standard 1.6 build, not the 1.3 target and it was never available in the PCL which 1.3 replaces, so I think we are okay dropping it, especially since it isn't supported on the platforms that would likely pull in 1.3 anyway. AppVeyor error is the typical .NET 3.5 message pump error. @jnm2 any chance you could look at that? The Travis build failure was another .NET 3.5 threading issue, What is up with .NET 3.5? Both errors look unrelated to me. |
|
New builds kicked off |
|
Merging, based on Robs comments. |
|
Wow Chris, cool! 🎉 |
Fixes #2237
Unfortunately, I think we've been a bit liberal regarding adding new functionality to the .NET Standard builds, and assuming it will be available on all platforms. (Until I started looking in to this issue, I thought that was the POINT of .NET Standard - turns out it's not quite there yet.)
This PR includes a various changes to allow the package to be used on latest Android/iOS/UWP. I've upgraded and tested both the nunit.xamarin Android and UWP projects as a test. iOS I'm not set up to test, however NUnit 3.7.1 wasn't restoring in the same manner as the Android platform, so I assume the same fix applies. (NuGet now restores the package successfully, which it didn't previously.)
The first part of the issue, is that System.Runtime.Loader is available for .NET Standard 1.6, but not available on Android/iOS. To combat this, I altered the NuGet package to use the .NET Standard 1.3 build for these platforms, which doesn't have the System.Runtime.Loader dependency.
The next issue was that UWP doesn't support the System.Threading.Thread API, which was a dependency of NUnit's .NET Standard 1.3 build. Rather than create an entirely new build solely for UWP - I just removed the System.Threading.Thread dependency from .NET Standard 1.3. This is technically a breaking change - however given the build already wasn't working on the main platform we expect people to use the .NET Standard 1.3 build on - I don't think that's too much of a concern.
It would be good if we could test this stuff in CI. I had a quick experiment with the project.json, but couldn't get the build to fail - I don't have much more time to look in to that before the 3.8 release, so wanted to push this as is.