I'm having an issue with my Class Library in Visual Studio C# Express 2010. The project is configured with a target framework of the .NET 4.0 (not Client Profile).
In my class library, I have added a reference to System.Web to get the URL Encoding to work for my oAuth library.
When building the DLL, and the associated testing application, I get the following error:
Error 1 The type or namespace name 'TwitterAPI' could not be found (are you missing a using directive or an assembly reference?) C:\Users\sammarks\Documents\Programming\Twitter.NET\Tester\Program.cs 5 7 Tester
And, I get the follow warning message:
Warning 2 The referenced assembly "C:\Users\sammarks\Documents\Programming\Twitter.NET\TwitterAPI\bin\Release\TwitterAPI.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. Tester
I'm not sure why it does this, but that's why I came here. I've tried retargeting the class library to 3.5, but that did nothing but mess it up further.
I've also tried to re-add the System.Web to the references, but that didn't help either.
Any suggestions?
Target the full .NET Framework 4.0 for access to System.Web (not the Client Profile):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With