Skip to content

Commit dedec46

Browse files
authored
Centralize build/package config and fix mcp-interview-data scheme (#23)
* Add aspire config * Centralize build/package config and fix mcp-interview-data scheme * Update apphost.cs and Agent Program.cs (centralize packages, fix mcp-interview-data scheme)
1 parent a2d2d3a commit dedec46

13 files changed

Lines changed: 97 additions & 105 deletions

File tree

.aspire/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Directory.Build.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<Project>
2+
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
3+
<PropertyGroup>
4+
<TargetFramework>net10.0</TargetFramework>
5+
6+
<Nullable>enable</Nullable>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
9+
<UserSecretsId>7ae1635d-7ac9-43dd-b458-5f56d1b1ee02</UserSecretsId>
10+
</PropertyGroup>
11+
</Project>

Directory.Packages.props

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project>
2+
<PropertyGroup>
3+
<!-- Enable central package management, https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management -->
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageVersion Include="Aspire.Hosting.Azure" Version="13.*" />
10+
<PackageVersion Include="Aspire.Hosting.Azure.AIFoundry" Version="13.*-*" />
11+
<PackageVersion Include="Aspire.Hosting.GitHub.Models" Version="13.*" />
12+
<PackageVersion Include="Aspire.Hosting.OpenAI" Version="13.*" />
13+
<PackageVersion Include="Aspire.OpenAI" Version="13.*-*" />
14+
<PackageVersion Include="Azure.Identity" Version="1.*" />
15+
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.SQLite" Version="13.*" />
16+
<PackageVersion Include="CommunityToolkit.Aspire.Microsoft.Data.Sqlite" Version="13.*" />
17+
<PackageVersion Include="GitHub.Copilot.SDK" Version="0.*" />
18+
<PackageVersion Include="Microsoft.Agents.AI" Version="1.*" />
19+
<PackageVersion Include="Microsoft.Agents.AI.AGUI" Version="1.*-*" />
20+
<PackageVersion Include="Microsoft.Agents.AI.AzureAI" Version="1.*-*" />
21+
<PackageVersion Include="Microsoft.Agents.AI.DevUI" Version="1.*-*" />
22+
<PackageVersion Include="Microsoft.Agents.AI.GitHub.Copilot" Version="1.*-*" />
23+
<PackageVersion Include="Microsoft.Agents.AI.Hosting" Version="1.*-*" />
24+
<PackageVersion Include="Microsoft.Agents.AI.Hosting.AGUI.AspNetCore" Version="1.*-*" />
25+
<PackageVersion Include="Microsoft.Agents.AI.Hosting.OpenAI" Version="1.*-*" />
26+
<PackageVersion Include="Microsoft.Agents.AI.OpenAI" Version="1.*" />
27+
<PackageVersion Include="Microsoft.Agents.AI.Workflows" Version="1.*" />
28+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.*" />
29+
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.*" />
30+
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.*" />
31+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.*" />
32+
<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="1.*" />
33+
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.*" />
34+
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.*" />
35+
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.*" />
36+
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.*" />
37+
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.*" />
38+
<PackageVersion Include="xunit.v3" Version="3.*" />
39+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.*-*" />
40+
</ItemGroup>
41+
</Project>

apphost.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#:sdk Aspire.AppHost.Sdk@13.2.2
2-
#:package Aspire.Hosting.Azure@13.*
3-
#:package Aspire.Hosting.GitHub.Models@13.*
4-
#:package Aspire.Hosting.OpenAI@13.*
5-
#:package CommunityToolkit.Aspire.Hosting.SQLite@13.*
2+
3+
#:package Aspire.Hosting.Azure
4+
#:package Aspire.Hosting.GitHub.Models
5+
#:package Aspire.Hosting.OpenAI
6+
#:package CommunityToolkit.Aspire.Hosting.SQLite
7+
68
#:project ./src/InterviewCoach.Agent/InterviewCoach.Agent.csproj
79
#:project ./src/InterviewCoach.Mcp.InterviewData/InterviewCoach.Mcp.InterviewData.csproj
810
#:project ./src/InterviewCoach.WebUI/InterviewCoach.WebUI.csproj
9-
#:property UserSecretsId=7ae1635d-7ac9-43dd-b458-5f56d1b1ee02
1011

1112
using Microsoft.Extensions.Configuration;
1213

apphost.run.json

Lines changed: 0 additions & 31 deletions
This file was deleted.

aspire.config.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
},
55
"profiles": {
66
"https": {
7+
"launchBrowser": true,
78
"applicationUrl": "https://localhost:17053;http://localhost:15154",
89
"environmentVariables": {
910
"ASPNETCORE_ENVIRONMENT": "Development",
@@ -14,6 +15,7 @@
1415
}
1516
},
1617
"http": {
18+
"launchBrowser": true,
1719
"applicationUrl": "http://localhost:15154",
1820
"environmentVariables": {
1921
"ASPNETCORE_ENVIRONMENT": "Development",
@@ -25,6 +27,6 @@
2527
}
2628
},
2729
"features": {
28-
"defaultWatchEnabled": "false"
30+
"defaultWatchEnabled": "true"
2931
}
3032
}

src/InterviewCoach.Agent/InterviewCoach.Agent.csproj

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<UserSecretsId>7ae1635d-7ac9-43dd-b458-5f56d1b1ee02</UserSecretsId>
8-
</PropertyGroup>
9-
10-
113
<PropertyGroup>
124
<NoWarn>$(NoWarn);MAAIW001</NoWarn>
135
</PropertyGroup>
146

157

