Getting Message:Exception when starting endpoint using NserviceBus.Host exe version 6

Hi I need urgent help regarding for “Message:Exception when starting endpoint.”

Error details :
Message:Exception when starting endpoint.
NServiceBus.GenericHost+d__1.MoveNext(C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\GenericHost.cs:49)
System.MethodAccessException: Attempt by method 'Command.Source.Host.HostConfigurator.Start( ) method

NserviceBUS version 6

Detailed exception attached here below,

Source:NServiceBus.GenericHost
Message:Exception when starting endpoint.
NServiceBus.GenericHost+d__1.MoveNext(C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\GenericHost.cs:49)
System.MethodAccessException: Attempt by method ‘.Command.Source.Host.HostConfigurator.Start(NServiceBus.IMessageSession)’ to access method ‘System.Threading.Tasks.Task.get_CompletedTask()’ failed.
at Command.Source.Host.HostConfigurator.Start(IMessageSession messageSession) in C:\tfs\Snp_Olr_Service\SnP-OLR-Service\PROD\SP\RY19.4\source\SnpService\Product.Command.Source.Host\HostConfigurator.cs:line 100
at NServiceBus.StartableAndStoppableRunner.Start(IMessageSession session) in C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\StartableAndStoppable\StartableAndStoppableRunner.cs:line 27
at NServiceBus.Features.FeatureStartupTaskController.Start(IBuilder builder, IMessageSession messageSession) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\FeatureStartupTaskController.cs:line 21
at NServiceBus.Features.FeatureActivator.d__5.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\FeatureActivator.cs:line 71
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NServiceBus.StartableEndpoint.d__2.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\StartableEndpoint.cs:line 57
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NServiceBus.StartableEndpoint.d__1.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\StartableEndpoint.cs:line 44
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at NServiceBus.GenericHost.<Start>d__1.MoveNext() in C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 49 [08/12/2019 05:53:17] > [Product] > [Product-Processor] > [Secondary] > @AUSDWSNPCS01 (FATAL) Source:NServiceBus.Hosting.Windows.WindowsHost Message:Start failure NServiceBus.Hosting.Windows.WindowsHost.Start(C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\WindowsHost.cs:33) System.MethodAccessException: Attempt by method '.Command.Source.Host.HostConfigurator.Start(NServiceBus.IMessageSession)' to access method 'System.Threading.Tasks.Task.get_CompletedTask()' failed. at .Command.Source.Host.HostConfigurator.Start(IMessageSession messageSession) in C:\tfs\Snp_Olr_Service\SnP-OLR-Service\PROD\SP\RY19.4\source\SnpService\Product\.Command.Source.Host\HostConfigurator.cs:line 100 at NServiceBus.StartableAndStoppableRunner.Start(IMessageSession session) in C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\StartableAndStoppable\StartableAndStoppableRunner.cs:line 27 at NServiceBus.Features.FeatureStartupTaskController.Start(IBuilder builder, IMessageSession messageSession) in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\FeatureStartupTaskController.cs:line 21 at NServiceBus.Features.FeatureActivator.<StartFeatures>d__5.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\Features\FeatureActivator.cs:line 71 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NServiceBus.StartableEndpoint.<StartFeatures>d__2.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\StartableEndpoint.cs:line 57 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NServiceBus.StartableEndpoint.<Start>d__1.MoveNext() in C:\BuildAgent\work\a93f853f0c1b9532\src\NServiceBus.Core\StartableEndpoint.cs:line 44 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult()
at NServiceBus.GenericHost.d__1.MoveNext() in C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 56
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NServiceBus.Hosting.Windows.WindowsHost.Start() in C:\BuildAgent\work\fc89e968acb99302\src\NServiceBus.Hosting.Windows\WindowsHost.cs:line 33

Hi

Maybe check that you have installed and targeted the right .NET Framework version?

Regards
Daniel