You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/user_guide/instructions_to_run_generated_code.md
+44-12Lines changed: 44 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,45 +116,77 @@ Once you have .NET(C#) and `HttpClient` installed, follow these steps to execute
116
116
## C# (RestSharp)
117
117
118
118
Here are the detailed instructions forrunning the generated API Dash codein C# (using RestSharp) for macOS, Windows, and Linux:
119
+
119
120
### 1. Setting Up the C# Development Environment
120
121
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
+
```
122
149
123
150
### 2. Preparing a Project
124
151
125
-
#### In Visual Studio:
126
-
1. **Create a New Project:**
152
+
#### In Visual Studio
153
+
154
+
1. **Create a New Project**
127
155
- Open Visual Studio and select**Create a new project**.
128
156
- Choose the **Console Application (.NET Core)** template and create the project.
129
157
130
158
2. **Install `RestSharp`**
131
159
- Go to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.
132
160
- Under the Browse tab, search for`RestSharp` and install it.
133
161
134
-
#### Using the CLI:
135
-
1. **Create a Project:**
162
+
#### Using the CLI
163
+
164
+
1. **Create a Project**
136
165
```bash
137
166
dotnet new console -n RestSharpExample
138
167
cd RestSharpExample
139
168
```
140
169
141
-
2. **Install the Package:**
170
+
2. **Install the Package**
142
171
```bash
143
172
dotnet add package RestSharp
144
173
```
145
174
146
-
### 3. Execute the generated code:
175
+
### 3. Execute the generated code
176
+
147
177
Once you have .NET(C#) and `RestSharp` installed, follow these steps to execute the generated code:
148
178
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
152
184
153
-
#### In Visual Studio:
154
185
1. Click the **Start Debugging (F5)** button from the top menu to run the project.
155
186
2. The output window will display the API response.
156
187
157
-
#### Using the CLI:
188
+
#### Using the CLI
189
+
158
190
1. Open the terminal at the project root directory and run the following command:
0 commit comments