Friday, May 6, 2011

The referenced assembly could not be resolved because it has a dependency on System.Data.OracleClient

Received the following build error:
The referenced assembly "xxx" could not be resolved because it has a dependency on "System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 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 re-targeting your project.

This build error is caused by the project is targeting .NET Framework 4.0 Client Profile and references to an assembly, which has indirect reference on System.Data.OracleClient.dll that is not included in the .NET Framework 4 Client Profile.

To fix such errors, you can either remove the incorrect assembly reference from the project, or set the project to target to full .NET Framework version 4 instead of .NET Framework 4 Client Profile.

To change the target setting, go to “Project -> Project's Properties -> Application Tab”, and then change to appropriate Target Framework options.
 

Get paid for your opinions! Click on the banner above to join Planet Pulse. Its totally free to sign up, and you can earn UNLIMITED. Find out more by visiting PLANET PULSE.
July Code Blog Copyright © 2010 Blogger Template Designed by Bie Blogger Template