You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run a ServiceBusTrigger function in development environment, I get following exceptions in the Diagnostics Tool's Event window. This happens even with a fresh solution and project. This may be related to #2786.
Investigative information
Local development environment
Windows 10
Visual Studio 2017 Enterprise 15.6.4
Azure Functions and Web Jobs 15.0.40502.0
Function App version: 3.0.0-beta5
Sdk.Functions version: 1.0.13
netstandard2
Repro steps
Create a new solution with Azure Function (Azure Functions v2 Preview (.NET Standard))
Use development storage (UseDevelopmentStorage=true)
Use any valid connection string (note that QueueTrigger and ServiceBusTriggers use different connection strings)
Change QueueTriggerAttribute to ServiceBusTriggerAttribute in the Function1.Run method
Run the project
Actual behavior
Console output:
[16/05/2018 11.39.29] Host configuration file read:
[16/05/2018 11.39.29] {}
[16/05/2018 11.39.29] Starting Host (HostId=echelwjvai2-236828010, InstanceId=758df03a-d168-4782-877d-a8562079faa5, Version=2.0.11651.0, ProcessId=16856, AppDomainId=1, Debug=False, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=)
[16/05/2018 11.39.29] Unable to configure java worker. Could not find JAVA_HOME app setting.
[16/05/2018 11.39.29]
[16/05/2018 11.39.29] Could not configure language worker Java.
[16/05/2018 11.39.29]
[16/05/2018 11.39.30] Loaded custom extension: ServiceBusExtensionConfig from 'referenced by: Method='FunctionApp1.Function1.Run', Parameter='myQueueItem'.'
[16/05/2018 11.39.30] Generating 1 job function(s)
[16/05/2018 11.39.30] Found the following functions:
[16/05/2018 11.39.30] FunctionApp1.Function1.Run
[16/05/2018 11.39.30]
[16/05/2018 11.39.30] Host initialized (1290ms)
Listening on http://localhost:7071/
Hit CTRL-C to exit...
[16/05/2018 11.39.31] Host started (1920ms)
[16/05/2018 11.39.31] Job host started
[16/05/2018 11.39.31] Host lock lease acquired by instance ID '00000000000000000000000010A97A99'.
Exception in the Diagnostics Tool event window:
Exception: Exception thrown: 'System.InvalidCastException' in Microsoft.Azure.WebJobs.Script.dll ("[A]System.AppDomain cannot be cast to [B]System.AppDomain. Type A originates from 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.6\System.Private.CoreLib.dll'. Type B originates from 'System.Runtime.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.6\System.Runtime.Extensions.dll'."). Exception thrown: 'System.InvalidCastException' in Microsoft.Azure.WebJobs.Script.dll ("[A]System.AppDomain cannot be cast to [B]System.AppDomain. Type A originates from 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.6\System.Private.CoreLib.dll'. Type B originates from 'System.Runtime.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.6\System.Runtime.Extensions.dll'.") 2.87s [17352] Worker Thread
Related information
Source
publicstaticclassFunction1{[FunctionName("Function1")]publicstaticvoidRun([ServiceBusTrigger("myqueuename", Connection ="QueueConnectionString")]stringmyQueueItem,TraceWriterlog){
log.Info($"C# Queue trigger function processed: {myQueueItem}");}}
The text was updated successfully, but these errors were encountered:
When trying to run a ServiceBusTrigger function in development environment, I get following exceptions in the Diagnostics Tool's Event window. This happens even with a fresh solution and project. This may be related to #2786.
Investigative information
Local development environment
Windows 10
Visual Studio 2017 Enterprise 15.6.4
Azure Functions and Web Jobs 15.0.40502.0
Function App version: 3.0.0-beta5
Sdk.Functions version: 1.0.13
netstandard2
Repro steps
Actual behavior
Console output:
Exception in the Diagnostics Tool event window:
Related information
Source
The text was updated successfully, but these errors were encountered: