Azure / Azure/Azure-Functions

There is no way to host PowerShell in Azure Functions apps

Open
#1,323 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Windows 10 1903, Visual Studio 2019 16.1.6
Repro steps:
1. Create new Azure Function project, choose HTTP Trigger
2. Add reference to Microsoft.PowerShell.SDK (any version)
3. Try to build

Error occurred:

> d:\.nuget\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=6.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
> d:\.nuget\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : File name: 'System.Management.Automation, Version=6.2.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
> d:\.nuget\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
> d:\.nuget\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : at System.Reflection.RuntimeAssembly.GetExportedTypes()
> d:\.nuget\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : at MakeFunctionJson.FunctionJsonConverter.TryGenerateFunctionJsons()
> d:\.nuget\microsoft.net.sdk.functions\1.0.29\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error : at MakeFunctionJson.FunctionJsonConverter.TryRun()

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.