-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
var client = new GitLabClient("https://git.xxx.yy", "XXX");
var groupQueryAllAvailable = new GroupQuery
{
AllAvailable = true,
};
foreach (var group in client.Groups.GetAsync(groupQueryAllAvailable))
Console.WriteLine(group.Name);csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<PublishAot>true</PublishAot>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NGitLab" Version="6.50.2" />
</ItemGroup>
</Project>Error occurs:
System.InvalidOperationException:
'Reflection-based serialization has been disabled for this application.
Either use the source generator APIs or explicitly
configure the 'JsonSerializerOptions.TypeInfoResolver' property.'
Stack-trace:
at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled()
at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer()
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions options, Type inputType)
at System.Text.Json.JsonSerializer.GetTypeInfo[T](JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at NGitLab.Impl.Json.Serializer.Deserialize[T](String json) <-- HERE
at NGitLab.Impl.HttpRequestor.Enumerable`1.<GetEnumerator>d__5.MoveNext() <-- HERE
at Program.<Main>$(String[] args) in D:\imba.sandbox\gitlab-roles\gitlab-roles\Program.cs:line 12
Metadata
Metadata
Assignees
Labels
No labels