fbeltrao/Samples

Samples/azure-functions-dependencyinjection errors on startup

Closed this issue · 2 comments

image

Cannot access a disposed object. Object name: 'IServiceProvider'.

Hi @ElanHasson

I have updated the reference to the latest and tried to see if it runs. It worked on my machine. Can you please ensure you have the latest bits and give another try?

your worker runtime is not set. As of 2.0.1-beta.26 a worker runtime setting is required.
Please run `func settings add FUNCTIONS_WORKER_RUNTIME <option>` or add FUNCTIONS_WORKER_RUNTIME to your local.settings.json
Available options: dotnet, node, python

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

Azure Functions Core Tools (2.3.148 Commit hash: f9b3db04f9833b431f1b001efb3e5783a169ebfc)
Function Runtime Version: 2.0.12210.0
[05/12/2018 21:19:59] Building host: startup suppressed:False, configuration suppressed: False
[05/12/2018 21:19:59] Reading host configuration file '/Users/fbeltrao/dev/github.com/fbeltrao/Samples/azure-functions-dependencyinjection/src/bin/Debug/netstandard2.0/host.json'
[05/12/2018 21:19:59] Host configuration file read:
[05/12/2018 21:19:59] {
[05/12/2018 21:19:59]   "version": "2.0"
[05/12/2018 21:19:59] }
[05/12/2018 21:19:59] Initializing Host.
[05/12/2018 21:19:59] Host initialization: ConsecutiveErrors=0, StartupCount=1
[05/12/2018 21:20:00] Starting JobHost
[05/12/2018 21:20:00] Starting Host (HostId=xxxx-244593444, InstanceId=5114e2c8-072e-473d-aa47-653a17401910, Version=2.0.12210.0, ProcessId=10264, AppDomainId=1, InDebugMode=False, InDiagnosticMode=False, FunctionsExtensionVersion=)
[05/12/2018 21:20:00] Loading functions metadata
[05/12/2018 21:20:00] 1 functions loaded
[05/12/2018 21:20:00] Generating 1 job function(s)
[05/12/2018 21:20:01] Found the following functions:
[05/12/2018 21:20:01] DependencyInjectionFunction.PartsOfDay.Run
[05/12/2018 21:20:01]
[05/12/2018 21:20:01] Host initialized (1322ms)
[05/12/2018 21:20:01] Host started (1337ms)
[05/12/2018 21:20:01] Job host started