Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

Consider pointing the PATH environment variable to the correct dotnet executable according to the app platform settings #5073

Open AnatoliB opened 5 years ago

AnatoliB commented 5 years ago

In order to fix https://github.com/Azure/azure-functions-powershell-worker/issues/232, the following PR temporarily makes the Functions host resolve the dotnet executable path to the one that matches the bitness of the host process: https://github.com/Azure/azure-functions-host/pull/5011.

Another way to fix this could be to make the PATH environment variable on the Windows sandbox point to either D:\Program Files (x86)\dotnet or D:\Program Files\dotnet, according to the app platform bitness setting. When this is done, the path resolution code introduced by https://github.com/Azure/azure-functions-host/pull/5011 can be removed and we will simply rely on the OS for all platforms.

This is a potentially breaking change: it may affect not only dotnet-based workers, but any function that happens to invoke dotnet. Consider this carefully!

pragnagopa commented 4 years ago

This changes needs to be done in Antares and will effect web apps as well. Need to follow up.