Custom module with 3. party dependencies assembly load error
See original GitHub issueI am using a custom module for importing and exporting parquet data. The module can be found here: PSParquet
The module works on PowerShell 7.x on both Windows and Linux, but on WindowsPowerShell the module generates this error:
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file specified.
I want to run the module in Azure Functions PowerShell Worker, but there I get the exact same error - both when debugging locally and on an actual Azure Function.
My function is setup with powerShellVersion: '~7'
, FUNCTIONS_EXTENSION_VERSION: '~3'
and FUNCTIONS_WORKER_RUNTIME: 'powershell'
. Stack Settings show Stack: PowerShell Core
and `PowerShell Core Version: PowerShell 7.0
I do not need to run the module in WindowsPowerShell and I was under the impression, that Azure Functions PowerShell Worker ran in an isolated environment. Unfortunately, that does not seem to be the case here.
I have been running Azure PowerShell functions whit custom modules for years, but this is my first go with a custom C# module with dll dependencies. I am actually able to run the module in a container and I have thought about deploying a container in stead of using Azure Functions, but I would REALLY prefer to make the Azure Function work instead.
Can you point me in the right direction for getting this up and running in Azure Functions?
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
@Francisco-Gamino I can confirm the following: Language version: 7.2.0-preview.9 FUNCTIONS_WORKER_RUNTIME_VERSION: 7.2 func version:. 4.0.3971 dotner version: 6.0.101
AND: now it works! Guess a reboot fixed it …
Thank you for your support. Any update on when will this be available in Azure?
@Agazoth You can also try out PowerShell 7.2 support locally right now:
FUNCTIONS_WORKER_RUNTIME_VERSION
to7.2