0

I am getting this error

mscorlib: Could not load file or assembly 'Microsoft.Azure.WebJobs, Version=3.0.2.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx' or one of its dependencies. The system cannot find the file specified.

while running azure function application on VS2019. I have added packages for Microsoft.Azure.WebJobs.Core & Microsoft.Azure.WebJobs.Extensions.DurableTask. Also have updated all references to latest version.

Milo
  • 3,365
  • 9
  • 30
  • 44
paresh
  • 56
  • 3
  • Even though you add references. sometimes there won't be DLL s added in the working location. Please check whether all the referenced DLL s are available in the running location. – mohammed mazin Jan 23 '20 at 06:53

1 Answers1

0

You're probably hitting Azure/azure-functions-vs-build-sdk#333, You're also need to add the following to csproj file to work around that .NET Core 3.0 SDK bug:

<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" />

Cindy Pau
  • 13,085
  • 1
  • 15
  • 27