WMAppManifest.xmlに追加しました:
<Capability Name="ID_CAP_IDENTITY_DEVICE" />
<Capability Name="ID_CAP_IDENTITY_USER" />
では、なぜ私は以下から空の文字列を取得し続けるのですか?
public static string GetWindowsLiveAnonymousID()
{
int ANIDLength = 32;
int ANIDOffset = 2;
string result = string.Empty;
object anid;
if (UserExtendedProperties.TryGetValue("ANID", out anid))
{
if (anid != null && anid.ToString().Length >= (ANIDLength + ANIDOffset))
{
result = anid.ToString().Substring(ANIDOffset, ANIDLength);
}
}
return result;
}
そのTryGetValueをうまく処理できないようです...誰かが手がかりを得ましたか?