Skip to content
Snippets Groups Projects
README.md 2.33 KiB
Newer Older
  • Learn to ignore specific revisions
  • # API Data Transfer Objects
    
    This project contains data transfer objects (complex model classes) corresponding to the Beckman Comms API output.
    
    The DTO project should be repackaged and published with each update to the `Api.DataTransferObjects` assembly.
    
    ## NuGet Packaging Instructions
    
    0. Install [NuGet Package Explorer](https://chocolatey.org/packages/NugetPackageExplorer).
    1. Open `Api.DataTransferObjects.nuspec` in NuGet Package Explorer.
        * Expand the **lib** tree in the **Package Contents** pane.
    2. Open the `Api.DataTransferObjects\bin` directory in file explorer.
    3. In Visual Studio, clean the solution in both Debug and Release modes.
    4. In Visual Studio, build the solution in both Debug and Release modes.
    5. Drag the `.dll`, `.pdb`, and `.xml` objects from the Debug and Release folders in file explore to their respective directories in the NuGet File Explorer **Package Contents** pane.
    6. In the **Package Metadata** pane of NuGet Package Explorer, click the icon to edit package metadata.
        * Increment the **Version** field using [semantic versioning](http://semver.org/).
        * Summarize version changes in the **Release Notes** field.
        * Update package dependencies if needed.
    7. Save Metadata (**File > Save Metadata As...**) `Api.DataTransferObjects.nuspec` in the Api.DataTransferObjects project folder and commit to version control.
    
    isaachs2's avatar
    isaachs2 committed
    8. Save package (**File > Save As...**) `G:\NuGetFeed\BeckmanComms.Api.DataTransferObjects.{version}`.
    
    
    ### Resources
    
    * [How to host your own NuGet Server and Package Feed](https://www.hanselman.com/blog/HowToHostYourOwnNuGetServerAndPackageFeed.aspx)
    * [Publish your .Net library as a NuGet package](http://twistedoakstudios.com/blog/Post1295_publish-your-net-library-as-a-nuget-package)
    * [Creating a local NuGet repository with dependencies bundles](http://www.marcusoft.net/2011/09/creating-local-nuget-repository-with.html)
     
    ## Using the NuGet Package
    
    0. In Visual Studio, open your NuGet package sources config (**Tools > Options > NuGet Package Manager > Package Sources**).
    1. Click the **+** icon to add a new source with default settings.
        * In the **Name** field, give the feed a meaningful name (e.g., "Beckman Internal Feed").
    
    areynold's avatar
    areynold committed
        * Use the **...** icon next to the **Source** field to browse to `G:\NuGetFeed`.
    
    2. Click **Update**.
    3. Click **OK**.
    4. Search and install NuGet packages as usual.