azure-functions-core-tools: Loading the incorrect DLL version

Via http://stackoverflow.com/questions/41453100/azure-function-loading-the-wrong-assembly/41481607?noredirect=1#comment70192246_41481607, as per request.

I’ve had a few rough encounters with the CLI when it comes to loading DLL’s / dependencies. Basically in some cases the CLI will complain a certain DLL cannot be loaded, or it loads the wrong version which seems to be coming from the npm folder (error says Appbase = file:///C:/Users/jaspe/AppData/Roaming/npm/node_modules/azure-functions-cli/bin).

I’m sorry but I cannot provide definitive repro steps as the issue doesn’t always occur. In most cases I was able to fix it by restarting Visual Studio. The weird thing is that restarting just the Func.exe process (within VS task runner) did not fix it! See SO post for some more additional detail.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (9 by maintainers)

Most upvoted comments

I gave up eventually because I had other issues related to the bot framework bugging out when loading stuff from private assemblies. For the time being I’m back on Web API, will try Functions / Bot Service again later.

@jsiegmund sorry about the delay… have missed some on the discussions on this repo. We have been working on those details and have this issue open to track documentation progress https://github.com/Azure/Azure-Functions/issues/113

Sure 😃 TL;DR => there needs to be better documentation on how assemblies + references are loaded. Specifically: bin folder, shared folder (for multiple functions) and NuGet assemblies. Appears as if NuGet packages loaded as part of project.json are not loaded (?) when referenced from an assembly located in a shared folder. Might be by design, don’t know. If by design: how can we load NuGet packages referenced by shared assemblies? Also would love some additional documentation on app domain scopes: what can reference what and in which situations can you load multiple versions of the same assembly in different scopes (per function, per instance?)