Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between xamarin component and reference?

I'm from .net, so I understand what's a reference of a .net project, and I know how to use Nuget to udpate it.

But in Xamarin, there is another folder called component, and I can add more component. I found that if some component is added into the project then some reference packages will be added when the project is build.

Can I understand that component is another way to add reference? If I add reference manually (not by adding component), so there are packages in reference but empty in component folder, will the project compiles as well?

like image 349
Felix Avatar asked Sep 10 '16 16:09

Felix


1 Answers

Xamarin Components are similar to NuGet packages since they can include assemblies which are referenced by your project when the component is installed.

However a Xamarin Component will also include sample projects and documentation which a NuGet package generally does not.

A Xamarin Component can also install a NuGet package instead of including assemblies.

So a Xamarin Component generally made up of:

  • One or more assemblies targeting one or more platforms, such as Android or iOS.
  • Code samples showing how the component can be used.
  • NuGet package dependencies which can optionally be used instead of including assemblies directly in the component.
like image 67
Matt Ward Avatar answered Nov 03 '22 00:11

Matt Ward