Open mikhailshilkov opened 6 years ago
cc @fabiocav
I'm unable to repro this with bits in dev
or currently released bits.
Here's the repro code I'm using: https://github.com/fabiocav/ProjectDependencyFunctionIssue
Running from both, the standalone host and the CLI seems to work.
OK, I get the same error with your function.
Anonymous
(how do I get function key otherwise?)"AzureWebJobsScriptRoot": "C:\\Work\\ProjectDependencyFunctionIssue\\ProjectDependencyFunction\\bin\\Debug\\netstandard2.0"
in appsettings.json
WebJobs.Script.WebHost
as Startuphttp://localhost:51897/api/Function1
BOOM. What am I doing wrong?
Ha.... that code path, currently, does rely on the AzureWebJobsScriptRoot
being set as an environment variable. For your flow, just set that in the project properties (under debug) and that should take care of the problem
That helps indeed, thanks. I suggest to fix it though for the setting, or get rid of the setting altogether.
Moving this to unknown
for now. It is an improvement we should make, but doesn't impact customer facing scenarios.
I found a similar issue while debugging it can not start the host because of the file not found for the function assembly with .net core sdk 2.2 and fix was changing the build property type from 64 bit to Any .
I am facing a similar issue now when running locally and using a dll from an internally published Nuget.
System.Private.CoreLib: Exception while executing function: ProcessRawImageDataASC. ContainerImgScanning: Could not load file or assembly 'Microsoft.Azure.Security.Detection.ContainerVA.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.Azure.Security.Detection.ContainerVA.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
I see that this dll is present in the bin folder when VS builds the project. I tried setting the "AzureWebJobsScriptRoot" to point to the bin folder but that did not help either.
My build property is "AnyCPU" as well .. Can someone please assist here.
Running into the same issue. @fabiocav is this environment variable still the one to use?
I'm running Host from the latest sources of
dev
branch as described in Running locally (Visual Studio) (v2+).I'm pointing to my test Function App which consists of two C# projects:
FunctionApp
and it references a libraryLib
. When I start debugging and call the function, I getIf I remove the reference of library and all usages, the functions runs just fine.
It seems to be a recent regression, since the exact same project works fine when I checkout
v2.0.11651-alpha
.v2.0.11737-alpha
already fails.Function App is referencing
Microsoft.NET.Sdk.Functions
version1.0.13
, and is just a basic app with 1 HTTP function.