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
> -You can use **Visual Studio**or**dotnet CLI**(from VS Code terminal / PowerShell) for the backend services.
19
19
> - Open **Frontend** in Visual Studio Code.
20
20
> - Each service will occupy its terminal and show live logs
21
21
>
22
22
> **Terminal/Window Organization:**
23
-
> -**Visual Studio window 1**: Kernel Memory - Service runs on port 9001
24
-
> -**Visual Studio window 2**: Backend API - HTTP server runs on port 52190
25
-
> -**Visual Studio Code Terminal**: Frontend - Development server on port 5900
23
+
> -**Terminal 1**: Kernel Memory - Service runs on port 9001
24
+
> -**Terminal 2**: Backend API - HTTP server runs on port 5000
25
+
> -**Terminal 3 (VS Code)**: Frontend - Development server on port 5900
26
26
27
27
### Path Conventions
28
28
@@ -285,7 +285,11 @@ If you prefer or need to use the Azure Portal instead of CLI commands:
285
285
286
286
## Step 3: Backend Setup & Run Instructions
287
287
288
-
### 3.1. Open Solutions in Visual Studio
288
+
You can run the backend services using either **Visual Studio** (Option A) or the **dotnet CLI** from a terminal (Option B).
289
+
290
+
### 3.1. Open Solutions
291
+
292
+
#### Option A: Visual Studio
289
293
290
294
Navigate to the cloned repository and open the following solution files from Visual Studio:
291
295
@@ -295,6 +299,14 @@ Navigate to the cloned repository and open the following solution files from Vis
295
299
296
300
**Sign in to Visual Studio** using your tenant account with the required permissions.
297
301
302
+
> **⚠️ Important: KernelMemory.sln build issue**
303
+
> The `KernelMemory.sln` solution file references example and evaluation projects (`examples/`, `applications/`) that are **not included** in this repository. Building the full solution will produce errors.
304
+
> **Workaround:** In Visual Studio, right-click the **Service** project (inside the `service` folder) → **Set as Startup Project**. Visual Studio will only build the Service project and its dependencies when you press F5.
305
+
306
+
#### Option B: dotnet CLI (VS Code / PowerShell)
307
+
308
+
No solution file is needed. You will run individual projects directly using `dotnet run`. See Step 4.3 for the CLI commands.
@@ -352,13 +364,13 @@ Copy-Item Deployment\appconfig\aiservice\appsettings.Development.json.template A
352
364
353
365
## Step 4: Run Backend Services
354
366
355
-
### 4.1. Set Startup Projects
367
+
### 4.1. Set Startup Projects (Visual Studio only)
356
368
357
369
-**KernelMemory Solution:**
358
-
Set**Service** (located inside the `service` folder) as the startup project to run the Kernel Memory service.
370
+
Right-click**Service** (located inside the `service` folder) → **Set as Startup Project**. This ensures only the Service project and its dependencies are built, avoiding errors from missing example projects in the solution.
359
371
360
372
-**Microsoft.GS.DPS Solution:**
361
-
Set**Microsoft.GS.DPS.Host**as the startup project to run the API.
373
+
Right-click**Microsoft.GS.DPS.Host**→ **Set as Startup Project**.
362
374
363
375
### 4.2. Update Kernel Memory Endpoint in Azure App Configuration
364
376
@@ -386,12 +398,40 @@ Copy-Item Deployment\appconfig\aiservice\appsettings.Development.json.template A
386
398
387
399
### 4.3. Run the Backend Services
388
400
401
+
#### Option A: Visual Studio
402
+
389
403
1. In Visual Studio, run both solutions (KernelMemory and Microsoft.GS.DPS) by pressing **F5** or clicking the **Start** button.
390
404
2. Two terminal windows will appear showing the service logs.
391
-
3. Once both services start successfully:
405
+
406
+
#### Option B: dotnet CLI (VS Code / PowerShell)
407
+
408
+
> **⚠️ Critical:** You must set the `ASPNETCORE_ENVIRONMENT` environment variable to `Development` before running.
409
+
> Without this, the `appsettings.Development.json` file will **not** be loaded, and the application will fail with a `NullReferenceException` because the App Configuration URL is not found.
410
+
411
+
Open **two separate terminals** and run one service in each:
412
+
413
+
**Terminal 1 – Kernel Memory Service:**
414
+
```powershell
415
+
# From repository root
416
+
$env:ASPNETCORE_ENVIRONMENT = "Development"
417
+
dotnet run --project App\kernel-memory\service\Service\Service.csproj --configuration Debug
418
+
```
419
+
420
+
**Terminal 2 – Backend API:**
421
+
```powershell
422
+
# From repository root
423
+
$env:ASPNETCORE_ENVIRONMENT = "Development"
424
+
dotnet run --project App\backend-api\Microsoft.GS.DPS.Host\Microsoft.GS.DPS.Host.csproj --configuration Debug
425
+
```
426
+
427
+
> **Note:** Do **not** build the full `KernelMemory.sln` from CLI (`dotnet build KernelMemory.sln`). It will fail because the solution references example projects that are not in this repository. Always use `--project` to target the Service project directly.
428
+
429
+
#### Verify Services
430
+
431
+
Once both services start successfully:
392
432
-**Kernel Memory Service** will be available at: http://localhost:9001
393
-
- **Backend API** will be available at: https://localhost:52190
394
-
- **Swagger UI** will open automatically at http://localhost:52190 for API validation
433
+
-**Backend API** will be available at: http://localhost:5000
434
+
-**Swagger UI** will be available at:http://localhost:5000 for API validation
395
435
396
436
> **⚠️ Important:** Keep both terminal windows open while the services are running. Do not close them until you're done with development.
Update the `VITE_API_ENDPOINT` value with your local Backend API URL, e.g.:
458
+
Update the `VITE_API_ENDPOINT` value with your local Backend API URL:
419
459
420
460
```env
421
-
VITE_API_ENDPOINT=https://localhost:52190
461
+
VITE_API_ENDPOINT=http://localhost:5000
422
462
DISABLE_AUTH=true
423
463
VITE_ENABLE_UPLOAD_BUTTON=true
424
464
```
465
+
466
+
> **Note:** The Backend API runs on **`http://localhost:5000`** by default (HTTP, not HTTPS).
425
467
### 5.4. Verify Node.js and Yarn Installation
426
468
427
469
Before installing dependencies, verify that Node.js (LTS) and Yarn are already installed from Step 1:
@@ -457,7 +499,7 @@ yarn start
457
499
458
500
**Services will be available at:**
459
501
-**Kernel Memory Service**: http://localhost:9001
460
-
-**Backend API**: https://localhost:52190
502
+
-**Backend API**: http://localhost:5000
461
503
-**Frontend Application**: http://localhost:5900
462
504
463
505
You're now ready to run and debug the application locally!
@@ -468,6 +510,19 @@ You're now ready to run and debug the application locally!
468
510
469
511
### Common Issues
470
512
513
+
#### `NullReferenceException` or `ArgumentNullException: Value cannot be null (Parameter 'uriString')` on startup
514
+
515
+
This means `appsettings.Development.json` is not being loaded. Ensure:
516
+
1. The `ASPNETCORE_ENVIRONMENT` environment variable is set to `Development` (see Step 4.3).
517
+
2. The `appsettings.Development.json` file exists in the correct project directory (see Step 3.2).
518
+
3. The `ConnectionStrings:AppConfig` value contains your actual Azure App Configuration URL, not the placeholder.
519
+
520
+
#### `KernelMemory.sln` build fails with "project file was not found" errors
521
+
522
+
The solution references example projects not included in this repository. **Do not build the full solution.** Instead:
523
+
- In Visual Studio: Set **Service** as the startup project and press F5.
524
+
- In CLI: Use `dotnet run --project App\kernel-memory\service\Service\Service.csproj`.
525
+
471
526
#### Connection Issues
472
527
473
528
- While running the Kernel solution, if you encounter an error such as ``server not responded`` or ``server not found``, it usually indicates that the required resource is not responding.
0 commit comments