Hi @Elizabeth McKinnie , set the <OutputType />
in your csproj to Exe, build, and upload that exe as the webjob.
<Project Sdk="Microsoft.NET.Sdk;Microsoft.NET.Sdk.Publish">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions" Version="4.0.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.1" />
<PackageReference Include="Microsoft.Azure.WebJobs.Logging.ApplicationInsights" Version="3.0.33" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
</ItemGroup>
...
</Project>
The platform will detect the executable and automatically run it based on the trigger configuration.
EDIT 2023 Feb 13
Updating for the broader community. Based on our offline conversation, you received a window that said the WebJob failed to create. We inspected that response for that action and noticed it was 403 error. When we attempted to access the Kudu site, that was blocked. We checked the network settings and notice access restrictions were applied for both the main site and the advanced tool site (i.e. Kudu). This was the root the cause of the issue and removed the restriction on your Kudu site.
You were able to proceed with uploading your published zip file but the platform couldn't determine the file to run since your zip contained two different executables. To work around this issue, you were going to create a .cmd
file that the platform can use to start the WebJob.