Since 2011, .NET developers all around the world have been enjoying a very powerful package manager called NuGet. With more than 500,000 packages and 700 million package installs (and growing), installing components to .NET-based projects have never been easier. Starting from Crosslight 5, now you can also enjoy the same level of convenience, resulting in an even accelerated development experience. This also results to higher maintainability, so if you wish to receive the latest Crosslight assemblies, simply update the NuGet packages and you're all set.
If you're new to NuGet, consult this step-by-step walkthrough on how to work with Crosslight NuGet packages and use them in your existing projects: Walkthrough: Working with Crosslight NuGet Packages.
Before You Start
Please note that NuGet provides only runtime assembly references. For best development experience, it is highly recommended to install the Mobile Studio installer. With the installer, you'll have access to these benefits:
- Create Crosslight projects easily with Crosslight Project Wizard for Visual Studio.
- Create Crosslight files easily using Crosslight Item Templates for Visual Studio and Xamarin Studio on Mac.
- Generate controllers, shared domain models easily with integrated code generators, and deep WebAPI extensions for Visual Studio.
NuGet Benefits
Prior to Crosslight 5, configuring Crosslight assembly references is a series of long, tedious chores. Starting with Crosslight 5, all that has changed. You can now easily add Crosslight references with NuGet package manager.
With NuGet, Crosslight developers will benefit from the following:
- Hassle-free experience in resolving Crosslight references, including additional dependencies.
- Update Crosslight assemblies with just a click of button.
- Auto-resolve packages when opening a solution.
- Apply nightly builds easily a single command line.
Starting Crosslight 5, all of our samples contained in Crosslight Samples project will now take advantage of NuGet package manager by default.
Configure Crosslight NuGet Packages on Mac
This section describes how you can start using Crosslight NuGet packages on Mac with Xamarin Studio.
- Copy and extract the Intersoft.PackageManagement.Extensions.0.1.zip to /Users/(username)/Library/Application Support/XamarinStudio-5.0/LocalInstaller/AddIns/. You can skip this step if you have installed Crosslight using the Mobile Studio 2016 (or newer) installer. You can also verify that this is installed through Xamarin Studio, Add-in Manager.
- Open Xamarin Studio. You should see that a new Intersoft Package Console Extension is installed.
To install Crosslight NuGet Packages to your project, select your project in the window that appears and execute this command.
Here's one such example.
You can find a full list of Crosslight Package IDs in the list at the bottom of this document.- This will install Crosslight to your selected project.
In addition to the standard command above, check out additional commands below.
Configure Crosslight NuGet Packages on Windows
This section describes how you can start using Crosslight NuGet packages on Windows with Visual Studio.
- Right-click on your solution and choose Manage NuGet Packages for Solution.
- In the window that appears, search for the desired Crosslight PackageID. Tick on the projects that you would like to apply the package to, and click Install.
You can find a full list of Crosslight Package IDs in the list at the bottom of this document. - You can monitor the package installation progress from the Output window of Visual Studio.
- When it's finished, you should see this in the Output window.
In addition to the standard command above, check out additional commands below.
Restoring Crosslight Packages
This section describes how you can restore Crosslight NuGet Packages on Mac and Windows.
Mac
On Mac Xamarin Studio, this process is automatic. Once you've opened a solution that has packages.config file in each of the project, it will automatically try to resolve the missing packages for each project, so you might experience a bit of slowdown when opening the solution for the first time. This is normal and the expected result. Here's an example when you open a solution.
After it has finished download the packages, you'll get the following result.
You're now ready to use and run the solution. To reset the restore process, simply delete the packages folder at the root of the application and reopen the solution using Xamarin Studio.
Windows
To restore NuGet packages to an entire solution, simply right-click on the solution and choose Restore NuGet Packages, as follows.
During restore, you'll get the following dialog. Just wait until it has finished restoring all of your packages.
You can now use your solution.
Updating Crosslight Packages
Follow these simple steps to update your Crosslight packages to the latest stable version.
Mac
To update the entire Crosslight packages on your solution, simply right-click on your solution, then choose Update NuGet Packages.
You'll see the following status on the top Xamarin Studio.
You can also inspect the progress update using the Package Console in Xamarin Studio.
When the update is done, you'll get the following message on both Xamarin Studio status bar and Package Console window.
Windows
- To update the entire Crosslight packages on your solution, simply right-click on your solution, then choose Manage NuGet Packages for Solution.
- If there's any updates to any of your packages, the Updates tab will show a notification how many package updates available. Select the packages that you want to update, then click on the Update button.
- You can inspect the progress update from the Output window of Visual Studio.
- Once the update is finished, you'll see the following message in the Output window.
Downgrading Crosslight Packages
According to NuGet documentation:
Mac
On Mac, you would do this by executing the following command:
This will downgrade your existing package to 5.0.5000.481. You'll get the following message in the Intersoft Package Console Extension window.
Windows
On Windows, you would do this by using the Package Manager Console. To access the Package Manager Console, open Tools, NuGet Package Manager and choose Package Manager Console.
Similar to Mac, enter the following command in the Package Manager Console window:
You'll get the following result.
Additional NuGet Commands
In addition to standard commands, there are several additional commands that are both applicable to Mac and Windows that can help you accomplish several tasks with NuGet.
Installing to an Entire Solution
If you wish to install a package to your entire projects, on Mac, you can use this the additional -allProjects option, like so.
At the time this document is produced, the existing NuGet Package Management Extensions (available in the Xamarin Studio Add-in Repository Alpha Channel) does not support the use of -allProjects option, therefore Crosslight 5 ships a repackaged NuGet Package Manager extension to support this feature.
If you haven't installed Crosslight add-in, you can use a more advanced command, but slightly more complex to install Intersoft.Crosslight to all projects.
On Visual Studio, execute this command.
Installing a Pre-release Package
If you wish to install a pre-release version of Crosslight to your entire projects, you can use the -pre option.
Installing a Specific Version
To install a specific version of Crosslight package, use this command.
Please note that when you install a specific, non-stable version of Crosslight package, NuGet won't detect any updates to the package. In the above example, -version 5.0.5000.1-alpha1 is used. NuGet considers the "-alpha1" as a string, and not an integer number, therefore it can't tell if there are updates to that version. However, if you install a specific stable version without the - (dash) in the version string, you can still receive updates. This technique is particularly useful if you wish to install an older version of Crosslight or nightly builds.
Crosslight NuGet Packages List
This section lists the full list of Crosslight NuGet packages published in nuget.org.
In general, Crosslight NuGet packages are categorized into:
- Cross-platform packages. This is kind of packages that can target more than one platform, such as Intersoft.Crosslight, Intersoft.Crosslight.Data, and so on.
- Platform-specific packages. Designated for only certain platform, for instance, Intersoft.Crosslight.Android.v7 can be only installed on Android project.
To identify the kind of the package, please see the Targetable Platforms in list below.
Intersoft.Crosslight Packages
Package ID | Targetable Platforms | Description |
---|---|---|
Intersoft.AppFramework | iOS, Android, Core, WinPhone, Win8 | An advanced application framework designed to make enterprise apps development simple, featuring enterprise data access patterns such as generic repositories, query definitions, user management, authentication, security, push notifications, and more. For the server data access counterpart, please install Intersoft.Data.WebApi.v4 package. |
Intersoft.Crosslight | iOS, Android, Core, WinPhone, Win8, NET 4.5 | Crosslight is an advanced development toolset for building rich cross-platform mobile applications with 100% shared UI logic. Supported platforms include iOS, Android, and Windows. |
Intersoft.Crosslight.Android.v7 | Android | Supercharge your Crosslight.Android apps with 50+ Material components including Collapsible ToolBar, RecycleView with built-in Shared Transition and Swipe gesture, Parallax Header and much more. Supports Android API 21 or higher. |
Intersoft.Crosslight.Data | iOS, Android, Core, WinPhone, Win8, NET 4.5 | Provides essential data components to your Crosslight apps. |
Intersoft.Crosslight.Data.Sqlite | iOS, Android, Core, WinPhone, Win8 | Provides local database access components and offline changes functionality to your Crosslight apps. |
Intersoft.Crosslight.Logging | iOS, Android, Core, WinPhone, Win8, NET 4.5 | Provides powerful yet lightweight logging functionality to your Crosslight apps. Supports all client and server platforms. |
Intersoft.Crosslight.Logging.AzureInsights | iOS, Android, Core, WinPhone, Win8, NET 4.5 | Provides seamless logging integration to Microsoft Azure Insights service, including page view and error logs. Supports all client and server platforms. |
Intersoft.Crosslight.Logging.EntityFramework | NET 4.5 | Provides server logging functionality that use Entity Framework for the storage. |
Intersoft.Crosslight.RestClient | iOS, Android, Core, WinPhone, Win8 | Provides a powerful yet lightweight Rest client to access remote resources in Crosslight apps. |
Intersoft.Crosslight.Services.Auth | iOS, Android, Core, WinPhone, Win8 | Provides various authenticators for user authentication in Crosslight apps, including HttpBasic, NTLM, OAuth, OAuth2, and WebAPI authenticator. |
Intersoft.Crosslight.Services.Barcode | iOS, Android, Core, WinPhone | Provides barcode scanning capabilities to your Crosslight apps. |
Intersoft.Crosslight.Services.ImageLoader | iOS, Android, Core, WinPhone, Win8 | Provides high-performance, async image loading capabilities to your Crosslight apps, featuring smart queue, smooth animation, and various cache options. |
Intersoft.Crosslight.Services.Location | Android | Provides GPS location services for Crosslight development. |
Intersoft.Crosslight.Services.PushNotification | iOS, Android, Core, WinPhone, Win8, NET 4.5 | Provides end-to-end push messaging functionality to your Crosslight apps. Supports iOS, Android and Windows for the client platforms and .NET 4.5 for the server platforms. |
Intersoft.Crosslight.Services.Reporting | iOS, Android, Core, WinPhone, Win8 | Provides report viewer components for Crosslight development, featuring seamless integration with Intersoft ClientUI Reporting Server. |
Intersoft.Crosslight.Services.Social | iOS, Android, Core, WinPhone | Provides extended capabilities to share and authenticate users with social network accounts, including Facebook and Twitter. |
Intersoft.Crosslight.UI | iOS, Android, Core | Provides a multitude of essential UI components for Crosslight development including Calendar, Map, Carousel, Signature Pad, and much more. Supports iOS and Android platforms. |
Intersoft.Crosslight.UI.Android.v7 | Android | Provides UI components tailored specifically for Material Design that works on Android API 21 and above. |
Intersoft.Crosslight.UI.DataVisualization | iOS, Android, Core | Provides a comprehensive charting data visualization suite featuring 12+ series, smooth animations, intuitive pinch-to-zoom, and beautiful modern design. Supports iOS and Android platforms. |
Intersoft.Data.WebApi.v4 | NET 4.5 | Provides powerful data access components to WebAPI server featuring OData 4 extended implementation, view projection technology, two-way data synchronization and seamless integration with Entity Framework. For the client counterpart, please install Intersoft.AppFramework package. |
Crosslight.Xamarin.Android.Support Packages
The entire list of packages works with only Android projects. These packages are re-package of Xamarin's original packages which have been strongly signed. This allows you to conveniently build Crosslight apps without requiring additional effort to sign the required support assemblies.
Package ID | Description |
---|---|
Crosslight.Xamarin.Android.Support.CustomTabs | Signed Xamarin Android Support Library - Custom Tabs assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.Design | Signed Xamarin Android Support Library - Design assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.Percent | Signed Xamarin Android Support Library - Percent assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v4 | Signed Xamarin Android Support Library - v4 assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.AppCompat | Signed Xamarin Android Support Library - v7 AppCompat assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.CardView | Signed Xamarin Android Support Library - v7 CardView assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.GridLayout | Signed Xamarin Android Support Library - v7 GridLayout assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.MediaRouter | Signed Xamarin Android Support Library - v7 MediaRouter assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.Palette | Signed Xamarin Android Support Library - v7 Palette assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.Preference | Signed Xamarin Android Support Library - v7 Preference assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v7.RecyclerView | Signed Xamarin Android Support Library - v7 RecyclerView assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v8.RenderScript | Signed Xamarin Android Support Library - v8 RenderScript assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v13 | Signed Xamarin Android Support Library - v13 assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v14.Preference | Signed Xamarin Android Support Library - v14 Preference assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v17.Leanback | Signed Xamarin Android Support Library - v17 Leanback assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.Android.Support.v17.Preference.Leanback | Signed Xamarin Android Support Library - v17 Preference Leanback assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices Packages
The entire list of packages works with only Android projects. These packages are re-package of Xamarin's original packages which have been strongly signed. This allows you to conveniently build Crosslight apps without requiring additional effort to sign the required support assemblies.
Package ID | Description |
---|---|
Signed Xamarin Google Play Services - Ads assemblies for Intersoft Crosslight. | |
Crosslight.Xamarin.GooglePlayServices.Analytics | Signed Xamarin Google Play Services - Analytics assemblies for Intersoft Crosslight. |
Signed Xamarin Google Play Services - AppIndexing assemblies for Intersoft Crosslight. | |
Crosslight.Xamarin.GooglePlayServices.AppInvite | Signed Xamarin Google Play Services - AppInvite assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Base | Signed Xamarin Google Play Services - Base assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Basement | Signed Xamarin Google Play Services - Basement assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Cast | Signed Xamarin Google Play Services - Cast assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Drive | Signed Xamarin Google Play Services - Drive assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Fitness | Signed Xamarin Google Play Services - Fitness assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Games | Signed Xamarin Google Play Services - Games assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Gcm | Signed Xamarin Google Play Services - Gcm assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Identity | Signed Xamarin Google Play Services - Identity assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Location | Signed Xamarin Google Play Services - Location assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Maps | Signed Xamarin Google Play Services - Maps assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Measurement | Signed Xamarin Google Play Services - Measurement assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Nearby | Signed Xamarin Google Play Services - Nearby assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Panorama | Signed Xamarin Google Play Services - Panorama assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Plus | Signed Xamarin Google Play Services - Plus assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.SafetyNet | Signed Xamarin Google Play Services - Safety Net assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Vision | Signed Xamarin Google Play Services - Vision assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Wallet | Signed Xamarin Google Play Services - Wallet assemblies for Intersoft Crosslight. |
Crosslight.Xamarin.GooglePlayServices.Wearable | Signed Xamarin Google Play Services - Wearable assemblies for Intersoft Crosslight. |
Related Topics