Skip to content

Commit acf6eb2

Browse files
authored
Include docs samples in solution build (#751)
* Include docs samples in solution build * Update workflow to build for doc updates * Fix build error
1 parent 4855a36 commit acf6eb2

File tree

9 files changed

+35
-8
lines changed

9 files changed

+35
-8
lines changed

.github/workflows/ci-build-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
- "src/**"
1919
- "tests/**"
2020
- "samples/**"
21+
- "docs/**"
2122

2223
permissions:
2324
contents: read

ModelContextProtocol.slnx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,32 @@
88
<File Path=".github/workflows/release.md" />
99
<File Path=".github/workflows/release.yml" />
1010
</Folder>
11+
<Folder Name="/docs/" />
12+
<Folder Name="/docs/concepts/" />
13+
<Folder Name="/docs/concepts/elicitation/" />
14+
<Folder Name="/docs/concepts/elicitation/samples/" />
15+
<Folder Name="/docs/concepts/elicitation/samples/client/">
16+
<Project Path="docs/concepts/elicitation/samples/client/ElicitationClient.csproj" />
17+
</Folder>
18+
<Folder Name="/docs/concepts/elicitation/samples/server/">
19+
<Project Path="docs/concepts/elicitation/samples/server/Elicitation.csproj" />
20+
</Folder>
21+
<Folder Name="/docs/concepts/logging/" />
22+
<Folder Name="/docs/concepts/logging/samples/" />
23+
<Folder Name="/docs/concepts/logging/samples/client/">
24+
<Project Path="docs/concepts/logging/samples/client/LoggingClient.csproj" />
25+
</Folder>
26+
<Folder Name="/docs/concepts/logging/samples/server/">
27+
<Project Path="docs/concepts/logging/samples/server/Logging.csproj" />
28+
</Folder>
29+
<Folder Name="/docs/concepts/progress/" />
30+
<Folder Name="/docs/concepts/progress/samples/" />
31+
<Folder Name="/docs/concepts/progress/samples/client/">
32+
<Project Path="docs/concepts/progress/samples/client/ProgressClient.csproj" />
33+
</Folder>
34+
<Folder Name="/docs/concepts/progress/samples/server/">
35+
<Project Path="docs/concepts/progress/samples/server/Progress.csproj" />
36+
</Folder>
1137
<Folder Name="/samples/">
1238
<Project Path="samples/AspNetCoreMcpServer/AspNetCoreMcpServer.csproj" />
1339
<Project Path="samples/ChatWithTools/ChatWithTools.csproj" />

docs/concepts/elicitation/samples/client/ElicitationClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="ModelContextProtocol.Core" Version="0.3.0-preview.3" />
11+
<ProjectReference Include="../../../../../src/ModelContextProtocol.Core/ModelContextProtocol.Core.csproj" />
1212
</ItemGroup>
1313

1414
</Project>

docs/concepts/elicitation/samples/client/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656
async ValueTask<ElicitResult> HandleElicitationAsync(ElicitRequestParams? requestParams, CancellationToken token)
5757
{
5858
// Bail out if the requestParams is null or if the requested schema has no properties
59-
if (requestParams?.RequestedSchema?.Properties == null)
59+
if (requestParams is null || requestParams.RequestedSchema?.Properties is null)
6060
{
6161
return new ElicitResult();
6262
}
6363

6464
// Process the elicitation request
65-
if (requestParams?.Message is not null)
65+
if (requestParams.Message is not null)
6666
{
6767
Console.WriteLine(requestParams.Message);
6868
}

docs/concepts/elicitation/samples/server/Elicitation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.3" />
10+
<ProjectReference Include="../../../../../src/ModelContextProtocol.AspNetCore/ModelContextProtocol.AspNetCore.csproj" />
1111
</ItemGroup>
1212

1313
</Project>

docs/concepts/logging/samples/client/LoggingClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="ModelContextProtocol.Core" Version="0.3.0-preview.3" />
11+
<ProjectReference Include="../../../../../src/ModelContextProtocol.Core/ModelContextProtocol.Core.csproj" />
1212
</ItemGroup>
1313

1414
</Project>

docs/concepts/logging/samples/server/Logging.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.3" />
10+
<ProjectReference Include="../../../../../src/ModelContextProtocol.AspNetCore/ModelContextProtocol.AspNetCore.csproj" />
1111
</ItemGroup>
1212

1313
</Project>

docs/concepts/progress/samples/client/ProgressClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="ModelContextProtocol.Core" Version="0.3.0-preview.3" />
11+
<ProjectReference Include="../../../../../src/ModelContextProtocol.Core/ModelContextProtocol.Core.csproj" />
1212
</ItemGroup>
1313

1414
</Project>

docs/concepts/progress/samples/server/Progress.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.3" />
10+
<ProjectReference Include="../../../../../src/ModelContextProtocol.AspNetCore/ModelContextProtocol.AspNetCore.csproj" />
1111
</ItemGroup>
1212

1313
</Project>

0 commit comments

Comments
 (0)