Search code examples
xamarinxamarin.iosmonomonodevelopxamarin-studio

Run C# in .Net and iOS in Xamarin or Mono


For last few days I was looking for a solution, to have one C# code, that could be run in two existing projects (Windows Desktop WPF and iOS application). I wish I could build 2 libraries, one for iOS and one for .NET, with one C# code. Is it possible in Xamarin or Mono? I made some research and it looks like there is no such project type in Xamarin, that I could build a library. So Xamarin libraries can be included only in Xamarin.iOS (C#) projects :(. Is that true? Than I moved to mono, but it looks like there is no mono without Xamarin. Monodevelop no longer exists, but there is Xamarin Studio with the same story. Summarizing, is there any way to run one C# code (as a library) in iOS and .NET application? enter image description here


Solution

  • After more research, now I know the answer. One can not run C# code (as a library) in native iOS and .NET application in Xamarin (possible only when iOS app is build in Xamarin, but this is not the case). But... it is possible in Mono. Using monolib you can run C# code in C app.