Open elevine opened 8 years ago
Hi elevine and apologies for the excessively delayed response, I did not have any notifications turned on for this project, and no one pinged me. Both Castle.Core and Foq use code generation via Reflection.Emit, I think this is likely to be problematic on Android which I believe doesn't permit code generation. P.S. sorry for the confusion on project location, the project started on CodePlex but has been migrated to GH. If an issue is raised on CodePlex I fix it there and copy the change over to GH, and vice versa. The Nuget packages are generated from the CodePlex version so the last update is likely to be on CodePlex.
Hi @ptrelford - I've sinced moved onto another job and I'm not currently working on any .Net or Xamarin stuff. However, we did mange to get Castle.Core and Moq working on Android while I was still there. Here are the forks if you are interested:
If I am remembering correctly, Reflection.Emit is supported for Xamarin Android (but not iOS as far as I know).
Mocking libraries for Xamarin Android are an unfulfilled niche, and Foq seemed like it wasn't far from being able to meet that need. It might be worth considering for your roadmap.
Hello, Do you have plans to implement .net standard?
Thank you Jonathan
Currently, there are few options for mocking/faking libraries that can run on Xamarin Android. Most libraries like moq and fakeiteasy rely on Castle.Core, which does not have a build for Xamarin Android. Since Foq does not have this dependency, it seems like it has a good chance to work for that platform
I hacked up something quick, and was able to get Foq and the C# tests to run on Xamarin. The issues I encountered were that LinqTests.TestSetupFuncWithReturnsLambda failed with an exception related to bad IL code (seems to be a Mono problem) and Microsoft.FSharp.Control does not seem to be available for Xamarin. I encountered a few more failures running the F# tests on Mono too.
This brings me to my questions: