I am using aspnet core 3.0 and azure function v3-preview with system.data.sqlclient version 4.7.0 When i try to run azure function(on both service queue trigger
It worked for me by adding below code in csproj file :
<Target Name="PostPublish" BeforeTargets="Publish">
<Exec Command="move $(PublishDir)\runtimes $(PublishDir)\bin" />
</Target>
This line should be taking care of that:
<Exec Command="move $(PublishDir)\runtimes $(PublishDir)\bin" />
reference : github
Please make sure your azure function meet these criteria in this link.
And here is a workaround provided by others, add the following to your .csproj:
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy $(OutDir)$(ProjectName).deps.json $(OutDir)bin\function.deps.json" />
</Target>
<Target Name="PostPublish" BeforeTargets="Publish">
<Exec Command="copy $(PublishDir)$(ProjectName).deps.json $(PublishDir)bin\function.deps.json" />
</Target>