I'm trying to install a nuget package and I get the following error
Restoring packages for C:\git...MyProject.csproj... NU1107: Version conflict detected for Microsoft.Azure.WebJobs. Reference the package directly from the project to resolve this issue. MyProject -> Microsoft.Azure.WebJobs.Extensions.DurableTask 1.4.1 -> Microsoft.Azure.WebJobs (>= 2.2.0) MrProject -> Microsoft.NET.Sdk.Functions 1.0.6 -> Microsoft.Azure.WebJobs (= 2.1.0-beta4). Package restore failed. Rolling back package changes for 'MyProject'. Time Elapsed: 00:00:00.5872740 ========== Finished ==========
I understand the issue, but I don't understand what "Reference the package directly from the project" means. Can someone explain?
NU1107: Version conflict detected for Microsoft.Azure.WebJobs.
Just as you know, this is a dependencies conflict issue. The one of dependency of package Microsoft.NET.Sdk.Functions 1.0.6
is Microsoft.Azure.WebJobs (= 2.1.0-beta4)
, but the dependencies of package Microsoft.Azure.WebJobs.Extensions.DurableTask
need Microsoft.Azure.WebJobs (>= 2.2.0)
. That is the version conflict.
but I don't understand what "Reference the package directly from the project" means. Can someone explain?
That means you can reference the dll file directly not using NuGet.
Details:
Download that nuget packages Microsoft.Azure.WebJobs.Extensions.DurableTask.nupkg
from the nuget.org, rename the file name to .zip
, then unzip it. On the Solution explorer, select Dependencies->Add Dependencies->Browse->Select the dll file from the local folder.
Besides, Error message provides a common method to resolve this issue, but the best way to resolve this issue is update the package Microsoft.NET.Sdk.Functions
to 1.0.12 and above, which with a dependency Microsoft.Azure.WebJobs (>= 2.2.0 && < 2.3.0). This will compatible with package Microsoft.Azure.WebJobs.Extensions.DurableTask 1.4.1
.
Hope this helps.