Just learning Azure Function from this link and followed the sample TICTACTOE. Both samples worked without any issues, then created my own project and ran into bunch of errors as below.
D:\Unity\Playfab_CloudFunctions\Util\Settings.cs(8,44): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\Settings.cs(18,44): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\GetGameTitleData.cs(9,101): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(10,127): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(10,159): error CS0246: The type or namespace name 'PlayFabAuthenticationContext' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(9,10): error CS0246: The type or namespace name 'FunctionNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(9,10): error CS0246: The type or namespace name 'FunctionName' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(11,78): error CS0246: The type or namespace name 'HttpRequest' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(12,13): error CS0246: The type or namespace name 'ILogger' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(10,29): error CS0246: The type or namespace name 'Task<>' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(10,34): error CS0246: The type or namespace name 'IActionResult' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(29,118): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(29,150): error CS0246: The type or namespace name 'PlayFabAuthenticationContext' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(52,116): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(52,148): error CS0246: The type or namespace name 'PlayFabAuthenticationContext' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(70,126): error CS0246: The type or namespace name 'PlayFabApiSettings' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\Util\PlayerUserData.cs(70,158): error CS0246: The type or namespace name 'PlayFabAuthenticationContext' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(11,14): error CS0246: The type or namespace name 'HttpTriggerAttribute' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(11,14): error CS0246: The type or namespace name 'HttpTrigger' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(11,26): error CS0103: The name 'AuthorizationLevel' does not exist in the current context [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] D:\Unity\Playfab_CloudFunctions\InitPlayerData.cs(11,63): error CS0246: The type or namespace name 'Route' could not be found (are you missing a using directive or an assembly reference?) [D:\Unity\Playfab_CloudFunctions\Playfab_CloudFunctions.csproj] The terminal process "C:\Program Files\dotnet\dotnet.exe 'build', '/property:GenerateFullPaths=true', '/consoleloggerparameters:NoSummary'" terminated with exit code: 1.
Playfab_CloudFunctions.csproj
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <AzureFunctionsVersion>v4</AzureFunctionsVersion> <DefineConstants>NETCOREAPP2_0</DefineConstants> </PropertyGroup> <ItemGroup> <PackageReference Include="PlayFabAllSDK" Version="1.107.211209"/> <PackageReference Include="PlayFabCloudScriptPlugin" Version="1.53.190627-alpha"/> <PackageReference Include="Azure.Core" Version="1.21.0"/> <PackageReference Include="NETStandard.Library" Version="2.0.3"/> <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1"/> </ItemGroup> <ItemGroup> <None Update="host.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> <None Update="local.settings.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToPublishDirectory>Never</CopyToPublishDirectory> </None> </ItemGroup> </Project>
host.json
{ "version": "2.0", "extensions": { "http": { "routePrefix": "api" } }, "logging": { "applicationInsights": { "samplingSettings": { "isEnabled": true, "excludedTypes": "Request" } } } }
How do i resolve this?