私はAsp.Net 3.5アプリケーションでFacebook SDK C#ライブラリを使用しています。下のコードをコンパイルしようとすると、エラーが出る。 4.0フレームワークで使用している動的なタイプを知っています。 それを動作させるには、それを書き直すのはどうですか? 私はSystem.Core 3.5への参照を持っているが、それはまだ、動的にC#4.0で利用可能ですコンパイラが必要なタイプのため、ダイナミックを利用するクラスまたはメンバを定義できません
protected void Page_Load(object sender, EventArgs e)
{
if (Request.Params.AllKeys.Contains("signed_request"))
{
var result = FacebookSignedRequest.Parse(FacebookContext.Current.AppSecret, Request.Params["signed_request"]);
dynamic signedRequestValue = result.Data;
this.RegistrationData = signedRequestValue.registration;
}
else
{
Response.Redirect("~/");
}
}
protected dynamic RegistrationData { get; set; }
Error 1 Cannot define a class or member that utilizes 'dynamic' because the compiler required type 'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you missing a reference to System.Core.dll?
Error 2 Cannot define a class or member that utilizes 'dynamic' because the compiler required type 'System.Runtime.CompilerServices.DynamicAttribute' cannot be found. Are you missing a reference to System.Core.dll?
この時点で私のアプリケーションを4.0に変換することはできません。コードを調整する方法はありますか? – Anton
result.Dataから返される値のデータ型を知っていますか? – Chandu
キーと値を含む戻り値のFacebook.Json.Object。値は文字列です – Anton