开发者

Problems with MembershipUser / System.Web.ApplicationServices when upgrading to .net 4

I have a large vb.net web project that I am trying to updgrade to .net4/VS2010. During compile I get the following error:

'System.Web.Security.MembershipUser' in assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has been forwarded to assembly 'System.Web.ApplicationServices'. Either a reference to 'System.Web.ApplicationServices' is missing from your project or the type 'System.Web.Security.MembershipUser' is missing from assembly 'System.Web.ApplicationServices'.

I researched the issue and the error is accurate. I added a reference to System.Web.ApplicationServices but I am still having problems. The project does not seem to recognize that the reference has been added. Intellisense will not pick it up, I can not use it in an Import statement, etc ...

The assembly is listed in the compile section of my web.config:

<assemblies>
...
    <add assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>开发者_StackOverflow

Any ideas?


Check that the projects on which that one depends also reference System.Web.ApplicationServices.


I recently upgraded a project from 3.5 to 4.0 and received the errors as you defined above. I found that the targetFramework attribute was not included on compilation node in the web.config. This solved my problems with the compilation errors.

compilation debug="false" strict="false" explicit="true" **targetFramework="4.0"**   


Add a reference to the System.Web.Extensions.dll and then try.


PublicKeyToken=31BF3856AD364E35 specified in your compile section of Web.config is different than the requested one (PublicKeyToken=b03f5f7f11d50a3a). Check this out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