168
<ItemGroup>
17-
<PackageReference Include="Aspire.OpenAI" Version="13.*-*" />
18-
<PackageReference Include="Azure.Identity" Version="1.*" />
19-
<!-- <PackageReference Include="GitHub.Copilot.SDK" Version="0.*" /> -->
20-
<PackageReference Include="Microsoft.Agents.AI" Version="1.*-*" />
21-
<PackageReference Include="Microsoft.Agents.AI.AzureAI.Persistent" Version="1.*-*" />
22-
<PackageReference Include="Microsoft.Agents.AI.DevUI" Version="1.*-*" />
23-
<PackageReference Include="Microsoft.Agents.AI.Hosting" Version="1.*-*" />
24-
<PackageReference Include="Microsoft.Agents.AI.Hosting.AGUI.AspNetCore" Version="1.*-*" />
25-
<PackageReference Include="Microsoft.Agents.AI.Hosting.OpenAI" Version="1.*-*" />
26-
<PackageReference Include="Microsoft.Agents.AI.OpenAI" Version="1.*-*" />
27-
<PackageReference Include="Microsoft.Agents.AI.Workflows" Version="1.*-*" />
28-
<!-- <PackageReference Include="Microsoft.Agents.AI.GitHub.Copilot" Version="1.*-*" /> -->
29-
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.*-*" />
9+
<PackageReference Include="Aspire.OpenAI" />
10+
<PackageReference Include="Azure.Identity" />
11+
<!-- <PackageReference Include="GitHub.Copilot.SDK" /> -->
12+
<PackageReference Include="Microsoft.Agents.AI" />
13+
<PackageReference Include="Microsoft.Agents.AI.AzureAI" />
14+
<PackageReference Include="Microsoft.Agents.AI.DevUI" />
15+
<PackageReference Include="Microsoft.Agents.AI.Hosting" />
16+
<PackageReference Include="Microsoft.Agents.AI.Hosting.AGUI.AspNetCore" />
17+
<PackageReference Include="Microsoft.Agents.AI.Hosting.OpenAI" />
18+
<PackageReference Include="Microsoft.Agents.AI.OpenAI" />
19+
<PackageReference Include="Microsoft.Agents.AI.Workflows" />
20+
<!-- <PackageReference Include="Microsoft.Agents.AI.GitHub.Copilot" /> -->
21+
<PackageReference Include="ModelContextProtocol.AspNetCore" />
3022
</ItemGroup>
3123

3224
<ItemGroup>

src/InterviewCoach.Agent/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@
5858
var loggerFactory = sp.GetRequiredService<ILoggerFactory>();
5959
var httpClient = sp.GetRequiredService<IHttpClientFactory>()
6060
.CreateClient("mcp-interview-data");
61+
var endpoint = builder.Environment.IsDevelopment() == true
62+
? $"{httpClient.BaseAddress!.ToString().Replace("https+", string.Empty).TrimEnd('/')}"
63+
: $"{httpClient.BaseAddress!.ToString().Replace("+http", string.Empty).TrimEnd('/')}";
6164

6265
var clientTransportOptions = new HttpClientTransportOptions()
6366
{
64-
Endpoint = new Uri($"{httpClient.BaseAddress!.ToString().Replace("+http", string.Empty).TrimEnd('/')}/mcp")
67+
Endpoint = new Uri($"{endpoint}/mcp")
6568
};
6669
var clientTransport = new HttpClientTransport(clientTransportOptions, httpClient, loggerFactory);
6770

src/InterviewCoach.AppHost/InterviewCoach.AppHost.csproj

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,14 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net10.0</TargetFramework>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<Nullable>enable</Nullable>
8-
<UserSecretsId>7ae1635d-7ac9-43dd-b458-5f56d1b1ee02</UserSecretsId>
95
</PropertyGroup>
106

117
<ItemGroup>
12-
<PackageReference Include="Aspire.Hosting.Azure" Version="13.*" />
13-
<!-- <PackageReference Include="Aspire.Hosting.Azure.AIFoundry" Version="13.*-*" /> -->
14-
<PackageReference Include="Aspire.Hosting.GitHub.Models" Version="13.*" />
15-
<PackageReference Include="Aspire.Hosting.OpenAI" Version="13.*" />
16-
<PackageReference Include="CommunityToolkit.Aspire.Hosting.SQLite" Version="13.*" />
8+
<PackageReference Include="Aspire.Hosting.Azure" />
9+
<!-- <PackageReference Include="Aspire.Hosting.Azure.AIFoundry" /> -->
10+
<PackageReference Include="Aspire.Hosting.GitHub.Models" />
11+
<PackageReference Include="Aspire.Hosting.OpenAI" />
12+
<PackageReference Include="CommunityToolkit.Aspire.Hosting.SQLite" />
1713
</ItemGroup>
1814

1915
<ItemGroup>

src/InterviewCoach.Mcp.InterviewData/InterviewCoach.Mcp.InterviewData.csproj

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

3-
<PropertyGroup>
4-
<TargetFramework>net10.0</TargetFramework>
5-
<Nullable>enable</Nullable>
6-
<ImplicitUsings>enable</ImplicitUsings>
7-
<UserSecretsId>7ae1635d-7ac9-43dd-b458-5f56d1b1ee02</UserSecretsId>
8-
</PropertyGroup>
9-
103
<ItemGroup>
11-
<PackageReference Include="CommunityToolkit.Aspire.Microsoft.Data.Sqlite" Version="13.*" />
12-
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.*" />
13-
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.*-*" />
4+
<PackageReference Include="CommunityToolkit.Aspire.Microsoft.Data.Sqlite" />
5+
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
6+
<PackageReference Include="ModelContextProtocol.AspNetCore" />
147
</ItemGroup>
158

169
<ItemGroup>

0 commit comments

Comments
 (0)