私はVisual Studio C#Express 2010で自分のクラスライブラリに問題があります。プロジェクトは.NET 4.0のターゲットフレームワークで構成されていますプロフィール)。C#.NET DLLはSystem.Webの競合のためにビルドされません
私のクラスライブラリでは、System.Webへの参照を追加して、oAuthライブラリで動作するURLエンコーディングを取得しました。
DLLを構築し、関連するテストアプリケーションとき、私は次のエラーを取得:私はなぜわからない
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
:
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
をそして、私がフォローの警告メッセージが表示されますそれはそうしますが、それが私がここに来た理由です。私は3.5にクラスライブラリのターゲットを変更しようとしましたが、それは何もしなかったが、さらにそれを台無しにする。
私はまた、参照にSystem.Webを再追加しようとしましたが、それも役に立たなかったです。
提案がありますか?
Nevermindは、Clientではなく.NET Framework 4自体を意味することを理解していませんでした。 – sammarks
http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/7301dec4-4b96-444d-88bb-630125d080e4 – JohnB
Aha!私のテスタープログラムは、クライアントプロファイルをターゲットにしていました。すべて今働いている。ありがとう! – sammarks