azure-functions-durable-extension: DurableTask 1.5.0 + Functions v2: Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0

I updated to 1.5.0. I had the following error while building at first:

Version conflict detected for Newtonsoft.Json. Reference the package directly from the project to resolve this issue. 
 sebp.Mobile.TestApp.Func (>= 1.0.0) -> Microsoft.Azure.WebJobs.Extensions.DurableTask (>= 1.5.0) -> DurableTask.AzureStorage.Private (>= 1.2.4) -> Newtonsoft.Json (>= 11.0.2) 
 sebp.Mobile.TestApp.Func (>= 1.0.0) -> Microsoft.NET.Sdk.Functions (>= 1.0.13) -> Newtonsoft.Json (>= 10.0.3).

So I added the latest version of Nuget ‘Newtonsoft.Json’. Now it builds OK but I get the following errors while starting the app:

                  %%%%%%
                 %%%%%%
            @   %%%%%%    @
          @@   %%%%%%      @@
       @@@    %%%%%%%%%%%    @@@
     @@      %%%%%%%%%%        @@
       @@         %%%%       @@
         @@      %%%       @@
           @@    %%      @@
                %%
                %

Hosting environment: Production
Content root path: /Users/paulceli/Sources/MobileBanking_UITests/sebp.Mobile.TestApp.Func/bin/Debug/netstandard2.0
Now listening on: http://localhost:7071
Application started. Press Ctrl+C to shut down.
[06/22/2018 12:10:39] Reading host configuration file '/Users/paulceli/Sources/MobileBanking_UITests/sebp.Mobile.TestApp.Func/bin/Debug/netstandard2.0/host.json'
[06/22/2018 12:10:39] Host configuration file read:
[06/22/2018 12:10:39] {}
[06/22/2018 12:10:39] Starting Host (HostId=ls888-1606649231, InstanceId=c70bb3a3-06be-436c-8c0d-7c467deea131, Version=2.0.11651.0, ProcessId=2429, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=)
[06/22/2018 12:10:39] Unable to configure java worker. Could not find JAVA_HOME app setting.
[06/22/2018 12:10:39] 
[06/22/2018 12:10:39] Could not configure language worker Java.
[06/22/2018 12:10:39] 
[06/22/2018 12:10:40] Loaded custom extension: DurableTaskExtension from 'referenced by: Method='sebp.Mobile.TestApp.Func.CompareTestRuns.HttpStart', Parameter='starter'.'
Warning: Only got partial types from assembly: Microsoft.Azure.WebJobs.Extensions.DurableTask, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null
Exception message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.Azure.WebJobs.Host.Indexers.DefaultTypeLocator.FindTypes(Assembly assembly, IEnumerable`1 extensionAssemblies) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\DefaultTypeLocator.cs:line 120
[06/22/2018 12:10:41] A ScriptHost error has occurred
[06/22/2018 12:10:41] Microsoft.Azure.WebJobs.Extensions.DurableTask: 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'.
[06/22/2018 12:10:41] Stopping Host

😢 help thanks

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

I had the same problem with Win10 environment using Visual Studio 2017 15.7.5. I had to upgrade the Azure Functions and Web Jobs Tools (Tools -> Extensions and Updates -> Azure Functions and Web Jobs Tools) to version 15.0.40617.0. I had the problem with the version 15.0.40608.0 that I previously had installed.