Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The program '[1684] dotnet.exe' has exited with code -2147450750 (0x80008082)

Trying to debug an Azure function .NET STANDARD 2.0 locally. Using Visual Studio 2017 CE. Stuff worked yesterday wonder what have gone wrong. Uninstalled all NET CORE SDK and put back the 2.1.201. Found other solutions about Core 1.1 but no luck with them. When debugging the console shuts down right away and only leaves this error message

The program '[1684] dotnet.exe' has exited with code -2147450750 (0x80008082).
like image 402
Jepzen Avatar asked Jun 28 '18 11:06

Jepzen


2 Answers

Update

I went to a wrong place before. This problem is not caused by missing .Net Core 2.1. It may be related to Azure Functions and Web Jobs Tools(on VS menus, Tools>Extensions and Update).

From version of 15.0.40502.0, the extension consumes a feed which keeps templates, build tools, and the runtime up to date whenever there is a change made in the service.

See %LocalAPPDATA%\AzureFunctionsTools\Releases\2.2.2\manifest.json.

"CliEntrypointPath": "C:\\Users\\UserName\\AppData\\Local\\AzureFunctionsTools\\Releases\\2.2.2\\cli\\func.exe"

In VS, entry of 2.x cli was always func.dll before. Eliminating the requirement of .Net Core 2.1 for cli 2.0.1-beta.31(host 2.0.11888), a self contained version(x86) is pushed to VS. Its entry is func.exe.

If the entry remains to be func.dll on your x64 platform, error will occur due to running x86 func.dll with x64 dotnet.

Digging deeper, we can see the following error message

Failed to load the dll from [C:\Users\UserName\AppData\Local\AzureFunctionsTools\Releases\2.2.2\cli\hostpolicy.dll], HRESULT: 0x800700C1
An error occurred while loading required library hostpolicy.dll from [C:\Users\UserName\AppData\Local\AzureFunctionsTools\Releases\2.2.2\cli\]

Solution

If your Azure Functions and Web Jobs Tools is 15.0.40617, just change the entry to func.exe. Then restart VS(necessary step).

If your version is lower, I recommend you to update to 15.0.40617. After update, delete %LocalAPPDATA%\AzureFunctionsTools, then create a new Azure Function project, wait at the create dialog for VS to download new cli and template.

enter image description here After a while, we can see the tip change to

enter image description here

like image 153
Jerry Liu Avatar answered Nov 17 '22 14:11

Jerry Liu


I had an exactly same issue. I installed .NET Core 2.1 SDK, updated Azure Functions and Web Jobs Tools to version 15.0.40617.0 and it still didn't work. I decided to revert Azure Functions and Web Jobs Tools to version 15.0.40608.0 and it works! Additionally, I have version 2.1.301 of .NET Core.

like image 31
dariuszparzygnat Avatar answered Nov 17 '22 13:11

dariuszparzygnat