Skip to content

Commit 51c8d02

Browse files
Add net462 target to GXOData.Client.All for .NET Framework consumers (#11)
The 6.0-GX line resynced with upstream simple-odata-client, which dropped the net4x target and now ships only net8.0/net7.0/netstandard2.0. As a result, .NET Framework consumers (notably GeneXus-generated KBs built with the legacy v4.0.30319 MSBuild) resolve the netstandard2.0 asset, whose public types (e.g. ODataEntry) live in a netstandard-targeted assembly. Those projects do not pull in the netstandard.dll facade automatically, so the C# compiler cannot resolve System.Object for those types and fails with CS0012, cascading into CS1593 overload-resolution errors against the GXODataClient query delegates. Re-add a native .NET Framework asset so NuGet/the GeneXus build prefer it over netstandard2.0 on net46x+ projects: - GXOData.Client.All.csproj: add net462 to TargetFrameworks, plus a net462-only ItemGroup. net462 lacks types the netstandard2.0 sources assume: reference System.Net.Http (4.3.4, matching DynServiceOData), add System.ValueTuple (4.5.0, in-box only from net47), and import System.Net.Http explicitly since the SDK adds it to ImplicitUsings only for .NET/.NET Standard TFMs, not .NET Framework. - GXOData.Client.nuspec: add the net462 dependency group and lib\net462 file entries. - Bump AssemblyVersion 6.0.2.0 -> 6.0.3.0 so a new package is published. Verified: net462 builds clean, the full solution builds, and dotnet pack produces a nupkg containing lib/net462/GXOData.Client.All.dll. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1cd2f83 commit 51c8d02

3 files changed

Lines changed: 23 additions & 2 deletions

File tree

GXOData.Client.nuspec

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
<language>en-us</language>
2020
<tags>odata data rest client netstandard net7 net8 mono android ios</tags>
2121
<dependencies>
22+
<group targetFramework="net462">
23+
<dependency id="Microsoft.Data.OData" version="[5.8.4, 6.0.0)" />
24+
<dependency id="Microsoft.OData.Core" version="[7.4.4, 8.0)" />
25+
<dependency id="System.Net.Http" version="4.3.4" />
26+
<dependency id="System.ValueTuple" version="4.5.0" />
27+
</group>
2228
<group targetFramework="netstandard2.0">
2329
<dependency id="Microsoft.Data.OData" version="[5.8.4, 6.0.0)" />
2430
<dependency id="Microsoft.OData.Core" version="[7.4.4, 8.0)" />
@@ -34,6 +40,10 @@
3440
</dependencies>
3541
</metadata>
3642
<files>
43+
<!-- net462 -->
44+
<file src="build\Release\GXOData.Client.All\net462\GXOData.Client.All.dll" target="lib\net462\GXOData.Client.All.dll" />
45+
<file src="build\Release\GXOData.Client.All\net462\GXOData.Client.All.xml" target="lib\net462\GXOData.Client.All.xml" />
46+
3747
<!-- netstandard2.0 -->
3848
<file src="build\Release\GXOData.Client.All\netstandard2.0\GXOData.Client.All.dll" target="lib\netstandard2.0\GXOData.Client.All.dll" />
3949
<file src="build\Release\GXOData.Client.All\netstandard2.0\GXOData.Client.All.xml" target="lib\netstandard2.0\GXOData.Client.All.xml" />

src/GXOdata.Client.All/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
44

55
<PropertyGroup>
6-
<AssemblyVersion>6.0.2.0</AssemblyVersion>
6+
<AssemblyVersion>6.0.3.0</AssemblyVersion>
77
<FileVersion>$(AssemblyVersion)</FileVersion>
88
<InformationalVersion>$([System.DateTime]::UtcNow.ToString("yyyyMMddHHmmss")).$(GITHUB_SHA)</InformationalVersion>
99
<Company>GeneXus</Company>

src/GXOdata.Client.All/GXOData.Client.All.csproj

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net8.0;net7.0;netstandard2.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0;net7.0;netstandard2.0;net462</TargetFrameworks>
44
<RootNamespace>Simple.OData.Client</RootNamespace>
55
<OutputPath>$(SolutionDir)/build/$(Configuration)/$(AssemblyName)/$(TargetFramework)/</OutputPath>
66
<OutDir>$(OutputPath)</OutDir>
@@ -31,6 +31,17 @@
3131
<PackageReference Include="Microsoft.OData.Core" Version="[7.4.4, 8.0)" />
3232
</ItemGroup>
3333

34+
<!-- net462 lacks the in-box types the netstandard2.0 sources rely on:
35+
System.Net.Http must be referenced explicitly, and ValueTuple<> only
36+
ships in-box from net47 onward. -->
37+
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
38+
<PackageReference Include="System.Net.Http" Version="4.3.4" />
39+
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
40+
<!-- The SDK adds System.Net.Http to ImplicitUsings only for .NET/.NET Standard
41+
TFMs, not for .NET Framework, so import it explicitly here. -->
42+
<Using Include="System.Net.Http" />
43+
</ItemGroup>
44+
3445
<ItemGroup>
3546
<Compile Include="..\Simple.OData.Client.Core\**\*.cs" Exclude="**\AssemblyInfo.cs;..\Simple.OData.Client.Core\obj\**" Label="Core" />
3647
<Compile Include="..\Simple.OData.Client.V3.Adapter\**\*.cs" Exclude="**\AssemblyInfo.cs;..\Simple.OData.Client.V3.Adapter\obj\**" Label="V3Adapter" />

0 commit comments

Comments
 (0)