ASP.NET MVC 3 - Issues with microsoft-web-helpers v1.1

帅比萌擦擦* 提交于 2019-12-20 12:08:29

问题


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


回答1:


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).



来源:https://stackoverflow.com/questions/4687438/asp-net-mvc-3-issues-with-microsoft-web-helpers-v1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!