Search code examples
c#androidxamarincross-platformportable-class-library

How to import your existing C# project into a portable class library and use it to reference to android app in visual studios?


I need to import my existing C# project into a portable class library so that i can share the codes to Xamarin.Android or Xamarin.iOS. And is there other alternatives to import your esixting C# project to an Android app?


Solution

  • You need to create a Portable Class Library project instead of regular class library. Have a look in here: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/pcl/introduction_to_portable_class_libraries/

    This post shows how to convert: http://geekswithblogs.net/imilovanovic/archive/2012/08/31/vs2012---how-to-manually-convert-.net-class-library-to.aspx