MSTest 找不到 App_GlobalResources 程序集
尝试使用 mstest 对 Web 应用程序进行单元测试时,我遇到了 Web 应用程序中 App_GlobalResources 文件夹中包含的资源的问题。
这些资源是在运行时构建的,因此在运行单元测试时找不到它们。
你如何解决这个问题?
Trying to unit test a web application using mstest I have that problem with resources included in App_GlobalResources folder in the web applications.
Those resources are built at runtime and because of that they are not found when running the unit tests.
How are you solving this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现的最可接受的解决方案是避免使用 App_GlobalResources 并在编译时配置资源构建:
http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-项目.aspx
The most acceptable solution I have found is to avoid using App_GlobalResources and configure resource building at compile time:
http://odetocode.com/Blogs/scott/archive/2009/07/16/resource-files-and-asp-net-mvc-projects.aspx