↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Part 8 - Sharing Code Options | xamarin

The page compares four ways to share C# source files across iOS, Android, and Windows Phone projects. It says file linking, linked library projects, cloned project files, and Microsoft’s Project Linker all support shared code, but each method differs in setup, directory layout, and how much manual synchronization is needed.

Reading notes
#

  • File linking lets each app project point to the same source files in a separate directory.
  • Shared files can be edited once and used by all linked projects, but added, moved, or deleted files must be updated by hand everywhere.
  • Visual Studio requires choosing Add As Link; otherwise it copies the file into the target project.
  • Xamarin Studio can detect files outside the project directory and offer to add them as links.
  • File linking works for all platforms and can be split into separate library projects for larger apps.
  • Linked projects need empty folder structures on disk so the linked paths exist.
  • Cloned project files keep the shared files in the same directory as the project files and use direct file references instead of links.
  • Cloned projects also require manual updates when files change, but Xamarin Studio can re-add a folder tree more easily.
  • Microsoft’s Project Linker can synchronize multiple project files automatically, but Xamarin does not officially support it.
  • The summary says Portable Class Libraries are the simplest option, while file linking and cloned project files are simpler to create but need constant manual intervention.