Open ravick4u opened 4 years ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
Have you tried installing Newtonsoft.Json
after installing pnp? That usually works for me.
@jimmywim The problem is the warning message. I can still build the solution but the warning message will never go away. Recently when I tried XMLSharePointTemplateProvider.GetTemplate() got the same message but this time it was an error. So I am worried that this warning message will cause an issue down the line. I also have repo(https://github.com/ravick4u/AzureFunV1WithPnP) created so you can give it a try if that works for you.
@jimmywim If I install SharePointPnPCoreOnline without installing Newtonsoft.json then getting below error.
Package restore failed. Rolling back package changes for 'FunctionAppV1'.
Error NU1107 Version conflict detected for Newtonsoft.Json. Install/reference Newtonsoft.Json 11.0.1 directly to project FunctionAppV1 to resolve this issue. FunctionAppV1 -> SharePointPnPCoreOnline 3.19.2003 -> Newtonsoft.Json (>= 11.0.1) FunctionAppV1 -> Microsoft.NET.Sdk.Functions 1.0.24 -> Newtonsoft.Json (= 9.0.1). FunctionAppV1 C:\Ravi\Source\github\AzureFunV1WithPnP\FunctionApp\FunctionAppV1\FunctionAppV1.csproj 1
I also tried new PnP release(SharePointPnPCoreOnline - 3.19.2003) but that is also giving me the same error.
Category
Describe the bug
I am creating my first Azure Function(V1) with SharePointPnPCoreOnline package and Visual Studio 2019/2017. When I created a function project without SharePointPnPCoreOnline its working without any error.
But when I added SharePointPnPCoreOnline its started giving me warning message like below
Upon my research, I came across with below post from elio where the solution has been suggested for this problem.
https://www.eliostruyf.com/using-the-latest-sharepoint-pnp-core-online-dependency-in-your-azure-functions/
Based on a recommendation from this post, the solution to this problem is to install "Newtonsoft.Json" package before installing "SharePointPnPCoreOnline".
When I install "Newtonsoft.Json 12.0.1" I got below warning.
github repo with sample code https://github.com/ravick4u/AzureFunV1WithPnP
Expected behavior
Reference of "SharePointPnPCoreOnline" should get added.
Developer environment
Additional context
This has already been discussed in the past with SharePoint/sp-dev-docs#3364 but with that no one discussed about warning message.
Thanks for your contribution! Sharing is caring.