Code Monkey home page Code Monkey logo

Comments (7)

justinyoo avatar justinyoo commented on June 12, 2024

Hi, @rychlym Is it still issue with 1.5.4? Can you please try 1.6.1 and let me know?

from azurefunctions.extensions.

justinyoo avatar justinyoo commented on June 12, 2024

From 1.7.0, you don't have to rely on this. Please follow the revised document, https://github.com/aliencube/AzureFunctions.Extensions/blob/dev/docs/openapi.md

from azurefunctions.extensions.

rychlym avatar rychlym commented on June 12, 2024

Hi @justinyoo,
I have tried again with the 1.6.1 and encounterred the exact same exception

<ItemGroup>
  <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" />
  <PackageReference Include="Microsoft.SharePointOnline.CSOM" Version="16.1.9119.1200" />
  <PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
  <PackageReference Include="SharePointPnPCoreOnline" Version="3.12.1908" />
</ItemGroup>
<ItemGroup Condition="$(DefineConstants.Contains('OPEN_API_HTTPTRIGER'))">
  <PackageReference Include="Aliencube.AzureFunctions.Extensions.OpenApi" Version="1.6.1" />
</ItemGroup>
<ItemGroup>
  <Reference Include="Microsoft.CSharp" />
</ItemGroup>

 A ScriptHost error has occurred
[7/11/2020 7:23:47 PM] Exception: corelationId: 8386fb78-915d-4939-95b1-4de62440ff7d, type: MissingMethodException : Method not found: 'Aliencube.AzureFunctions.Extensions.OpenApi.Abstractions.IDocument Aliencube.AzureFunctions.Extensions.OpenApi.Abstractions.IDocument.Build(System.Reflection.Assembly, Newtonsoft.Json.Serialization.NamingStrategy)'.
[7/11/2020 7:23:47 PM] Exception: corelationId: 8386fb78-915d-4939-95b1-4de62440ff7d, type: MissingMethodException : Method not found: 'Aliencube.AzureFunctions.Extensions.OpenApi.Abstractions.IDocument Aliencube.AzureFunctions.Extensions.OpenApi.Abstractions.IDocument.Build(System.Reflection.Assembly, Newtonsoft.Json.Serialization.NamingStrategy)'.

and going to try the 1.7.0 ...

from azurefunctions.extensions.

rychlym avatar rychlym commented on June 12, 2024

hm, it still not working even with the 1.7.0 - the same error
(also tried to update the Microsoft.NET.Sdk.Functions tho the 1.0.37 (supposing still the v1 and still working only with the ver 1.5.2

from azurefunctions.extensions.

justinyoo avatar justinyoo commented on June 12, 2024

As I can see the SPO related NuGet packages, I assume that you're using AzFunc v1, right? In this case, you can't change the Newtonsoft.Json version. The error you see is because of the version change. Here are many discussions around:

I'm sorry to say that this is out of my control. However, there are possible solutions you might like to consider:

from azurefunctions.extensions.

rychlym avatar rychlym commented on June 12, 2024

Hi,
Thanks for the info!
Right, I am using the v1 of azure function, as can be seen using the
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" />

The v1 is used , because PnPCore library is still not compatible with the .NET Core.
The problem seemed to be, that SharePointPnPCoreOnline was dependant on Newtonsoft.JSON version 11.0.1, and Microsoft.NET.Sdk.Functions was dependand on the verson 9.0.1
Hovewer, reggarding the many discussionos around you mentioned, I finally found a solution at https://github.com/Azure/azure-functions-vs-build-sdk (in the FAQ - it is said to slove that with explicitly referenced Newtonsoft.JSON version package in the .csproj)
Then I added your extension at a time you have released version 1.5.2. and everything worked...

Then I trided to upgrade to your extensions 1.5.4 and since that it stopped to work.

Is your extensions since 1.5.4 dependant on a specific version of the Newtonsoft.JSON?
What if I stay with the 1.5.2.version - will it suffer missing some important features?

Anyway I guess, the 3rd option you posted might be interesting, I wonder if it is possible to use several versions of the one assebly and how to setup it...
Also the option 1 seems to be more possible as of now, because Microsoft recently posted the Sharepoint Online CSOM library started to be compatible with .NET Core, so that SharePointPnPCoreOnline library perhaps could be also compatible with the .NET Core in quite near future...

from azurefunctions.extensions.

justinyoo avatar justinyoo commented on June 12, 2024

It's really strange...

Is your extensions since 1.5.4 dependant on a specific version of the Newtonsoft.JSON?

The OpenApi extension has a dependency on the Function SDK v1.0.28 - which uses Newtonsoft.Json 9.0.1. I've got sample function apps V1IoC and V1Static with Newtonsoft.Json 9.0.1 and there's no issue. All I can tell you now is that "stick with 9.0.1".

What if I stay with the 1.5.2.version - will it suffer missing some important features?

Well, it keeps improving its feature sets. I'm not sure why it worked on 1.5.2, but not after that.

from azurefunctions.extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.