So I’m working on a project which is built in the version visual studio 2005 under the framework 2.0. Now I moved the project to the new version of the visual studio 2010 sp1 under the version and start to realize they are throwing this errors and warnings with the dependencies, for example
Warning 1 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".
Bring me the consequence that the application doesn’t read the reference that I added, but changing the framework. .Net framework 4.0 the problem was solved. Testing I change them to .net framework 4.0 client profile and I realized the build errors and warnings appear again.
Now my question it’s why setting .net 4.0 work and not with the client profile?? I need a good explanation because I’m not an expert in this part.
The Client Profile only includes a subset of the whole .NET framework, a subset that should be sufficient to make desktop applications, while making it easier to redistribute .NET with your application.
As mentioned in a blog post introducing the Client Profile, the Oracle Client feature isn’t included in the Client Profile. This is likely because Oracle Client is deprecated as of .NET 4 (the same release that introduces the Client Profile), and you should phase out using it altogether. (It’s also arguably not really appropriate for inclusion in the Client Profile anyway.)
If you need to connect to Oracle from your application, you should either target the full .NET framework, or preferrably use a third-party driver library – presumably one developed by Oracle, not by Microsoft – that’s going to stay up-to-date. (The InfoQ article about the deprecation lists several alternatives.)