.NET: Re-enable ImplicitUsings in samples and clean up NoWarns (#1060)

* Re-enable ImplicitUsings in samples and clean up NoWarns

* Fix dotnet format

* More dotnet format

* More dotnet format

---------

Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
This commit is contained in:
Stephen Toub
2025-10-01 19:37:03 +00:00
committed by GitHub
co-authored by Chris
parent 0fef277c70
commit a414461570
192 changed files with 100 additions and 345 deletions
@@ -5,14 +5,9 @@
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OpenAI" />
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\src\Microsoft.Agents.AI.OpenAI\Microsoft.Agents.AI.OpenAI.csproj" />
</ItemGroup>
@@ -2,9 +2,7 @@
// This sample shows how to create and use a simple AI agent with OpenAI as the backend.
using System;
using System.ClientModel;
using System.Linq;
using Microsoft.Agents.AI;
using OpenAI;
using OpenAI.Chat;
@@ -3,14 +3,13 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<NoWarn>$(NoWarn);OPENAI001</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<ProjectReference
Include="..\..\..\..\src\Microsoft.Agents.AI.OpenAI\Microsoft.Agents.AI.OpenAI.csproj" />
<ProjectReference Include="..\..\..\..\src\Microsoft.Agents.AI.OpenAI\Microsoft.Agents.AI.OpenAI.csproj" />
</ItemGroup>
</Project>
@@ -2,7 +2,6 @@
// This sample shows how to create and use an AI agent with reasoning capabilities.
using System;
using Microsoft.Agents.AI;
using Microsoft.Extensions.AI;
using OpenAI;