Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.58 KB

tool.md

File metadata and controls

40 lines (32 loc) · 1.58 KB
parent
Generators

Running Kiota from the dotnet tool

Before you can install Kiota as a dotnet tool you will first have to create a Nuget configuration file to access the authenticated GitHub package feed. The following steps show you how to create this file. This is a temporary step until we publish the Kiota tool to the public nuget feed.

  1. Navigate to New personal access token and generate a new token. (permissions: package:read, repo).

  2. Copy the token, you will need it later.

  3. Enable the SSO on the token if you are a Microsoft employee.

  4. Create a nuget.config file in the current directory with the following content.

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <packageSources>
            <add key="GitHub" value="https://nuget.pkg.github.com/microsoft/index.json" />
        </packageSources>
        <packageSourceCredentials>
            <GitHub>
                <add key="Username" value="" /><!-- your github username -->
                <!-- your github PAT: read:pacakges with SSO enabled for the Microsoft org (for microsoft employees only) -->
                <add key="ClearTextPassword" value="" />
            </GitHub>
        </packageSourceCredentials>
    </configuration>
  5. Execute the following command to install the tool.

    dotnet tool install --global --configfile nuget.config kiota
  6. Execute the following command to run kiota.

    kiota -d /some/input/description.yml -o /some/output/path --language csharp -n samespaceprefix