Azure Function v4 - Entry point not found in assembly

Hello,

I encountered this error on two machines (the newest Rider installed):

Unhandled exception. System.MissingMethodException: Entry point not found in assembly 

I don't know whether to submit the issue to the tracker, or if it should be handled differently.

 

3 comments
Comment actions Permalink
Hello,
Could you try to build and run your project from terminal with dotnet run command? Does it work?
0
Comment actions Permalink

It starts when I type 

func start

But when I run

dotnet run

This is the .csproj that was generated by Rider

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.1" />
<PackageReference Include="Stripe.net" Version="40.16.0" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>

 

0
Comment actions Permalink

Ok, I found a problem. 

Azure Functions v4 is run only as an Isolated Process:
https://techcommunity.microsoft.com/t5/apps-on-azure-blog/net-on-azure-functions-roadmap/ba-p/2197916

So we need to create for it a typical Program file:

https://github.com/manuelspinto/azure-function-example-csharp/blob/master/src/Program.cs

Probably yours Azure Function templates doesn't take it into consideration :)

0

Please sign in to leave a comment.