This is driving me crazy. I am getting a load error with Azure functions with Newtonsoft.Json.
This is a .netstandard2.0 project and I have version 11.0.2 installed. I have looked on the web and most others that have had this are using an old version of the Microsoft.NET.Sdk.Functions : 1.0.13 But I am using 1.0.14
See my project file below :
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <AzureFunctionsVersion>v2</AzureFunctionsVersion>
    <RootNamespace>modoapi</RootNamespace>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Autofac" Version="4.2.1" />
    <PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.0-beta5" />
    <PackageReference Include="Microsoft.Azure.WebJobs.ServiceBus" Version="3.0.0-beta5" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.14" />
    <PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>
I have looked at all the dependencies for my project and they all point to Newtonsoft.Json 11.0.2.
The file exists in my output bin folder. I have cleaned the solution. Updated to latest VS and Azure Functions and WebJobs Tools 15.0.40608.0
The Function App starts ok but when I add a message to the queue to invoke a trigger I get the following error in the console.
[12/07/2018 10:56:36] Executed 'ExecuteWorkItem' (Failed, Id=6d87f5e9-c331-4934-a3f3-b9bebf756b54) [12/07/2018 10:56:36] System.Private.CoreLib: Exception while executing function: ExecuteWorkItem. test-api: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'.
Here is the signature for my function
public static class ExecuteWorkItem
{
    [FunctionName("ExecuteWorkItem")]
    public static async Task Run(
        [QueueTrigger("work-item")]string queueItem,
        TraceWriter log,
        ExecutionContext executionContext,
        [Inject(typeof(IWorkItemEngine))]IWorkItemEngine workItemEngine,
        [Table("ResultData", Connection = "AzureWebJobsStorage")] CloudTable resultTable,
        [Table("SimulationNodeData", Connection = "AzureWebJobsStorage")] CloudTable simulationNodeTable)
    {}
Any ideas would be really appreciated right now, the only other person that seems to be having a similar problem is this guy here: Go to the bottom of his post
He had no reply to his query and he is on a Mac environment whereas I am on windows 10.
Any help would be really appreciated.
Thanks in advance
