ASP.NET MVC System.Web.Routing.RouteCollection 参考不明确?
我正在尝试编写一个单元测试来测试路线;但是,该项目无法解析 RouteCollection。当我引用 dll(从系统以及浏览到我的 MVC 项目)并使用 FQN (System.Web.Routing.RouteCollection) 时,它抱怨引用不明确。
顺便说一句,当查看 System.Web.Routing 的智能感知时,每个项目都是重复的!
你能帮忙吗?
I am trying to write a unit test for testing routes; however, the project is failing to resolve the RouteCollection. When I reference the dll (from the system and also by browsing to my MVC project) and use the FQN (System.Web.Routing.RouteCollection), it complains of an ambiguous reference.
On a side note, when looking at the intellisense for System.Web.Routing, every item is duplicated!
Can you help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用reflector反编译该dll后,我得出的结论是该dll中不存在RouteCollection。事实证明它存在于 System.Web 中
After using reflector to decompile the dll, I came to the conclusion that the RouteCollection did not exist in that dll. Turns out that it exists in System.Web