Search code examples
c#azureswaggernuget-package-restoreautorest

Azure Autorest package dependency restore


I am using Azure's Autorest to generate client code in C# from a particular Swagger json.

While the code is successfully generated, there is no packages.config/packages.json file that is generated with it to restore all the dependent nuget packages. I import the generated code files into an existing VS project and install the Microsoft.Rest.ClientRuntime package as instructed in the docs at https://github.com/Azure/autorest/blob/v1.0.1-20170504-2300-nightly/docs/client/proj-setup.md.

Anyway I can generate a package config file without manually installing the nuget packages? Thanks.


Solution

  • The dependency is a single package, and it's just the latest Microsoft.Rest.ClientRuntime.

    Given that the move in the .NET standard is to having package references stored in the .csproj file, generating a files for the old standard is kind-of a dead end move at this point.