मैं microservice के आधार पर .नेट कोर 2.2. मैं का उपयोग कर रहा हूँ RawRabbit (संस्करण 2.0.0-beta9) के रूप में सेवा । निम्न संकुल के साथ स्थापित किया गया है:
<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" />
यह है क्या मेरा नियंत्रक की तरह लग रहा है:
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}");
}
समस्या तब होती है जब कोड की कोशिश करता है निम्न करने के लिए:
await _busClient.PublishAsync(model);
अपवाद है:
विधि नहीं मिला: 'शून्य Newtonsoft.Json.JsonSerializer.set_TypeNameAssemblyFormat(System.Runtime.Serialization.Formatters.FormatterAssemblyStyle)'.