Reputation: 1045
I had developed azure function solution in Visual Studio 2019 and deployed to azure function by downloading publisher .
But accidently I had deleted entire source code in local machine where I could not get even from "recovery software tools" also.
is there any way can I get source code files from azure function development tools in azure portal? or local machine C drive?
Upvotes: 2
Views: 4573
Reputation: 117
I too did the same mistake that pavankumar gvvs did, I lost my source code. Now I need to find it from the function app hosted on my azure. And I did it now :)
2 steps :
Locate the DLL
a. Go to https://{YOURFUNCTIONNAME}.scm.azurewebsites.net/dev/wwwroot/
b. Open the Kudu Console
c. The kudu console lists all your files that's deployed on the function app, see the dll and download it.
View complete source code - use dotpeek
Cheers,
Rakesh
Upvotes: 1
Reputation: 16238
When you deployed through Visual Studio, the source was compiled locally and only the DLLs were uploaded. Thus, you cannot directly see your code. However, you can get to your DLLs and download those. Then you should be able to use any decompiler to see your source code again (maybe not as pretty as originally...).
Go to the SCM console to see and download all files: https://{YOURFUNCTIONNAME}.scm.azurewebsites.net/dev/wwwroot/
Upvotes: 1
Reputation: 788
If you open up the Azure Function App Service and navigate to the "Functions" section you will be able to open your individual functions and then select the "Code + Test" section and be able to see your function
I don't know if the type of Function you developed impacts your ability to see this source code or not.
Upvotes: 1