You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same for me, and if I reference Newtonsoft.Json 11.0.2 I get project reference issues with Jetbrains Rider/F#, see JetBrains/resharper-fsharp#61
What is the reason for insisting on 11.0.2?
Same issue here. When referencing 12.0.2 I get two errors. One is a FileLoadException about Newtonsoft.Json which can not be found. The second one is about Metadata generation failed. When I remove 12.0.2 it's ok but I need 12.0.2 because our own package uses >=12.0.2. Worked perfectly until today.
Note: I have updated VS2019 to the latest version last friday.
I am not using JObject so I don't need to stick to the same version as the runtime uses. The README says I can set the version I want to use in the project directly as does the build error I get: NU1107: Version conflict detected for Newtonsoft.Json. Install/reference Newtonsoft.Json 12.0.2 directly to project <function project> to resolve this issue.
However, when I try to do that I get the following error and the change rolls back: NU1608: Detected package version outside of dependency constraint: Microsoft.NET.Sdk.Functions 1.0.29 requires Newtonsoft.Json (= 11.0.2) but version Newtonsoft.Json 12.0.2 was resolved.
Simon Vane (@simonvane) Check the link I mentioned previously. Do you have any using to NewtonSoft in a file within your function app project? That caused the issue on my side.
Simon Vane (@simonvane) Check the link I mentioned previously. Do you have any using to NewtonSoft in a file within your function app project? That caused the issue on my side.
Thanks Harrie Essing (@DeluxZ) . I don't have using Newtonsoft.Json.Serialization; anywhere in my solution.
I have lost track of what I did to resolve it because I have encountered so many similar issues in recent months.
My two suggestions are:
Explicitly reference the version you want to use in all projects.
If you find that when you try to upgrade the version of a nuget pack and it fails and rolls back, try the following:
a) close the solution
b) run dotnet clean in the solution root
c) add the reference to the project file(s) manually in a text editor and save the changes
d) run dotnet restore in the solution root
e) run dotnet build --no-restore in the solution root
Activity
deyanp commentedon Sep 17, 2019
Same for me, and if I reference Newtonsoft.Json 11.0.2 I get project reference issues with Jetbrains Rider/F#, see JetBrains/resharper-fsharp#61
What is the reason for insisting on 11.0.2?
DeluxZ commentedon Sep 23, 2019
Same issue here. When referencing 12.0.2 I get two errors. One is a FileLoadException about Newtonsoft.Json which can not be found. The second one is about Metadata generation failed. When I remove 12.0.2 it's ok but I need 12.0.2 because our own package uses >=12.0.2. Worked perfectly until today.
Note: I have updated VS2019 to the latest version last friday.
'Fixed' it because of this comment
AtOMiCNebula commentedon Sep 30, 2019
Have you read the FAQ in the README in the root of this repo? The strict version match is not there by accident.
simonvane commentedon Oct 1, 2019
Jeff Weiner (@AtOMiCNebula) - I have read the FAQ in the README.
I am not using JObject so I don't need to stick to the same version as the runtime uses. The README says I can set the version I want to use in the project directly as does the build error I get:
NU1107: Version conflict detected for Newtonsoft.Json. Install/reference Newtonsoft.Json 12.0.2 directly to project <function project> to resolve this issue.However, when I try to do that I get the following error and the change rolls back:
NU1608: Detected package version outside of dependency constraint: Microsoft.NET.Sdk.Functions 1.0.29 requires Newtonsoft.Json (= 11.0.2) but version Newtonsoft.Json 12.0.2 was resolved.Any idea how can I resolve this issue?
DeluxZ commentedon Oct 1, 2019
Simon Vane (@simonvane) Check the link I mentioned previously. Do you have any using to NewtonSoft in a file within your function app project? That caused the issue on my side.
simonvane commentedon Oct 1, 2019
Thanks Harrie Essing (@DeluxZ) . I don't have
using Newtonsoft.Json.Serialization;anywhere in my solution.DigitalMystery commentedon Nov 27, 2019
Simon Vane (@simonvane) did you ever resolve this? Running into the same thing and already checked the linked thread.
simonvane commentedon Dec 6, 2019
Kevin Mistry (@DigitalMystery) I am now referencing the following in my function apps:
Solution a:
Solution b:
I have lost track of what I did to resolve it because I have encountered so many similar issues in recent months.
My two suggestions are:
a) close the solution
b) run
dotnet cleanin the solution rootc) add the reference to the project file(s) manually in a text editor and save the changes
d) run
dotnet restorein the solution roote) run
dotnet build --no-restorein the solution rootdrdamour commentedon Aug 25, 2021
seems like this issue could be closed