Azure Functions: System.InvalidOperationException: ‘The host has not yet started.’

Problem

was getting the following exception

System.InvalidOperationException: 'The host has not yet started.'

System.InvalidOperationException
  HResult=0x80131509
  Message=The host has not yet started.
  Source=Microsoft.Azure.WebJobs.Host
  StackTrace:
   at Microsoft.Azure.WebJobs.JobHost.StopAsync() in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\JobHost.cs:line 121
   at Microsoft.Azure.WebJobs.Hosting.JobHostService.StopAsync(CancellationToken cancellationToken) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Hosting\JobHostService.cs:line 32
   at Microsoft.Extensions.Hosting.Internal.Host.<StopAsync>d__10.MoveNext()

 

Solution

Solution was non-intuitive; after a couple of hours of trial and error; have finally got it to work.  Fix is easy; just need to set:

Project Properties/Build/General/Platform target: “Any CPU”

p.s. previously was “x64”

 

 

 

About Neil Rubens

see http://ActiveIntelligence.org
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*