Closed vinayakshettar closed 4 years ago
AddHybridModelBinder
is part of the Microsoft.Extensions.DependencyInjection
namespace. Make sure this using
-statement is included in your Startup.cs
. It's used like:
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services
.AddMvc()
.AddHybridModelBinder();
}
Closing due to inactivity. Not sure what version of the library this error occurred, but using the latest it should not be a problem. The namespace associated with AddHybridModelBinder
is the same as IServiceCollection
. So, if you have access to the latter you should have access to both.
Severity Code Description Project File Line Suppression State Error CS1929 'IServiceCollection' does not contain a definition for 'AddHybridModelBinder' and the best extension method overload 'HybridMvcCoreBuilderExtensions.AddHybridModelBinder(IMvcBuilder)' requires a receiver of type 'IMvcBuilder'