The referenced assembly "some.dll" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
This annoying exception tormented me for almost a day, while I was developing and WPF - nhibernate application using VS 2010.
By the way the error had nothing to do with either nhibernate or WPF. As I found out this was due to the more compact version of the .NET framework (client profile) introduced with VS2010.
Resolution – By Default the desktop client applications like Windows Forms and WPF applications) targets .NET Framework (Client profile) as client profile is just a subset of the .NET framework introduced to improve the deployment experience. Therefore re-target your applications to Full .NET framework instead of the compact framework to get rid of the Error. As you can see the error pops up only when you refernce assemblies like System.Web, System.Data.OracleClient etc. which are not part of the Compact framework.
There is a good article on the two Frameworks here: http://blogs.msdn.com/b/jgoldb/archive/2009/10/19/what-s-new-in-net-framework-4-client-profile-beta-2.aspx
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment