Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.34 KB

proj-setup.md

File metadata and controls

32 lines (25 loc) · 1.34 KB

Project Setup

The C# code generated by C# can be included in multiple Visual Studio project types:

  • Desktop applications (.NET 4.0 and .NET 4.5)
  • Web applications (.NET 4.0 and .NET 4.5)
  • Windows Phone (8.1)
  • Windows Store App (8.1)
  • Portable Class Libraries

###Add Generated Files to the Project 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. Show All Files

Right-click on the Generated folder and select Include In Project from the context menu. Include In Project

###Add the ClientRuntime nuget Package 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. Nuget package manager

Or install using the Package Manager Console.

PM>Install-Package Microsoft.Rest.ClientRuntime

###Use the Client:

var client = new SwaggerPetstore();
Pet myPet = client.FindPetById(10);