Skip to content

Commit 9452cfe

Browse files
ArnaudB88Arnaud Boussaerrogerbarretomarkwallace-microsoft
authored
.Net: #12728 Use Odata2Linq nuget for .NET8 (#12729)
### Motivation and Context Replacing a deprecated nuget library - Fixes #12728 ### Description Replaced deprecated library https://github.com/IharYakimush/comminity-data-odata-linq with the successor (for .NET8): https://github.com/ArnaudB88/OData2Linq ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: Arnaud Boussaer <[email protected]> Co-authored-by: Roger Barreto <[email protected]> Co-authored-by: Mark Wallace <[email protected]>
1 parent 7596815 commit 9452cfe

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

dotnet/Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
<PackageVersion Include="MSTest.TestFramework" Version="3.8.0" />
7070
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
7171
<PackageVersion Include="Npgsql" Version="8.0.7" />
72+
<PackageVersion Include="OData2Linq" Version="2.2.0" />
7273
<PackageVersion Include="OllamaSharp" Version="5.2.3" />
7374
<PackageVersion Include="OpenAI" Version="[2.2.0]" />
7475
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />

dotnet/src/Plugins/Plugins.StructuredData.EntityFramework/Plugins.StructuredData.EntityFramework.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<Compile Remove="$(RepoRoot)/dotnet/src/InternalUtilities/src/Diagnostics/ModelDiagnostics.cs" Link="%(RecursiveDir)/InternalUtilities/Diagnostics/%(Filename)%(Extension)"/>
30+
<Compile Remove="$(RepoRoot)/dotnet/src/InternalUtilities/src/Diagnostics/ModelDiagnostics.cs" Link="%(RecursiveDir)/InternalUtilities/Diagnostics/%(Filename)%(Extension)" />
3131
</ItemGroup>
3232

3333
<ItemGroup>
@@ -36,8 +36,14 @@
3636
</ItemGroup>
3737

3838
<ItemGroup>
39-
<PackageReference Include="Community.OData.Linq" />
4039
<PackageReference Include="EntityFramework" />
4140
</ItemGroup>
4241

42+
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0' AND '$(TargetFramework)' != 'net9.0'">
43+
<PackageReference Include="Community.OData.Linq" />
44+
</ItemGroup>
45+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net9.0'">
46+
<PackageReference Include="OData2Linq" />
47+
</ItemGroup>
48+
4349
</Project>

dotnet/src/Plugins/Plugins.StructuredData.EntityFramework/StructuredDataService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
using System.Linq;
77
using System.Threading;
88
using System.Threading.Tasks;
9+
#if NET8_0_OR_GREATER
10+
using OData2Linq;
11+
#else
912
using Community.OData.Linq;
13+
#endif
1014

1115
#pragma warning disable CA1308 // Normalize strings to uppercase
1216

0 commit comments

Comments
 (0)