配置 ninject 以与 azure 配合使用
我无法让 Ninject 在 Azure 应用程序中启动。如果我将 mvc3 项目设置为启动项目,一切正常,但如果我使用云项目,ninject 不会加载。我需要将其设置为从某个地方开始吗?
正如您可能想象的那样,我对 azure 完全陌生。
I cant get Ninject to start in a Azure application. If i set the mvc3 project as startup project, everything works fine, but if i use the cloud project, ninject does not load. Do i need to set it to start somewhere?
as you might imagine, i am totally new to azure.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您遇到具体错误吗?我们在 Azure 中使用 Ninject 就很好了。只需确保 .DLL 与应用程序一起部署
Are you getting specific errors? We use Ninject in Azure just fine. Just had to make sure that .DLL's were deployed with the application
正如 @Igorek 指出的,请确保您将 Ninject DLL 与您的项目一起提供。
要实现此目的,请查看 Ninject.DLL 引用的属性。您应该将
Copy Local
设置为true
。如果您不这样做,Ninject DLL 将不会成为 Windows Azure 角色实例中部署的一部分。As @Igorek pointed out, make sure you're shipping the Ninject DLLs along with your project.
To accomplish this, look at the properties of the Ninject.DLL reference. You should have
Copy Local
set totrue
. If you don't do this, the Ninject DLL won't be part of your deployment in your Windows Azure Role instances.