.net – 不能使用moles来模拟MVC框架
我试图为System.Web.Mvc DLL版本3生成痣,但是我收到以下错误:
Moles : info : metadata : loading C:TFS.as12.ProjectsProject XMainSource3rdPartyComponentsMVC3System.Web.Mvc.dll Moles : info : compilation : output assembly name: System.Web.Mvc.Moles Moles : warning : metadata : failed to load module System.Web.Mvc.dll: Moles : warning : metadata : Inheritance security rules violated by type: 'System.Web.Mvc.CompareAttribute'. Derived types must either match the security accessibility of the base type or be less accessible. Moles : warning : metadata : Inheritance security rules violated by type: 'System.Web.Mvc.RemoteAttribute'. Derived types must either match the security accessibility of the base type or be less accessible. Moles : error : code : assembly contains no types or failed to load properly 00:00:00.53> moles generator 1 errors,3 warnings Moles compilation FAILED - 6,18794176354816s C:Program Files (x86)Microsoft MolesbinMicrosoft.Moles.targets(79,5): error MSB3073: The command ""C:Program Files (x86)Microsoft Molesbinmoles.exe" @"C:TFS.as12.ProjectsProject XMainSourceX.WebX.Web.Base.Mvc.UnitTestobjDebugMolesmoles.args"" exited with code -1002. 我在微软论坛上看到了更多关于此的问题,但从来没有回答过. 解决方法
这与
known issue有关.如果您已经开始使用带有MVC3的Moles,您可以执行以下操作(我已经这样做了):
>下载MVC3 source code. 您在步骤8中生成的System.Web.Mvc.Moles.dll将引用真正的MVC dll,这要归功于您所做的公钥切换.您可以使用它来存根/鼹鼠MVC类到您心中的内容. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc – 在MVC项目中创建区域
- asp.net-mvc – ASP.NET MVC FluentValidation PartialView
- asp.net – 如何使用CSS垂直向下移动div
- asp.net-mvc – 具有错误的剃刀语法编译时不应该编译
- .NET Core全新的配置管理[共9篇]
- 在ASP.Net ReportViewer中使用SSRS
- asp.net-mvc-3 – 无效的匿名类型成员声明符 必须使用成员分
- asp.net-mvc – 如何告诉Ninject绑定到它没有引用的实现
- asp.net – Form .NET中的输入元素名称
- asp.net-mvc-3 – 在使用Unity容器时为此对象异常定义的无参
- asp.net – 解析美国邮政地址的免费API?
- Asp.net Core 微信小程序支付
- asp.net-mvc – RavenDB Ids和ASP.NET MVC3路由
- asp.net-mvc-3 – 不为CompareAttribute DataAnn
- asp.net-mvc-3 – 如何在输出缓存中使用动态持续
- asp.net-mvc – OnModelCreating与数据库配置的D
- 如何在Substitution控件中使用ASP.Net服务器控件
- asp.net-mvc – MVC3 – RenderSection中的Rende
- asp.net – Azure上的联合身份验证
- asp.net – 第一次访问网站需要非常长的时间(总共