Unable to Compile C#7 syntax
I am writing a Microsoft Bot application and I'm getting compile errors on Azure for all the C# 7 things I try.
Command: "D:\home\site\deployments\tools\deploy.cmd" Handling .NET Web Application deployment. MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin\amd64'. All packages listed in packages.config are already installed. Dialogs\TemplatedDialog.cs(54,43): error CS1003: Syntax error, ':' expected [D:\home\site\repository\LeadGeneratorBot\LeadGeneratorBot.csproj] Dialogs\TemplatedDialog.cs(65,41): error CS1003: Syntax error, ':' expected [D:\home\site\repository\LeadGeneratorBot\LeadGeneratorBot.csproj] Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\LeadGeneratorBot\LeadGeneratorBot.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d531456869ed58";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\repository.\" An error has occurred during web site deployment. \r\nD:\Program Files (x86)\SiteExtensions\Kudu\67.61109.3117\bin\Scripts\starter.cmd "D:\home\site\deployments\tools\deploy.cmd"
TemplateDialog code switch(myObj) { case IInterface1 q : // ln 54 break; case IInterface2 q: // ln 65 break; }
Any suggestions?
After some more investigation, my bot was not an Azure function bot it is configured as an app service.