ASP.NET MVC 3 - microsoft-web-helpers v1.1 的问题
我从 nuget 升级了我的 microsof-web-helpers 软件包,它本身依赖于 facebook 和 twitter API。现在,当我的应用程序尝试运行时,出现以下错误:
编译器错误消息:CS0246:找不到类型或命名空间名称“SimpleMembershipProvider”(您是否缺少 using 指令或程序集引用?)
Source Error:
Line 216: }
Line 217:
Line 218: private static SimpleMembershipProvider GetMembershipProvider() {
Line 219: var provider = Membership.Provider as SimpleMembershipProvider;
Line 220:
Source File: c:\Users\jp\documents\visual studio 2010\projects\myproj\myproj\App_Code\Facebook.cshtml Line: 218
我想知道是否有人有遇到这个问题,可以告诉我是否需要向我的项目添加任何其他引用,或者更糟糕的是,在我的应用程序中创建一个虚拟的 SimpleMembershipProvider。我对更新 facebook 代码犹豫不决,因为每当我从 nuget 获取最新的 microsoft-web-helpers 时,我都将被迫维护此文件。
谢谢
太平绅士
I upgraded my microsof-web-helpers package from nuget and it itself depends on facebook and twitter APIs. Now when my app attempts to run I get the following error:
Compiler Error Message: CS0246: The type or namespace name 'SimpleMembershipProvider' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 216: }
Line 217:
Line 218: private static SimpleMembershipProvider GetMembershipProvider() {
Line 219: var provider = Membership.Provider as SimpleMembershipProvider;
Line 220:
Source File: c:\Users\jp\documents\visual studio 2010\projects\myproj\myproj\App_Code\Facebook.cshtml Line: 218
I was wondering if anyone has come across this issue and can tell me if I need to add any additional references to my project or, worse, create a dummy SimpleMembershipProvider in my app. I am hesitant to update the facebook code because, anytime I get the latest microsoft-web-helpers from nuget i'll be forced to maintain this file.
Thanks
JP
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有同样的问题。
经过一番谷歌搜索后,我找到了解决此问题的简单方法。如此处所述,您只需复制 WebMatrix.Data.dll 并WebMatrix.WebData.dll 文件复制到您的 bin 目录中。
但我建议将对 WebMatrix.Data.dll 和 WebMatrix.WebData.dll 的引用添加到项目中(并将它们的“Copy Local”属性设置为 true)。然后,即使您删除了 bin 目录(如果使用版本控制,这是首选),这些文件也将在构建后始终复制到 bin 目录。
I have the same problem.
After some googling I've found simple solution for this issue. As described here, all you need is just copy the WebMatrix.Data.dll and WebMatrix.WebData.dll files to your bin directory.
But I suggest to add references to WebMatrix.Data.dll and WebMatrix.WebData.dll to the project (and set "Copy Local" property to true for them). Then these files will be copied to the bin directory always after build, even if you remove the bin directory (which is preferred if you use version control).