-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing dependencies in *.deps.json leads to Object reference not set to an instance of an object #302
Comments
I can confirm this issue. Suddenly ran into this issue too this week. Dependencies was always an empty list before and now it can be null. Maybe something has changed in .NET, Functions or Newtonsoft Json causing this issue. Anyhow, we should do a null-check on the .Dependencies to avoid this. Quickfix I used for now, is to reference a random small NuGet project in the libraries that do not have any dependency. |
Using the in-process model, this happens to me only when deployed to Azure. |
I can also confirm and reproduce, using in-process model, .Net Core 3.1 Function. |
For the sake of adding more context to the issue: For me this popped up when upgrading from To be explicit before starting the upgrade ( Update: What also is missing from earlier comments is this only impacts the SwaggerUI page The suggested approach to reference some NuGet package without deps isn't an option in our case as the referenced project is a private NuGet package use by multiple projects. |
I receive an
object reference
error if my function app references a project that has no dependencies.To reproduce
git clone https://github.com/justinyoo/azfunc-openapi-dotnet.git
cd azfunc-openapi-dotnet
dotnet new classlib -o domain
cd Net60.FunctionApp.OutOfProc.Static
dotnet add reference .\..\domain
dotnet add package Microsoft.Azure.Functions.Worker
dotnet add package Microsoft.Azure.Functions.Worker.Sdk
dotnet add package Microsoft.Azure.Functions.Worker.Extensions.Http
dotnet add package Microsoft.Azure.Functions.Worker.Extensions.OpenApi --prerelease
dotnet build
(you will need to fix some missing reference errors)func start
Error
Environment
Additional context
It seems to be related with #172 and fails if referenced project has no dependency in the
*.deps.json
fileThe text was updated successfully, but these errors were encountered: