We are starting a cross-platform project to be deployed to Android and iOS. Obviously, a lot of code is to be shared between the two, and some of the code relies heavily on the .NET framework items, like sqlite-net library does.
The best way (afaik) to share the code between 2 projects is to use a PCL – this way it is possible to reference the project with shared code from both iOS and Android projects in a solution and have everything re-compiled and linked in a nice manner.
However, a PCL created in MonoDevelop is compiled with gmcs compiler and some of external dependencies fail to be built in this case (i.e. the framework used in this case lacks System.Func<T, TResult>
, providing only System.Func<T1, T2, ..., T9, TResult>
). MonoTouch's compiler (smcs), in its turn, is able to compile the PCL perfectly (proven by replacing gmcs binary with smcs binary). From what I've found after a bit of googling, gmcs uses 2.0 .NET framework, while smcs uses smth called 2.1 framework, which is in fact a cutted mixture of more recent .NETs.
Here comes the question: is it possible to specify which compiler to use while building PCL (as a dependency of another project) in MonoDevelop?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…