Comments (8)
@scubaracer @rychlym @andrebts This has been fixed with the version 1.5.3.
Would you please check this out on your side?
from azurefunctions.extensions.
@scubaracer Thanks for your comment!
As of the version 1.5.1
expects that the host.json
physically exists, although it contains nothing. The default content of host.json
is:
{
}
from azurefunctions.extensions.
Let me figure out how to set this as an optional.
from azurefunctions.extensions.
I'm having the same issue when publishing to Azure on a V1 environment.
from azurefunctions.extensions.
(Today first time I have just meet with your great product - so might be a different issue) I am using V1 environment , In debug -AzureFunctionTools cli no problem but hosted in the azure loked like try to search in different folder:
From exception log:
FileNotFoundException : The configuration file 'host.json' was not found and is not optional. The physical path is 'D:\local\Temporary ASP.NET Files\root\f4168be2\6cf60a80\assembly\dl3\dcd37d59\host.json'.
2019-06-07T18:13:44.320 [Error] Exception: corelationId: 1b260e5c-ff5f-4e06-96a0-4b3f566dd29e, stack: at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(Boolean reload)
at Microsoft.Extensions.Configuration.FileConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
....
contrarily to directory from console (but it might be a mistake -a directory substitution - week experiences)
from azurefunctions.extensions.
Hello @rychlym, I had the same issue on using Azure Functions V1 with AlienCube. To solve the issue I had to download the Aliencube project and add Aliencube.AzureFunctions.FunctionAppCommon and Aliencube.AzureFunctions.Extensions.OpenApi to my solution, referencing it instead of the nuget package. After this I changed Aliencube.AzureFunctions.Extensions.OpenApi -> Configurations -> OpenApiAppSettingsBase at line 23 to the following when publishing to production:
var host = new ConfigurationBuilder()
.SetBasePath("/home/site/wwwroot/")
.AddJsonFile("host.json")
.Build();
While using it on a dev environment just keep using the variable "basePath".
Hope you guys can solve it soon for Azure Functions V1.
from azurefunctions.extensions.
@justinyoo i got into the same problem. My challenge is that i have to stick to functions v1 due to a dependent third party SDK, and when i deploy to azure, i get the same host.json was not found and is not optional issue.
When i am looking at the latest code in 'dev', i am seeing the implementation has changed. So the commit 'ee9e63d' has kind of changed. Can you please confirm if the latest work still works with v1? or i need to make some modifications at my end
from azurefunctions.extensions.
Any further updates on it. Does this get resolved or still issue is there. In my case its works locally fine but after deployment in Azure Function App not working.
Because i also getting same problem for Azure funtion V1.
Getting below error,
2023-02-08T06:05:33.653 [Info] Function started (Id=857162bb-ceb8-41c3-9c2d-2536eb95e073)
2023-02-08T06:05:33.669 [Info] SwaggerUI page was requested.
2023-02-08T06:05:33.669 [Error] Exception while executing function: RenderSwaggerUI. ReminderFunctionApp: The type initializer for 'SwaggerFunction.OpenAPINew.OpenApiHttpTrigger' threw an exception. Microsoft.Extensions.Configuration.FileExtensions: The configuration file 'host.json' was not found and is not optional. The physical path is 'C:\local\Temporary ASP.NET Files\root\ead32014\38e3c87a\assembly\dl3\7d928f2f\003ae705_813bd901\host.json'.
2023-02-08T06:05:33.684 [Error] Function completed (Failure, Id=857162bb-ceb8-41c3-9c2d-2536eb95e073, Duration=15ms)
from azurefunctions.extensions.
Related Issues (20)
- Get EnumMember Value HOT 1
- Generic types makes yaml definition non-compliant
- Documentation stale - OpenApiResponseBody should be OpenApiResponseWithBodyAttribute HOT 1
- ReflectionTypeLoadException when running CLI HOT 2
- An item with the same key has already been added.
- StackOverflow Exception HOT 5
- Property description added to field? HOT 3
- Updating Authorization Level and Base URL HOT 5
- Generic delimiter selector
- Can we specify our own swagger.json file? HOT 1
- Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' HOT 2
- Mark an endpoint as deprecated HOT 2
- OpenApiHttpTriggerContext.cs generates a compiler warning when using C#8 nullable reference types HOT 2
- default "Code" query string on all functions HOT 1
- Missing list item type definition HOT 2
- authentication settings HOT 2
- Resolver error for dictionary properties in swagger UI OpenApi 3.1.1 HOT 1
- FileUpload support HOT 2
- Upgrade for dependencies packages
- Support for isolated function and HttpRequestData over HttpRequest? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azurefunctions.extensions.