Can Visual Studio use the 32-bit version of Azure Functions Core Tools instead of the 64-bit version when debugging? My Azure Function uses a third-party 32-bit DLL, so my code needs to run as 32-bit. I need help finding a way to accomplish this using Visual Studio. I can run my code at the command line without using Visual Studio.
2 Answers 2
Refer this Blog to debug your Function project in Visual Studio with 32 bit Azure Functions Core tools.
Also, Visual Studio will only pick the Azure Function core tools that's running at top in the control panel, Thus you can uninstall Azure Function 64 bit core tools and keep 32 bit x86 Azure Function core tools running.
enter image description here
One more option is to set the Executable Path to Azure Function 32 bit core tools like below:-
Right click on your Azure Function project > Debug > Executable > Path to Executable set to Azure function core tools 32 bit > command line arguments host start:-
enter image description here
You can select Toggle in Any CPU > Configuration Manager > and add New Platform set to x86
enter image description here
Comments
I haven't been able to figure out how to debug 32-bit Azure apps with Visual Studio 2022, but until a better solution is available a workaround to debug your app might be to create a console app or test project that includes your azure function app as a reference, and then call the relevant code from your console app.
Comments
Explore related questions
See similar questions with these tags.