StatsManager 在 AddLocalUser 上抛出错误

StatsManager throws Error on AddLocalUser

我试图通过首先添加本地用户来使用 C# StatsManager。我的代码如下

XboxLiveUser user = new XboxLiveUser();
SignInResult x = await user.SignInAsync(); //returns successfully
statManager = StatsManager.Singleton;
statManager.AddLocalUser(user);

主循环:

List<StatEvent> statevents = statManager.DoWork
if (statevents.Count>0)
{

}

本地用户添加事件永远不会触发,而是在 API 中抛出错误,如下所示。在

上引发错误

getResponseCompletionSource.SetResult(getResponseTask.Result);

XboxLiveHttpRequest.cs 第 117 行

mscorlib.ni.dll 中发生类型 'System.AggregateException' 的异常,但未在用户代码中处理

出现一个或多个错误。 (出现一个或多个错误。(远程服务器返回错误:(404) 未找到。))

您认为可能是什么问题?另一个API的作品,能够登录,从Socialmanager获取GamerTag和GamerPic等...

另见截图

谢谢

如果您的项目加载的 XboxServices.config 文件有问题,就会发生此错误。

验证配置文件是否包含设置为适当值的 ServiceConfigurationId 属性。

注意:如果您使用 Xbox Live 关联向导,它应该会自动下拉适当的值并填充 .config 文件。