MVC5 Microsoft.CSharp.RuntimeBinder.RuntimeBinderException

前端 未结 7 1942
春和景丽
春和景丽 2021-02-01 21:52

Ive been working on converting a MVC4 project over to MVC5. The first day I ran into an \'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException\' but was able to resolve it by s

7条回答
  •  礼貌的吻别
    2021-02-01 22:32

    Found a solution for my own (mvc5) project after some experimenting.

    I had a _ExternalLoginsListShoppingCartPartial.cshtml (from my mvc4 project) with @model ICollection at the top. I commented it out and rebuild the solution and suddenly it works. I'm not even using that partial view in any view so it's a pretty nasty bug imo.

    So check in your project. You may have some mvc4/simplemembership stuff that is messing up your mvc5 project.

提交回复
热议问题