Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
In this example, we will create an extension plugin and publish it to NuGet feed, which can then be placed in the plugin folder of a pre-deployed ODS / API to extend it.
Before you begin:
- This walkthrough assumes you have a working extension project.
- This article uses the student transportation alternative education program extension as an example.
- This example assumes you have the NuGet CLI tool. You can follow the instructions for Installing NuGet Client Tools.
- This example assumes you have access to a MyGet feed.
- If you don't have a MyGet feed, you can follow MyGet's instructions for Getting Started with NuGet.
- Alternatively, you can also work with other cost-effective options for distributing software packages such as Azure Artifacts, GitHub Packages, and so forth.
The steps can be summarized as:
Table of Contents | ||
---|---|---|
|
Each step is outlined in detail, below.
Creating Extension Plugins
Step 1. Run CodeGen
Info |
---|
This step is optional. If you have followed through How To: Extend the Ed-Fi ODS / API - Alternative Education Program Example and have run initdev, code generation is already completed. |
After creating your extension project by following the example on How To: Extend the Ed-Fi ODS / API - Alternative Education Program Example,
Open a PowerShell session and navigate to Ed-Fi-ODS-Implementation folder and execute the following command to run code generation.
|
|
Image Added
Step 2. Build Your Extension Project
From a PowerShell session, run the following command to build your extension project. If you followed the example on How To: Extend the Ed-Fi ODS / API - Alternative Education Program Example to create the EdFi.Ods.Extensions.SampleStudentTransportation project, your extension will be in Ed-Fi-ODS-Implementation\Application folder.
|
Image RemovedImage Added
Step 3. Create a NuGet Package
Go to the location of NuGet.exe in your system and execute the following command in a command prompt. Make sure to update the contents of the nuspec file with your information. It is recommended that you version your extension package with the same version as the ODS / API for which it was built.
Code Block | ||
---|---|---|
| ||
cd tools .\NuGet.exe pack <source directory>\Ed-Fi-ODS-Implementation\Application\EdFi.Ods.Extensions.SampleStudentTransportationSampleAlternativeEducationProgram\EdFi.Ods.Extensions.SampleStudentTransportationSampleAlternativeEducationProgram.nuspec -OutputDirectory <output directory> -Properties configuration=release -Properties standardversionStandardVersion=5.1.0 -Properties extensionversionExtensionVersion=1.0.0 -NoPackageAnalysis -NoDefaultExcludes |
Image RemovedImage Added
Image RemovedImage Added
Step 4. Publish NuGet Package
In this step, execute the following command to publish NuGet package.
Code Block |
---|
.\NuGet.exe push -source https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json -apikey <PAT> <nuget directory>\EdFi.Ods.Extensions.SampleStudentTransportationSampleAlternativeEducationProgram.1.0.0.Standard.5.1.0.1.0.0.nupkg |
Image RemovedImage Added
Consuming Extension Plugins
Follow the approach described in How To: Deploy an Extension Plugin to consume the published extension package.