The C# code generated by C# can be included in multiple Visual Studio project types:
After generating code into an existing project directory, open the Solution Explorer tab in Visual Studio and click the “Show All Files” button to make the files that are not part of the project visible.
Right-click on the
Generated folder and select
Include In Project from the context menu.
AutoRest generates code that depends on the Microsoft.Rest.ClientRuntime NuGet package. This package includes a dependency on Newtonsoft.Json.Net. Depending on your project profile, NuGet may pull down several additional packages dependencies.
Use the Package Manager UI to add Microsoft.Rest.ClientRuntime.
Or install using the Package Manager Console.
var client = new SwaggerPetstore(); Pet myPet = client.FindPetById(10);