Cant find NinjectWebCommon in asp.net Web API Proj

2019-07-24 04:16发布

I am creating an asp.net web api project. I am using Ninject for dependency resolver. I am adding Ninject.Web.WebAPI from nuget. But I don't find any NinjectWebCommon.cs in my App_Start folder

Do i need to install any aditional package??

1条回答
贼婆χ
2楼-- · 2019-07-24 04:54

Install Ninject.Web.WebApi.WebHost if you are hosting the WebApi project via IIS - this will create NinjectWebCommon.cs.

See the wiki for more info on different types of WebApi projects. https://github.com/ninject/Ninject.Web.WebApi/wiki/Setting-up-an-mvc-webapi-application

查看更多
登录 后发表回答