0
votes

see screenshot for the express version:
screenshot for the express version

I have an Azure function (in Visual Studio), that triggers correctly an Service Bus event. In its run-method I want to call a method in a custom assembly. This works ok, until I use any method that uses Dynamics CRM assemblies. (I have tried both the assemblies from the downloadable sdk and the nuget package. I get the exact dll it asks for in the error message. As soon as I call the my method I get the error below. I can run this exact method from a console app. (my custom assembly is a standard (not core) class library...

Additional information: Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

1
Does error happen when you run locally or only when deployed to Azure? Also can you share simple repro code this help us in investigating the issue. - Pragna Gopa
.net version? if you are using newer version of SDK, make sure it is 4.5.2 and up - dynamicallyCRM
How are you deploying the dynamics Microsoft.Xrm.Sdk assembly? In the same shared folder as your custom assembly or as a package reference? Can you share your project.json and the project.lock.json that gets created when you run your function? - Fabio Cavalcante
Cowborg, is this still an issue? Could you provide the information requested above? - Fabio Cavalcante
No its not an issue anymore, see answer - Cowborg

1 Answers

0
votes

This is not an answer, but rather an advice to anyone getting this problem (and its also a rant).

Avoid Azure functions at all cost and use "web jobs" instead when you can. After doing this with webjobs it was as simple as it should be, I have spent a week with different Azure-function-related problems

Cons with Azure functions:

  • Dynamic crappy scripting language (.csx), which gives you mysterious runtime error messages refering wrong places
  • Lock-in to azure platform
  • The usage on the browser editor is a joke unless its a really simple method and the error messages there comes up over and over again in least most annoying way (second to popups) and make you spread out your code

Pros:

  • Maybe you get a pad on the head from your MS-indoctinated architect for using the latest technologies so he might be able to squeeze in the word "Microservices" on some powerpoint presentation.