I believe I installed everything in the pre-reqs but when I hit F5 on my function I get "Attachnig to process with CustomPipeName is only available with PowerShell 6.2 and higher (currect session is 5.1.17763.316). [Open launch.json] [cancel] from Visual Studio Code. I installed PowerShell 6.2 but maybe I need to reboot or install the Non-VS 2019 .NET Core 2.2 SDK?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Rebooted and hit F5 to debug and get Timed out waiting for the PowerShell extension to start. [Open launch.json] [Cancel]
Went back to run.ps1 and had a PowerShell not started error, opened the extension page, closed it and hit F5 now I get the same error about CustomPipeName again.
Hi @eschrader Thank you for your feedback! We will review and update as appropriate.
I am seeing this with ps core 6.2
Application started. Press Ctrl+C to shut down.
Http Functions:
HttpTrigger: [GET,POST] http://localhost:7071/api/HttpTrigger
[01/05/2019 15:54:39] dotnet process with Id=4132 started
[01/05/2019 15:54:39] Adding dependency download request to powershell language worker
[01/05/2019 15:54:39] Error:
[01/05/2019 15:54:39] An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:
[01/05/2019 15:54:39] Language Worker Process exited.
[01/05/2019 15:54:39] dotnet exited with code -2147450740
Error:.
[01/05/2019 15:54:39] package: 'Microsoft.Management.Infrastructure', version: '1.0.0'
[01/05/2019 15:54:39] path: 'runtimes/win10-x64/lib/netstandard1.6/Microsoft.Management.Infrastructure.Native.dll'
[01/05/2019 15:54:39] Starting language worker process:dotnet "C:\ProgramData\chocolatey\lib\azure-functions-core-tools\tools\workers\powershell\Microsoft.Azure.Functions.PowerShellWorker.dll" --host 127.0.0.1 --port
64248 --workerId c58f6cc9-7920-44a4-a214-c00e5276f024 --requestId 2b219c91-4e97-4513-aaa2-1f06d54e3144 --grpcMaxMessageLength 134217728
[01/05/2019 15:54:39] dotnet process with Id=17652 started
[01/05/2019 15:54:39] Adding dependency download request to powershell language worker
[01/05/2019 15:54:39] Error:
[01/05/2019 15:54:39] An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:[01/05/2019 15:54:39] Language Worker Process exited.
[01/05/2019 15:54:39] dotnet exited with code -2147450740
Error:.
[01/05/2019 15:54:39] package: 'Microsoft.Management.Infrastructure', version: '1.0.0'
[01/05/2019 15:54:39] path: 'runtimes/win10-x64/lib/netstandard1.6/Microsoft.Management.Infrastructure.Native.dll'
[01/05/2019 15:54:44] Host lock lease acquired by instance ID '0000000000000000000000009E62BF8D'.
@eschrader This will be corrected when PowerShell 6.2 is installed. Installed powershell 6.2 from doc and configure in Visual Studio code as follow.
File-->>Preferences->> Settings
Still getting
An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:
[5/05/2019 2:52:06 PM] Language Worker Process exited.
[5/05/2019 2:52:06 PM] dotnet exited with code -2147450740
Error:.
[5/05/2019 2:52:06 PM] package: 'Microsoft.Management.Infrastructure', version: '1.0.0'
etc after following all steps above
@eschrader Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.
@DixitArora-MSFT - it is not the case that this issue is solved with 6.2 installed and VS Code configured as per your comment - please see the comments directly above and below yours
Can confirm this is still thoroughly broken
@DixitArora-MSFT Please reopen. I have upgraded and run the instructions three times now since May. This does not work.
[28/09/2019 8:05:44 AM] Error:
[28/09/2019 8:05:44 AM] An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:
[28/09/2019 8:05:44 AM] package: 'Microsoft.Management.Infrastructure', version: '1.0.0'
[28/09/2019 8:05:44 AM] Language Worker Process exited.
[28/09/2019 8:05:44 AM] path: 'runtimes/win10-x64/lib/netstandard1.6/Microsoft.Management.Infrastructure.Native.dll'
[28/09/2019 8:05:44 AM] dotnet exited with code -2147450740 Error:.
[28/09/2019 8:05:44 AM] Starting language worker process:dotnet "C:\ProgramData\chocolatey\lib\azure-functions-core-tools\tools\workers\powershell\Microsoft.Azure.Functions.PowerShellWorker.dll" --host 127.0.0.1 --port 52664 --workerId 7d531334-36b9-48fe-a376-88365bc8aa4b --requestId 878309cd-3607-4a96-9c04-641c1d6ca2d7 --grpcMaxMessageLength 134217728
[28/09/2019 8:05:44 AM] dotnet process with Id=4968 started
[28/09/2019 8:05:44 AM] Adding dependency download request to powershell language worker
[28/09/2019 8:05:44 AM] Error:
[28/09/2019 8:05:44 AM] An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:
[28/09/2019 8:05:44 AM] package: 'Microsoft.Management.Infrastructure', version: '1.0.0'
[28/09/2019 8:05:44 AM] path: 'runtimes/win10-x64/lib/netstandard1.6/Microsoft.Management.Infrastructure.Native.dll'
[28/09/2019 8:05:44 AM] Language Worker Process exited.
[28/09/2019 8:05:44 AM] dotnet exited with code -2147450740
I figured out the missing dependency bug. It was because at some stage Functions Core Tools has been installed using Chocolatey. Uninstalling and reinstalling with NPM fixed that problem:
npm uninstall -g azure-functions-core-tools
choco uninstall azure-functions-core-tools
npm install -g azure-functions-core-tools
Now I still can't debug in VSCode. I get the errors:
Could not attach to process with CustomPipeName: 'AzureFunctionsPSWorker'
and
Unable to find project root. Expecting to find one of host.json, local.settings.json in project root.
even though both of those file exist in the Project root.
@DanielLarsenNZ I have assigned this to content author for further review and update.
I am having the same issue with receiving the error "Could not attach to process with CustomPipeName: 'AzureFunctionsPSWorker'.. The Wait-Debugger not working. I am using PS 6.2 and VS Code is configured as shown in black screen shots above. I followed these instructions:
RESOLVED MY ISSUE - I installed .NET Core 2.2 and my issue was resolved. I already had .NET 3.0 installed, but after I intalled .NET Core 2.2 was installed.. everything worked.
I can confirm that solution proposed by @tkerkman works. Thanks for your magic, sir!
I can confirm that solution proposed by @tkerkman works. Thanks for your magic, sir!
Which version of .NET CORE 2.2 on that link are you guys installing?
just installed .NET Core 2.2 Runtime and the problem solved
I have got powershell 7 preview 6 , .Net Core 3.x and still get the same error :/ This was working previously with me.
.NET Core 2.2 does seem to be required to get the extension to run and debug successfully. I'm checking with the PowerShell folks and will update this article as soon as I get confirmation.
Thanks to folks who have reported this, and sorry for the long delay in getting it fixed 😦
From this link https://dotnet.microsoft.com/download/visual-studio-sdks
it says .NET Core 2.2 is end of life
Does powershell function app still depend on .Net Core 2.2 or not?
Can it use .Net core 3.1 instead?
.NET Core 2.2 does seem to be required to get the extension to run and debug successfully. I'm checking with the PowerShell folks and will update this article as soon as I get confirmation.
Thanks to folks who have reported this, and sorry for the long delay in getting it fixed 😦
reassign:ggailey777
Hi, Just adding several months later I am following the tutorial here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code?pivots=programming-language-powershell
I too had to install .NET Core 2.2 along with 3.1 which was already installed.
The prerequisites for the article say .NET Core SDK 2.2+
I would think .NET Core 3.1 counts as "+" and the prereqs in the article should state 2.2 is explicitly required.
I would think .NET Core 3.1 counts as "+" and the prereqs in the article should state 2.2 is explicitly required.
Agreed, I have wasted hours this morning trying to bend time and space working through getting the hello world example working
It sounds like the versioning info was incomplete, and this may have been causing confusion. Here is the supported matrix of PowerShell, Functions, and .NET Core, as far as I understand it:
| Functions version | PowerShell version | .NET version |
|-------------------|------------------------------------------------|---------------|
| 3.x (recommended) | PowerShell 7
PowerShell Core 6 | .NET Core 3.1
.NET Core 3.1 |
| 2.x | PowerShell Core 6 | .NET Core 2.2 |
Has anyone seen any failures within the supported matrix?
Note: .NET Core 2.2 is being supported specifically for Functions until version 2.x of the Functions runtime is retired (watch for annoucements here).
I'm getting the same Could not attach to process with CustomPipeName: 'AzureFunctionsPSWorker'
error when I press F5 with my function created using the VS Code Extension. I've tried uninstalling and re-installing the SDKs on my computer as well as the functions extension in VS Code.
dotnet --list-sdks
2.1.810 [C:\Program Files\dotnet\sdk]
2.2.207 [C:\Program Files\dotnet\sdk]
3.1.402 [C:\Program Files\dotnet\sdk]
```plaintext
$PSVersionTable
Name Value
---- -----
PSVersion 7.0.3
PSEdition Core
GitCommitId 7.0.3
OS Microsoft Windows 10.0.19041
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```plaintext
func --version
3.0.2931
Most helpful comment
I am having the same issue with receiving the error "Could not attach to process with CustomPipeName: 'AzureFunctionsPSWorker'.. The Wait-Debugger not working. I am using PS 6.2 and VS Code is configured as shown in black screen shots above. I followed these instructions:
RESOLVED MY ISSUE - I installed .NET Core 2.2 and my issue was resolved. I already had .NET 3.0 installed, but after I intalled .NET Core 2.2 was installed.. everything worked.