I migrated to a newer version in VS Code and now I get two errors in my Azure functions.
The namespace Plugins doesn't exist in PlayFab:
using PlayFab.Plugins.CloudScript;
and:
var context = await FunctionContext<dynamic>.Create(req);
The name 'FunctionContext' does not exist in the current context
What should I change in my code?
My Azure function looks like this:
[FunctionName("ChangeDisplayname")]
public static async Task<dynamic> MakeApiCall(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequestMessage req, ILogger log)
{
var context = await FunctionContext<dynamic>.Create(req);
var args = context.FunctionArgument;
var language = args["Language"];
var desireddisplayname = args["NewDisplayname"];
log.LogInformation($"The new displayname = {desireddisplayname}");
var playfabid = context.CallerEntityProfile.Lineage.MasterPlayerAccountId;
var adminApi = new PlayFabAdminInstanceAPI(context.ApiSettings, context.AuthenticationContext);
...