Azure / Azure/azure-functions-host

Help wanted with update to 4.7.2 System.Text.Json

Open
#7,248 15 comments 6 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

Hello,
Help wanted.

I'm developing Swagger documentation package for Azure Functions, which is dependent on

```
Microsoft.Azure.WebJobs.Extensions.Http
Microsoft.Azure.Functions.Extensions
```

packages

Currently, it's not possible for me to update the version System.Text.Json. from 4.7.0 => 4.7.2 (or 4.7.1, 5.0.0) as I'm getting the following error:

`'Method not found: 'Void Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter..ctor(System.Text.Json.JsonSerializerOptions)'.'`

The issue is described here: https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/issues/30

#### Repro steps

Provide the steps required to reproduce the problem

1. Download the repo (https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/tree/dev)

2. Update from 4.7.0 to 4.7.2 both TestFunction and AzureFunctions.Extensions.Swashbuckle
- When only AzureFunctions.Extensions.Swashbuckle is updated to 4.7.2, while TestFunction is using 4.7.0 it works.

3. Start the project.

#### Expected behavior

*Works*

#### Actual behavior

`'Method not found: 'Void Microsoft.AspNetCore.Mvc.Formatters.SystemTextJsonOutputFormatter..ctor(System.Text.Json.JsonSerializerOptions)'.'`

![image](https://user-images.githubusercontent.com/7008739/101340189-712aab80-3890-11eb-8f1a-ebc24f2a795c.png)

#### Related information

I was trying to investigate it is much as possible in here => https://github.com/vitalybibikov/AzureExtensions.Swashbuckle/tree/branch/trying-update-json

I have substituted SystemTextJsonOutputFormatter with my version => SystemTextJsonOutputFormatter2, which uses it's own TranscodingWriteStream, as they are both sealed and internal, it was not possible to override anything.

Now it fails during function call => http://localhost:7071/api/Swagger/ui
though with the same error:

![image](https://user-images.githubusercontent.com/7008739/101340679-1c3b6500-3891-11eb-82d0-2d303913fb78.png)

I think, that is related to the fact that one of these projects has not been updated fully.

* System.Text.Json 4.7.2

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure using the AzureExtensions.Swashbuckle dev repository and its TestFunction and AzureFunctions.Extensions.Swashbuckle projects, updating System.Text.Json from 4.7.0 to 4.7.2. Read the related issue and the trying-update-json branch, then compare the package versions involved in the SystemTextJsonOutputFormatter error. Done means the project starts and /api/Swagger/ui works with the updated version.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.