I have this powershell script which works very well on my computer. I use the x64 and powershell 7.2.
The problem is when I publish the code to Azure, there is a module missing. The module is a .net System.Data.OleDb.
ERROR: Exception calling "Open" with "0" argument(s): "The 'MSOLAP' provider is not registered on the local machine."
I have tried to add the .dll file to Module folder, that i created but function app doesn’t load it for some reason.
Structure of the function app
- host.json
- local.settings.json
- powerbitablerefresh
- run.ps1
- function.json
- Modules
- Microsoft.AnalysisServices.AzureClient.dll
- profile.ps1
- requirements.psd1
- inside requirements I have:
'Az.Keyvault' = '4.*'
'Az.Accounts' = '2.*'
'Az.AnalysisServices' = '1.*'
'SqlServer' = '21.1.18256'
My question is, how do I install .dll on a function app?
2
Answers
The right answer is that add the .dll files to the C:homesitewwwroot and then in the powershell script run it like this
It will then create a connection
You can install .dll files by following below workaround: