For a recent project, I needed to maintain code written by a coworker, mainly a bunch of code based on the.net core 3.1
I was reminded of my first exposure to Azure Functions 2 years ago (which was based on the.net framework
), got off to a bad start and the code kept not running. Tried various solutions online, tossed around for days, and finally uninstalled and reinstalled visual studio 2017 to solve the problem π€·ββοΈ, not sure what will happen this time.
Well, first clone the code locally, Visual Studio 2019 open the solution, set the Azure Functions project as a startup item, run it, and then you see the death progress bar start its show!
Waiting for the yellow flowers are cool, saw the following "reinstallation warning" warning, repeatedly run a few times are the same result, want to die of the heart. Microsoft's technology, how to say..net core
It's in its third edition and it's still the same damn thing π.
What to do? Let's try to find a solution without reinstalling! There is no Google, of course, is to use Bing search, after all, is the Microsoft technology stack, manually enter the error message, the first result comes to the*, the answer that was marked as the best answer is: reload! Reload!!! Reload!!! Let me slow down π°....
I took another look at the "Reload Alert" warning, followed the folder all the way down, and here's what happened...\Releases\3.23.5
It's an empty folder...\Releases\3.23.4
There's nothing under the namecli_x64
folder, but thecli
folder is a file namedof the executable file of the
So: is the issue caused by a mismatch between the configuration items read by the Azure Functions project template runtime for Visual Studio 2019 and the latest Azure Function CLI configuration? Try adding a new configuration item to the..\Releases\3.23.4
A new file namedcli_x64
folder with thecli
A copy of the file under the foldercli_x64
Under (copying rather than directly renaming the folder was used so as not to destroy the preset directory structure of the program installation, causing potential problems when developing other projects), run it, and once again the death progress bar appeared, and after a while a CMD command line window popped up, and the program actually magically ran!!!!
Azure Functions Core Tools
Core Tools Version: 3.0.3442 Commit hash: 6bfab24b2743f8421475d996402c398d2fe4a9e0 (32-bit)
Function Runtime Version: 3.0.15417.0[2021-06-20T11:23:16.149Z] Found C:\..\..\. Using for user secrets file configuration.
Functions:
Version: [GET] http://localhost:7072/api/version
................................................
So is the problem all solved here? Doesn't seem to be! Noticed that the download popup box appears every time I restart after stopping, which doesn't make sense π€. Looking again at the solution I just found myself, it makes sense that..\Releases\3.23.5
It shouldn't be an empty folder, maybe it's caused by a bad internet connection that didn't finish downloading! Or is it still part of the configuration mismatch above? After all, developing Visual Studio and developing the Azure Functions CLI may not be on the same team.
Well, put..\Releases\3.23.4
Copy all the files under..\Releases\3.23.5
Try this? Search the Internet to make sure. It's still coming from the tap.*I'm sure you'll agree with me π, but there's one small detail to keep in mind, you need to change the config file!The version information in the file (be careful to replace the whole thing, the vs code is really fragrant π₯°)~~~
Well, every time I stop debugging and run it again, I finally don't have to deal with the death progress bar anymore β.
To this article on Visual Studio 2019 local can not run Azure Functions article is introduced to this, more related to VS2019 can not run Azure Functions content please search for my previous posts or continue to browse the following related articles I hope that you will have more support for me in the future!