Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 5.03 KB

mobcat-gettingstarted.md

File metadata and controls

56 lines (38 loc) · 5.03 KB

Getting Started with MobCAT

There are two main approaches to using the MobCAT libraries in your application.

  1. NuGet package
  2. Project reference

NuGet Package

Referencing the MobCAT libraries via your own NuGet feed is the preferred and best approach in most cases.

The prebuilt packages can be downloaded from the MobCAT repository Packages tab or directly using the links below.

These packages can then be added / published to your local / private NuGet feed then subsequently consumed by your projects like any other NuGet package.

Configuring a NuGet Feed

There are various ways in which you can make these packages available using your own private NuGet feeds. Documentation for some of the popular NuGet feed hosting options have been listed below for convenience:

Local NuGet Package Feeds

Private NuGet Package Feeds

Consuming NuGet Packages in Visual Studio

Add the feed's endpoint as a package source in Visual Studio using either the Package Manager UI or the nuget sources command in order to consume NuGet packages from that feed.

Local Package Endpoint:
For local package feeds, add its pathname e.g. \\myfolder\packages to the list of sources.

Azure Dev Ops Package Endpoint:
For NuGet feeds hosted in Azure Dev Ops, get your feed's NuGet package source information using the Connect to Feed link on the respective Artefacts page. The resulting endpoint should indicatively be: https://pkgs.dev.azure/OWNER/_packaging/PROJECT/nuget/v3/index.json where OWNER is the user or organization account that owns the project.

GitHub Packages Endpoint:
For NuGet feeds hosted in GitHub Packages, you should follow the steps provided in the authenticating to GitHub Packages documentation. The resulting endpoint should indicatively be: https://nuget.pkg.github.com/OWNER/index.json where OWNER is the name of the user or organization account that owns the project. For these packages, the url will be : https://nuget.pkg.github.com/xamcat/index.json . Following the steps in the GitHub Packages authentication docs, be sure to use your GitHub USERNAME and the PAT generated for that User Account has the appropriate access granted.

One you have the appropriate endpoint, and completed any steps that are specific to the NuGet package source, you can follow the steps in the Visual Studio NuGet Quickstart document to add it as a package source in Visual Studio. The Username and PAT combination from above can be used for this step.

Project Reference

You can incorporate the MobCAT libraries into your solutions via project reference. However, this is not recommended in most cases unless you intend to maintain the source code as part of that solution moving forward.

To add the MobCAT libraries into your solution:

  1. Acquire the source code by:

    a) Downloading and extract/unzip the source code from the master or dev branch as appropriate
    b) Cloning the repo via SSH or HTTPS

  2. Copy to your preferred working directory as appropriate

  3. In Visual Studio, add the respective project(s) to your solution

  4. Add the appropriate project reference(s)