Skip to content

Commit 2adbd4c

Browse files
author
Tarek Mahmoud Sayed
committed
Scope MCP9005 suppression to samples that use deprecated APIs
Replace the blanket samples/Directory.Build.props suppression with a local NoWarn in only the four samples that intentionally exercise a deprecated feature, so MCP9005 stays active for every other sample.
1 parent 89d3399 commit 2adbd4c

5 files changed

Lines changed: 12 additions & 9 deletions

File tree

samples/AspNetCoreMcpServer/AspNetCoreMcpServer.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<PublishAot>true</PublishAot>
8+
<!-- This sample demonstrates the Sampling feature, which SEP-2577 deprecates (MCP9005) but
9+
which continues to work. Suppress the deprecation warning for this sample only. -->
10+
<NoWarn>$(NoWarn);MCP9005</NoWarn>
811
</PropertyGroup>
912

1013
<ItemGroup>

samples/ChatWithTools/ChatWithTools.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<!-- This sample demonstrates the Sampling feature, which SEP-2577 deprecates (MCP9005) but
9+
which continues to work. Suppress the deprecation warning for this sample only. -->
10+
<NoWarn>$(NoWarn);MCP9005</NoWarn>
811
<!--
912
Anthropic SDK isn't AOT compatible yet
1013
<PublishAot>true</PublishAot>

samples/Directory.Build.props

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

samples/EverythingServer/EverythingServer.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<OutputType>Exe</OutputType>
8+
<!-- This sample demonstrates the Logging and Sampling features, which SEP-2577 deprecates
9+
(MCP9005) but which continue to work. Suppress the deprecation warning for this sample only. -->
10+
<NoWarn>$(NoWarn);MCP9005</NoWarn>
811
</PropertyGroup>
912

1013
<ItemGroup>

samples/TestServerWithHosting/TestServerWithHosting.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<PublishAot Condition="'$(TargetFramework)' == 'net9.0'">true</PublishAot>
9+
<!-- This sample demonstrates the Sampling feature, which SEP-2577 deprecates (MCP9005) but
10+
which continues to work. Suppress the deprecation warning for this sample only. -->
11+
<NoWarn>$(NoWarn);MCP9005</NoWarn>
912
</PropertyGroup>
1013

1114
<ItemGroup>

0 commit comments

Comments
 (0)