Skip to content

Commit 2a6dbe5

Browse files
authored
Update instructions_to_run_generated_code.md
1 parent c845aa6 commit 2a6dbe5

File tree

1 file changed

+44
-12
lines changed

1 file changed

+44
-12
lines changed

doc/user_guide/instructions_to_run_generated_code.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,45 +116,77 @@ Once you have .NET(C#) and `HttpClient` installed, follow these steps to execute
116116
## C# (RestSharp)
117117

118118
Here are the detailed instructions for running the generated API Dash code in C# (using RestSharp) for macOS, Windows, and Linux:
119+
119120
### 1. Setting Up the C# Development Environment
120121

121-
Check out the instructions [here](#1-setting-up-the-c-development-environment) for detailed steps on how to set C# Development Environment on macOS, Windows, or Linux.
122+
#### macOS and Windows
123+
1. **Install .NET SDK**
124+
- Visit the [official .NET download page](https://dotnet.microsoft.com/download).
125+
- Download and install the latest .NET SDK for macOS.
126+
2. **Verify Installation**
127+
- Open the terminal and run the following command to verify the installation:
128+
```bash
129+
dotnet --version
130+
```
131+
132+
#### Linux
133+
1. **Install .NET SDK**
134+
- Run the following commands based on your distribution:
135+
- For Ubuntu/Debian-based systems:
136+
```bash
137+
sudo apt update
138+
sudo apt install dotnet-sdk-7.0
139+
```
140+
- For Fedora/CentOS-based systems:
141+
```bash
142+
sudo dnf install dotnet-sdk-7.0
143+
```
144+
2. **Verify Installation**
145+
- Open the terminal and run the following command to verify the installation:
146+
```bash
147+
dotnet --version
148+
```
122149

123150
### 2. Preparing a Project
124151

125-
#### In Visual Studio:
126-
1. **Create a New Project:**
152+
#### In Visual Studio
153+
154+
1. **Create a New Project**
127155
- Open Visual Studio and select **Create a new project**.
128156
- Choose the **Console Application (.NET Core)** template and create the project.
129157

130158
2. **Install `RestSharp`**
131159
- Go to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
132160
- Under the Browse tab, search for `RestSharp` and install it.
133161

134-
#### Using the CLI:
135-
1. **Create a Project:**
162+
#### Using the CLI
163+
164+
1. **Create a Project**
136165
```bash
137166
dotnet new console -n RestSharpExample
138167
cd RestSharpExample
139168
```
140169

141-
2. **Install the Package:**
170+
2. **Install the Package**
142171
```bash
143172
dotnet add package RestSharp
144173
```
145174

146-
### 3. Execute the generated code:
175+
### 3. Execute the generated code
176+
147177
Once you have .NET(C#) and `RestSharp` installed, follow these steps to execute the generated code:
148178

149-
1. **Open a IDE/text editor** ✍️ (Visual Studio, VS Code or any other text editor).
150-
2. **Copy the generated code** 📋 from API Dash.
151-
3. **Paste the code** into your project. ex) prgoram.cs
179+
1. Open a IDE/text editor (Visual Studio, VS Code or any other text editor).
180+
2. Copy the generated code from API Dash.
181+
3. Paste the code into your project like program.cs
182+
183+
#### In Visual Studio
152184

153-
#### In Visual Studio:
154185
1. Click the **Start Debugging (F5)** button from the top menu to run the project.
155186
2. The output window will display the API response.
156187

157-
#### Using the CLI:
188+
#### Using the CLI
189+
158190
1. Open the terminal at the project root directory and run the following command:
159191
```bash
160192
dotnet run

0 commit comments

Comments
 (0)