I had a problem with my class library in Visual Studio C # Express 2010. The project is configured with the target structure of .NET 4.0 (and not with the client profile).
In my class library, I added a link to System.Web to get the URL encoding for my oAuth library.
When creating a DLL and its associated test 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 following 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 this is so, but why I came here. I tried to redirect the class library to 3.5, but it didn’t help, but it was useless.
I also tried re-adding System.Web to the links, but that didn't help either.
Any suggestions?
sammarks
source share