Giter VIP home page Giter VIP logo

createyorfirstnuget_appveyor's Introduction

Create Your First NuGet

Helps to setup Appveyor for continuous integration and to publish your NuGet.

Features

Why should I use this template?

  • Contains well documented instructions about the setup process.
  • Contains scripts for building your project, auto incrementing version and publishing your created NuGet to private and/or public hosting server.
  • After setup is done you get:
    • the state of your build.
    • automatically published NuGet packages.
    • possibility to automate test runs before each build and much more.

Instructions

  1. Create “Class Library” in Visual Studio and add the code you want to be in your library.

  2. Copy the following from Template folder to root folder of your project:

  • Folder: "Scripts"
  • Files: ”.gitignore”, “appveyor.yml” , “LICENCE”, “README.md”
  1. Create new empty repository on github. Note repository’s URL for the next couple steps.

  2. Create YourProjectName.nuspec file in the root folder and add the following:

<?xml version="1.0"?>
<package>
    <metadata>
        <!-- The unique identifier for the package. This is the package name that is shown when packages are listed using the Package Manager Console. These are also used when installing a package using the Install-Package command within the Package Manager Console. Package IDs may not contain any spaces or characters that are invalid in an URL. In general, they follow the same rules as .NET namespaces do. So Foo.Bar is a valid ID, Foo! and Foo Bar are not. -->
        <id>ProjectName</id>
        <version></version>
        <title>Project Name</title>
        <authors>First name Last name</authors>
        <owners>Intergen Ltd</owners>
        <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
        <projectUrl>GitHubURL</projectUrl>
        <iconUrl>https://avatars2.githubusercontent.com/u/17167744</iconUrl>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>Description</description>
        <releaseNotes>Notes</releaseNotes>
        <copyright>Copyright 2016</copyright>
        <tags>Tag Tag2</tags>
        <dependencies>
            <dependency id="DependencyProjectName" version="1.0.0.0" />
        </dependencies> 
    </metadata>
    <files>
        <file src="ProjectName\bin\Release\ProjectName.dll" target="lib" /> 
        <file src="ProjectName\bin\Release\ProjectName.pdb" target="lib" /> 
    </files>
</package>
  1. Replace information in tags with project specific one.
  • Add dependencies if your project requires them, otherwise comment out dependency tag. You can find dependencies in “packages.config”.
  • Make sure to read Licence file and sign it at the end (line 189) or pick a licence that suits your needs.
  • Intergen use: Do not modify Owners, LicenseUrl, IconUrl, Copyright. Licence is already signed.
  1. Follow these GitHub Instructions to push local repository to git repository or execute the following commands:
git init
git add .
git commit -m "Created project"
git remote add origin YourGithubURL
git push origin master

  1. Login in AppVeyor with GitHub credentials. (allow it to access your repositories)

  2. Add Repository to AppVeyor. image

  3. Using AppVeyor's encryption tool encrypt all your private variables in your appveyor.yml file. Also set public variables and set your solution file name in build section.

  4. Push updated files to repository and that should start a new build. image

  5. If everything has been setup correctly your build succeeds and your NuGet gets published. Congratulations! image

Note: If your build fails look through the generated log file. Usually errors are self-explanatory.

Credits

Victor Usoltsev, 2016

createyorfirstnuget_appveyor's People

Contributors

bernarden avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.