所以我正在制作一个Playfab AIP看这个我这样做我按照所说的做了一切 https://api.playfab.com/docs/getting-started/csharp-getting-started 但现在我在构建上遇到错误
1> ------ Build build:Project:ConsoleApp2,配置:调试任何CPU ------ 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(8,12,8,25):错误CS0579:复制' AssemblyTitle'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(9,12,9,31):错误CS0579:复制' AssemblyDescription'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(11,12,11,27):错误CS0579:复制' AssemblyCompany'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(12,12,12,27):错误CS0579:复制' AssemblyProduct'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(13,12,13,29):错误CS0579:复制' AssemblyCopyright'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(14,12,14,29):错误CS0579:复制' AssemblyTrademark'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(35,12,35,27):错误CS0579:复制' AssemblyVersion'属性 1> D:\ DataBAse \ ConsoleApp2 \ ConsoleApp2 \ Properties \ AssemblyInfo.cs(36,12,36,31):错误CS0579:复制' AssemblyFileVersion'属性 ==========构建:0成功,1个失败,0个最新,0个跳过==========
这是我的代码:
using System;
using System.Threading;
using System.Threading.Tasks;
using PlayFab;
using PlayFab.ClientModels;
public static class Program
{
private static bool _running = true;
static void Main(string[] args)
{
PlayFabSettings.TitleId = "144"; // Please change this value to your own titleId from PlayFab Game Manager
var request = new LoginWithCustomIDRequest { CustomId = "GettingStartedGuide", CreateAccount = true };
var loginTask = PlayFabClientAPI.LoginWithCustomIDAsync(request);
// If you want a synchronous ressult, you can call loginTask.Wait() - Note, this will halt the program until the function returns
while (_running)
{
if (loginTask.IsCompleted) // You would probably want a more sophisticated way of tracking pending async API calls in a real game
{
OnLoginComplete(loginTask);
}
// Presumably this would be your main game loop, doing other things
Thread.Sleep(1);
}
Console.WriteLine("Done! Press any key to close");
Console.ReadKey(); // This halts the program and waits for the user
}
private static void OnLoginComplete(Task<PlayFabResult<LoginResult>> taskResult)
{
var apiError = taskResult.Result.Error;
var apiResult = taskResult.Result.Result;
if (apiError != null)
{
Console.ForegroundColor = ConsoleColor.Red; // Make the error more visible
Console.WriteLine("Something went wrong with your first API call. :(");
Console.WriteLine("Here's some debug information:");
Console.WriteLine(PlayFabUtil.GetErrorReport(apiError));
Console.ForegroundColor = ConsoleColor.Gray; // Reset to normal
}
else if (apiResult != null)
{
Console.WriteLine("Congratulations, you made your first successful API call!");
}
_running = false; // Because this is just an example, successful login triggers the end of the program
}
}`