Old-fashioned-dev
Old-fashioned-dev

Reputation: 425

Xamarin Cross-Platform Project

What is the difference between choosing a Cross-Platform Project (for example Shared) and add to a solution single Android and iPhone Project and a Shared Project?

Thank you!

Upvotes: 0

Views: 84

Answers (3)

PCL, it is the way, the truth, and the light. Friends don’t let friends use shared projects.

Okay so thats a bit strong but in general if you don’t know what you should do, go PCL. If you have a strong reason to use a shared project, sure, but otherwise go PCL, your lack of #ifdef and spaghetti code will thank me later. Among other things, PCL will ensure that code you write is going to be portable not just to all current platforms, but any future platforms we might support as well.

///////////////////////////////////////////////////////////////////////////////

Extra information for you. PCL vs Shared

Upvotes: 0

Sven-Michael Stübe
Sven-Michael Stübe

Reputation: 14750

There is no difference, except it saves some time. The templates in Cross-Platform are multi-project templates. It's just an easy way of creating a Xamarin solution with 2 clicks. Creating the projects one by one, gives you more control over the naming and such stuff.

Upvotes: 3

MohamedHamza
MohamedHamza

Reputation: 205

There are two options for sharing code between cross-platform mobile applications: Shared Asset Projects and Portable Class Libraries. These options are discussed here; more information on Portable Class Libraries and Shared Projects is also available.

Upvotes: 0

Related Questions