-
Notifications
You must be signed in to change notification settings - Fork 447
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
Functions ≥1.0.24 not comptabile with up to date Newtonsoft.Json 12.x #4049
Comments
Azure Functions Runtime 2.0.12265 supports Core 2.2, 2.2 packages like EntityFrameworkCore require >= 12.0.1 @fabiocav Can this package get updated with Newtonsoft.Json >= 12.0.1? |
How is it going to update the package dependancy to Newtonsoft.Json >= 12.0.1? |
Almost 3 months and still the same error, are there plans to modifying? |
Any news on this? Any possible workaround? Since I couldn't find any workaround, my understanding is that I can't use Azure Functions and will need to rely on something else to achieve my goals. Edit: 2nd Edit: Is there a valid reason to fix the dependency version to 11? Is there any workaround? |
Mines complaining that the version needs to be v9.0.1 as i'm using .Net 4.6, I looked in to migrating to .Net Core then noticed this. This is poor design and MS does this throughout it's code base causing the age old java problem of "dll hell" in our code. Why force this MS?? It gets worse if you consume multiple MS libs, check this out ...
.. Microsoft needs to stop forcing old dependencies full stop or consider that it's libs won't just be used on their own and thus have it's frameworks tested against each other as it's forcing us to have code in production that "may not behave as expected" due to crap like ...
... valid warnings so why doesn't anyone do anything about it at MS? I complained about this here dotnet/aspnetcore#9022 ... apparently i'm told these warnings are valid and that I should just fix them. Maybe you guys would care to explain how we go about fixing them? |
I totally agree with above comments. Unless you are telling Azure Function developers to seek different platform, MS should really fix the problem. I have a number of 3rd party .net framework libraries that do not use .net Core and they can't be used in Azure Function V1 because of JSON.NET=9.01 |
For what it's worth, I was able to use Json.NET 12.x with functions v1 with a binding redirect and it mostly was working fine. I did lose some native serialization/deserialization support with bindings, so I had to do that directly but the project did compile and run properly. You can see how to set up a binding redirect here. Still not the best solution though. However, as mentioned above I tried to pull in a dependency on I solved that by porting to functions v2 (last week or so), but I still had that transitive dependency on Json.NET 12.x. I got this at compile-time. Since it was in a package under our control, I just loosened the dependency and downgraded to Json.NET 11.x instead and that's our current state. I didn't investigate any further though - at that point I didn't want to spend any more time on it because I had already wasted more than a day trying to get And just to be clear, when I talk about binding problems I mean that serialization and deserialization both technically work, but Json.NET attributes (like |
@hf-kklein Newtonsoft.Json has released 12.0.2 now, and 12.0.1 has been out for ~5 months, perhaps update your title? |
The problem also exist on Microsoft.NET.Sdk.Functions -Version 1.0.27 |
@fabiocav any update on this? |
Same error here. I need to use the latest version of Json. any news? |
And this is causing issues for me also... this needs to be addressed please as soon as possible. It is a bug and is costing our team time and our business money and also spend more time researching if functions are the right solution for us after all. |
The same for me. I use Newtonsoft.Json.Converters.StringEnumConverter that appears in Newtonsoft Json 12.0.1 and azure functions failed with error : No matching parameterized constructor found for 'Newtonsoft.Json.Converters.StringEnumConverter', even if I added 12.0.1 explicitly to the project. |
can someone please explain why is |
@fabiocav or @cgillum - could we please get a status update with this. Even if there's no good news, at least we know how this issue stands with the Azure Functions team. Please just tick one of the three options ... it will take you a second...
thank you kindly, AzF team 🍰 |
Guys any update on this ? Will be glad if you fix it. |
This is the most annoying thing that keeps coming back to annoy me on Azure functions at this point. |
Did someone find a workaround for this ? (except than lowering the version in other dependent libraries) |
A half year elapsed, but the issue is still actual! This is a quick fix, please do it |
Can you please give the references on how to work around this in 1.X because we can't seem to find a workaround. We're using 1.X with Microsoft.Azure.Search which requires Newtonsoft >= 10.0.3, but since functions is hardcoded to 9.0.1 it's not compatible. I have newtonsoft 10.0.3 manually installed but it's still not compatible in functions. Please point us to the documented guidance mentioned |
what you are doing I think is not in harmony with the effort of Microsoft of continue improving .net framework. MS has stated in .net conference that .net framework would continue to be improved. your 1.x function is based on .net and 2.x is on .net core. you have no idea how difficult it is for many developers and third party vendors to just roll out .net core SDKs. I really would appreciate putting effort to rethink your decision. Sunsetting policy that has gone on for years in Microsoft is what has turned many developers away from Microsoft stack for good. Please do not repeat the bad history. Try to learn from it and ask MS for more funding so that you can rebuild 1.X function. |
@Areson referring to Azure/azure-functions-vs-build-sdk#304 (comment) this is intended behaviour A specific version chosen by azure functions is physically loaded at runtime prior to your function being loaded. .Net does not allow 2 versions of the same dll to be present at the same time. the 'Equals' dependency was a reflection of this. Changing to be a '>x' dependency only allows your code to compile, it doesn't mean that it will actually run in azure if you depend on features only available in newer versions, because the newer library is physically not present (as you have noted). |
@AartBluestoke Understood. That does seem to make this particular issue seem somewhat useless then. Even with change in the beta package folks won't get the functionality they intended by using it, as the older version will always be loaded. Having the '>x' dependency in there will likely cause confusion as people may expect it to use a newer version and may not think to check the loaded assemblies if everything looks OK. That being said, I appreciate having my code at least compile because in my case I was able to work around this for the time being. EDIT: Annnnd I read the link to the other issue after posting this. |
Updating to Microsoft.NET.Sdk.Functions 1.0.30-beta1 as @fabiocav said worked for me! |
I'm running into issues with this locally when running using I can see Given the number of people experiencing issues here, is there any chance It seems there is (and has been) quite a few long-open assembly loading issues with Azure Functions, perhaps the a different approach to hosting .NET functions is warranted. System Info
If it's relevant to someone Googling, this is the exception I get:
WorkaroundOverwrite the version of |
This is what Microsoft has done for .NET Core 3.0 with the More to the point, I don't understand why this hasn't already been done - instead it seems like the azure-functions-host maintainers are content to dick around with |
@fabiocav not only me but there are still many others that develops using .net framework and even at Ignite today the CEO has praised the efforts of Azure Function. why not just build a better product to support to support both .Net and .Net Core instead of just stating there was a lesson learned and sunset any updates effort towards 1.x? |
@IanKemp quick comment here to provide an update while I'm out of office to make sure the answer is not delayed. While removing the dependency from the current version may sound trivial, there is a fair amount of work particularly to ensure we're not introducing breaking changes and impacting production apps. This is something we want to do, it just needs to be done carefully. I'm opening issue to track the host work #5203 (for others, it's important to understand that the recommendation above still applies for many scenarios where a version update is required). |
Installed version 1.0.30-beta2 of the Microsoft.NET.Sdk.Functions package addressed the warning for my build. I was getting the warning with 1.0.29 with NewtonSoft 12.0.3. (needed >= 12.0.0). Following suggestion from @fabiocav |
This is not possible when using Microsoft NuGet package https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM/ as there is no .NET Core version of that package. |
I have the same issue with interacting with Dynamics CRM -- https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies/ requires .net framework 4.6.2 When Microsoft hasn't yet upgraded its own packages, it doesn't seem reasonable to assume that the rest of the world is happy/able to upgrade in order to use azure functions 2 and 3. |
…untime error, I have upped the version of the Functions sdk as recommended in this thread: Azure/azure-functions-host#4049
2 days ago version As @mamoorkhan pointed out is there any reason for that |
@fabiocav and @brandonh-msft any update on this one? |
sorry @mamoorkhan I don't have any power here |
This issue is similar to #209, #237 and #259 .
Newtonsoft.Json 12.0.1 is stable since 2018-11-27. Please don't stick to
The text was updated successfully, but these errors were encountered: