Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find AddMvc() in IServiceCollection in Visual Studio 2017

I have created a brand new asp.net core application. I have added the mvc Nuget package yet I am getting the below error.

Microsoft.AspNetCore.Mvc.Core 1.1.3

'IServiceCollection' does not contain a definition for 'AddMvc' and no extension method 'AddMvc' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)**

like image 943
maxspan Avatar asked May 15 '17 00:05

maxspan


1 Answers

I think , AddMvc changed to AddMvcCore()

like image 133
cindy Avatar answered Oct 19 '22 22:10

cindy