Can't reference PCL library within Xamarin Studio - xamarin

I'm trying to build an Android and iOS app with Xamarin using a shared PCL library. I'm following the tutorial on the Xamarin website [1].
I have created my PCL solution, which currently doesn't do anything, and I'm now trying to reference it from another Android solution.
The documentation indicates I should use References and then select Projects. However, when I do this, I can't either see or find a way to add my PCL library project as a reference.
How can I add my PCL library solution as a reference in another solution?
[1] http://developer.xamarin.com/guides/cross-platform/application_fundamentals/pcl/introduction_to_portable_class_libraries/#Using_PCL

A solution is just a container for one or more projects. One project can be included in multiple solutions. By including multiple projects in one solution you can reference them from one another, which will allow them to automatically build/update their dependencies when needed. You can add a new project to an existing solution by doing "Add New Project" in the solution explorer - you don't have to create a complete new solution for each project.

Related

Plugins and Sandboxing - Add reference to another project in solution

I have a plugin assembly I have registered to D365 CDS(cloud) and it runs fine.
I want to reference and use some classes in a separate project included in my solution in Visual Studio.
Adding the project as a reference will give File Not Found exceptions. I am able to add the individual classes using the Add Existing Item - Add Link option, but I would like to do it as a whole project reference instead of individual links. Is that possible without using ILMerge and how would I accomplish that?
As I mentioned in my comment, I create a SharedProject in Visual Studio (2017). I put all my Business Logic into this Project (or Projects).
Then I can have a "Workflow" and a "UnitTest" project that each refer to that Shared Project.
More Info

Is it possible to share code between Xamarin.Forms projects?

My team has built a Xamarin.Forms application using VS2017. We are using a Shared project because one of our core functionalities requires ESRI mapping, and ArcGIS Runtime for Xamarin does not support anything but Shared projects at this time.
The next app that my boss wants should be fairly quick to develop if I can use the existing code we've already written for the first app. However, I don't see any way that I can reference that code from another project. I have tried adding a new UWP project to the existing one, but then I have to add all the same NuGet packages, 90% of which are unnecessary to this new project. On top of that, it won't actually compile correctly since the App.xaml is different.
I've searched all over trying to find a solution to this, and haven't come up with anything. PCL is not an option, nor is .NET Standard. Is there any way to accomplish this?

Xamarin.Forms .NET Standard confusing references

I've created two different Xamarin.Forms solutions from templates. The first one is created with Prism template pack (version 2.0.5) the other one is created with the built-in Xamarin template that comes with Visual Studio 2017 (15.5.0 Preview). Both solutions utilize .net standard 2.0 and build fine on all three platforms. Now to the confusing part. As seen in this image:
the Android-project references of the two solutions is quite different. Why don't the first project need all the references of that the second do?
Because the Prism Template Pack is using the CopyNuGetImplementations feature of NuGet. This means that your projects do not need to add the references again. They will automatically get any NuGet references you have added to the main XF project. Much easier to manage.

Adding System.Data.SQLite through NuGet doesn't add a reference to the project

I'm trying to make a very simple Xamarin.Forms test application to explore some features of the System.Data.SQLite package (namely encryption). However, I can't seem to get Visual Studio 2012 to add a reference to the package to the project.
Here are the steps I am taking:
Created a new Xamarin.Forms Portable blank app.
Right-click on TestApp (core project) and select Manage NuGet Packages
Search for "sqlite"
Install the "System.Data.SQLite (x86/x64)" package. (This package is version 1.0.97.0 and it is described as "the official SQLite database engine for both x86 and x64 along with the ADO.NET provider.")
According to NuGet, the package was successfully installed.
However, I cannot see the reference added under my project's "References" folder, and I also cannot write "using System.Data.SQLite" without errors ("cannot resolve symbol 'Data'"). Does anyone have any idea why this is happening?
On a side note, I can follow the exact same process described above except instead of creating a Xamarin.Forms Portable blank app, I choose a regular C# console app. This allows me to install the NuGet package fine and it shows up in references as expected.
Posting an update to share what I've learned.
So as Jason sort of alluded to in his answer, the reason I was not able to reference the package in my Xamarin.Forms project is because Xamarin.Forms is, by definition, a PCL project. It's meant to work on all platforms. The package I was referring to in my question is not a PCL, which means that anything in the package that is platform dependent is inaccessable (which is basically the entire package). The SQLite.Net-PCL package is basically the same thing as System.Data.SQLite, but in PCL form, which means it is compatible for use in a Xamarin.Forms project.
Following this logic, it makes sense that I was able to access System.Data.SQLite from a console project, since a console project is not a PCL project and it targets a specific platform.
For PCL projects, use SQLite.Net-PCL.

Xcode's feature similar to Visual Studio's add reference?

I asked about debugging dylib in Xcode in this post. For Visual Studio, I can use the 'Add New Reference' in Property pages to assign a dynamic library project from the project that uses the library. And, I can put all the project in one single solution file, and make the project as 'Startup Project'. I just set breakpoints and run to debug the dynamic library.
Can Xcode do the similar/same thing?
Can Xcode have two or more projects in one something like VS2010's solution file?
Does Xcode provide something like referencing project to debug dynamic library?
Can Xcode have two or more projects in one something like VS2010's solution file?
You can include an Xcode project in another Xcode project. Just use the Add Existing File action to add it. Then you can reference any of the included project's build products.

Resources