Hi Fiaz
Awan,
Thank you
for contacting us. This issue occurs because our Grid.Windows package has a
dependency on Microsoft.WinForms.Designer.SDK starting with version 26.1.35.
As a result, you may encounter ambiguous call errors since GetRequiredService
is defined in both Microsoft.Extensions.DependencyInjection and
Microsoft.WinForms.Designer.SDK. To fix this, fully qualify the
Microsoft.Extensions.DependencyInjection extension when calling
GetRequiredService, as shown below:
|
// Ambiguous call after adding
Syncfusion.Tools.Windows
// var
greeter = provider.GetRequiredService<IGreeter>();
var
greeter = Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<IGreeter>(provider);
//this line will solve the error.
|
If the
issue persists, please share a modified or reproducible sample, a video, or a
code snippet so we can provide a faster, more accurate solution.
Regards,
Subashini
M.
Attachment:
AmbiguousSample_d42994f1.zip