Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure function build not generating function.json

I have an azure function that was working perfectly this morning (was published on Azure). I had to add some logging functionality in Azure Storage and suddently I cannot run my function anymore. I have not tried to publish it as it does not run locally.

The symptom is that I get the following exception:

System.IO.FileNotFoundException: 'Could not find file 'C:\projects\MySuperFunction\MySuperFunction\bin\Debug\netstandard2.0\bin\function.json'.'

I read that thtis file is supposed to be generated at build time but I can confirm that the file is not there at all.

The only modifications I made to the project was to add a reference to the WindowsAzure.Storage nuget package (v9.2.0)

Does anyone knows why it is failing now while it was not before and, ideally, how to get it back working?

like image 314
Georges Legros Avatar asked Aug 15 '26 11:08

Georges Legros


1 Answers

For my situation at least this wasn't an irrecoverable exception and simply continuing with the debug session worked fine.

I turned off 'Break on Exception' for FileNotFoundException and it was all good :)

https://github.com/Azure/azure-functions-vs-build-sdk/issues/196

(I didn't have the WindowsAzure.Storage change in my project, so YMMV)

like image 62
RichyRoo Avatar answered Aug 18 '26 03:08

RichyRoo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!