Campus Management Development & NuGet

Overview

This post describes the details of how to configure a Visual Studio solution to publish to the Campus Management NuGet package source.

Campus Management NuGet Package Source

The Campus Management NuGet package source is a file system based source located at \\bcrnfs2\nuget.

Campus Management IT publishes a NuGet.config file to all machines on the cmc domain. This file contains the configuration for the Campus Management NuGet Package source, making it available to Visual Studio.

Configuring a Project to Publish a Campus Management NuGet Package

  1. Install NuGet Packager.
  2. Add a new project to your solution by using the installed template
  3. Open NuGet.config and add your repositories to the “packageSources” element.
  4. The script will then publish your package to all the listed repositories. Please see NuGet.config below for an example.
  5. Edit the sample “Package.nuspec” file according to this reference. Please see Package.nuspec below for an example.
  6. Add the assemblies you want to add as references in the “lib” folder before building the project. See Package Conventions
  7. Add the files you want to copy to the project folder in the “content” folder before building the project. Remember that you can also perform config and file transforms.
  8. Edit one or more of the files in the “tools” folder if you want to run some script on package install, uninstall or init.
    See this link for more information.
  9. Build the project.
  10. If in release mode, the packager will try to push your package to the repository using the NuGet API Keys configuration. If no valid API key for the specified package source exists, it will prompt you to add it before automatically trying again.
  11. If in debug mode, it will only create the packages.

Leave a Reply

Skip to toolbar