Search code examples
asp.netwcfentity-framework-ctp5

Why can't I reference the project I created earlier from my wcf service class library?


Warning 1 The referenced assembly "C:\Users\rzv\Desktop\CompanyAnalyse1.0\AnalyserModel\bin\AnalyserModel.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.

Why do I get this? AnalyserModel is a class library that uses Entity framework code first 5 to save data in a database. I tryed to create a new WCF service application that uses the methods in AnalyserModel. What is wrong?


Solution

  • You need to change the target framework from 4.0 client profile to 4.0. you can do this on the projects properties page.