InvalidOperationException rendering ViewComponent in Strongly-Typed View
问题 Recently updated dotnet core 1.0.1 to 1.1 and ViewComponent in MVC starts failing with the below exception: InvalidOperationException: One or more errors occurred. (The model item passed into the ViewDataDictionary is of type 'App.Models.HomeViewModel', but this ViewDataDictionary instance requires a model item of type 'App.Components.LoginViewComponent'.) The Index.cshtml renders LoginViewComponent : @model App.Models.HomeViewModel <html> @Component.InvokeAsync("LoginViewComponent") </html>