. NET Core 2.2 tabanlı bir mikro hizmetim var. Servis veriyolu olarak RawRabbit (sürüm 2.0.0-beta9) kullanıyorum. Onunla birlikte aşağıdaki paketler kuruldu:
<PackageReference Include="RawRabbit" Version="2.0.0-beta9" />
<PackageReference Include="RawRabbit.DependencyInjection.ServiceCollection" Version="2.0.0-beta9" />
<PackageReference Include="RawRabbit.Operations.Publish" Version="2.0.0-beta9" />
<PackageReference Include="RawRabbit.Operations.Subscribe" Version="2.0.0-beta9" />
Denetleyicim böyle görünüyor:
private readonly IBusClient _busClient;
//...constructor that inits the _busClient
[HttpPost("")]
public async Task<IActionResult> Post([FromBody] CreateActivity model)
{
model.Id = Guid.NewGuid();
await _busClient.PublishAsync(model); //Exception thrown here
return Accepted($"Activities/{model.Name}");
}
Kod aşağıdakileri yapmaya çalıştığında sorun oluşur:
await _busClient.PublishAsync(model);
Aldığım istisna şu::
Yöntem bulunamadı: 'Void Newtonsoft.Json.JsonSerializer.set_TypeNameAssemblyFormat (Sistem.Çalışma.Seri hale getirme.Biçimlendiriciler.FormatterAssemblyStyle)'.