Azure / azure-functions-dapr-extension

Extension for interacting with Dapr APIs from an Azure Function
MIT License
100 stars 34 forks source link

Fix dotnet isolated build issue with nuget pacakage version 99.99.99 #197

Closed ASHIQUEMD closed 2 months ago

ASHIQUEMD commented 3 months ago

Problem Dotnet isolated Azure Function with the Dapr extension encounters a build issue due to a missing Microsoft.Azure.WebJobs.Extensions.Dapr package with version 99.99.99.

Root Cause When users build the repository https://github.com/Azure/azure-functions-dapr-extension.git locally, the Dotnet isolated worker dynamically creates a WorkerExtensions.csproj file. In this file, Microsoft.Azure.WebJobs.Extensions.Dapr is registered as a NuGet package dependency with version 99.99.99. This version is intended as a placeholder for a local NuGet package, but the Dotnet build process mistakenly looks for it on nuget.org, where it does not exist.

Solution Rebuilding the dynamically created WorkerExtensions.csproj does not affect the actual project. To resolve the issue, we replace the placeholder version 99.99.99 with 0.0.0. This change ensures that when the dynamically created WorkerExtensions.csproj searches for version 0.0.0, it will find the latest available NuGet package on nuget.org, thus avoiding the build error.

This PR upgrades Codecov GitHub task to V4 to fix codecov issue.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.53%. Comparing base (d2114f7) to head (972ef0a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #197 +/- ## ======================================= Coverage 68.53% 68.53% ======================================= Files 53 53 Lines 1052 1052 Branches 158 158 ======================================= Hits 721 721 Misses 274 274 Partials 57 57 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.