I've got a xamarin project structure like this:
- Common [PCL - Profile78 4.5]
- Common.Tests [Mono/.Net 4.5]
- Android [Xamarin.Android]
I've got a class in the PCL project that makes use of the Regex engine, all of it's tests on the Common.Tests project fail due to NullReferenceExceptions being thrown but the class being tested works wonderfully on the Android project. Researching on this i found that the Regex#Match function is always returning null, even for a pattern like .*.
I checked out the DLLs the XBuild engine was copying to the output folder of the project and found out they are exact duplicates of the reference assemblies. Running ILSpy over those DLLs revealed they return null or default values on all functions, just like the "Reference assemblies" name would suggest.
Now, how do i fix this? Am i forced to use an Android unit test project?. I am pretty sure those unit tests succeeded at least once so the correct replacement DLLs are being copied to their respective places sometimes. (The feature is manifesting itself like a bug, maybe?)
Aucun commentaire:
Enregistrer un commentaire