Closed hyankov closed 7 years ago
thx @hyankov for reporting this. We do run daily testing on the SP2013 with NuGet packages as well, but this could be some environmental issue around missing framework bits.
Thank you. The same thing applies for SharePointPnPCore2016, I have just tried it.
Hristo, thanks for raising this issue. We have followed the problem down to an incorrect/unnecessary reference in SharePointPnP.IdentityModel.Extensions, the PnP-IdentityModel library.
The reference has been removed and the package updated to v1.2.1. We're now going through the mechanics of repackaging Core and will have more updates soon.
Another point - we have tested on a clean VM with SP2013 installed and have no issues building.
OfficeDevPnP.Core references SharePointPnP.IdentityModel.Extensions which references Microsoft.Extensions.WebEncoders through NuGet packages, technically it should all work and all dependencies should resolve. I can't yet figure out why you can't build.
Hi,
Thank you for investigating. To be specific, the issue is in adding the reference to the SharePointPnPCore2013, not about building the solution. Although, of course, if I don't add the reference, I can't build :)
The environment I am working on:
Windows Server 2012
SharePoint 2013
Visual Studio 2013
Project is Class Library, target framework: .NET Framework 4.5.1 (I have tried with others too)
What other packages are in the project:
<packages>
<package id="AppForSharePointOnlineWebToolkit" version="3.1.2" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net451" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net451" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net451" />
<package id="SharePointPnPCore2013" version="2.11.1701.1" targetFramework="net451" />
</packages>
Here is a complete log when I try to install the latest NuGet, which fails because of the dependency:
PM> Install-Package SharePointPnPCore2013
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 5.2.3)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.4)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 5.2.3)'.
Attempting to resolve dependency 'SharePointPnP.IdentityModel.Extensions (≥ 1.2.0)'.
Attempting to resolve dependency 'Microsoft.Extensions.WebEncoders (≥ 1.0.0)'.
Attempting to resolve dependency 'Microsoft.IdentityModel (≥ 6.1.7600.16394)'.
Installing 'Microsoft.Extensions.WebEncoders 1.0.0'.
You are downloading Microsoft.Extensions.WebEncoders from Microsoft.Extensions.WebEncoders, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_enu.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.Extensions.WebEncoders 1.0.0'.
Installing 'Microsoft.IdentityModel 6.1.7600.16394'.
You are downloading Microsoft.IdentityModel from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=259741. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.IdentityModel 6.1.7600.16394'.
Installing 'SharePointPnP.IdentityModel.Extensions 1.2.0'.
You are downloading SharePointPnP.IdentityModel.Extensions from SharePoint Patterns & Practices, the license agreement to which is available at https://github.com/SharePoint/PnP-IdentityModel/blob/master/LICENSE. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'SharePointPnP.IdentityModel.Extensions 1.2.0'.
Installing 'SharePointPnPCore2013 2.12.1702.0'.
You are downloading SharePointPnPCore2013 from Microsoft SharePoint Developer Patterns & Practices, the license agreement to which is available at https://github.com/OfficeDev/PnP-Sites-Core/blob/dev/LICENSE. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'SharePointPnPCore2013 2.12.1702.0'.
Removing 'Microsoft.Extensions.WebEncoders 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.WebEncoders 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.WebEncoders.Core 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.WebEncoders.Core 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.OptionsModel 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.OptionsModel 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.Configuration.Binder 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.Configuration.Binder 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.Configuration 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.Configuration 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.Configuration.Abstractions 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.Configuration.Abstractions 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.Primitives 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.Primitives 1.0.0-rc1-final' from XXX.PnP.Extensions.
Removing 'Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0-rc1-final' from XXX.PnP.Extensions.
Successfully removed 'Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0-rc1-final' from XXX.PnP.Extensions.
Adding 'Microsoft.Extensions.WebEncoders 1.0.0' to XXX.PnP.Extensions.
Uninstalling 'Microsoft.Extensions.WebEncoders 1.0.0'.
Successfully uninstalled 'Microsoft.Extensions.WebEncoders 1.0.0'.
Install failed. Rolling back...
Install-Package : Could not install package 'Microsoft.Extensions.WebEncoders 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.2', but the package does not contain any
assembly references or content files that are compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package SharePointPnPCore2013
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Or when I target 4.5.1: Install-Package : Could not install package 'Microsoft.Extensions.WebEncoders 1.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
And here it is working, when I install the previous version (2.11.1701.1):
PM> Install-Package SharePointPnPCore2013 -Version 2.11.1701.1
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 5.2.3)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.4)'.
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Core (≥ 5.2.3)'.
Attempting to resolve dependency 'AppForSharePointOnlineWebToolkit (≥ 3.1.2)'.
Installing 'Newtonsoft.Json 6.0.4'.
Successfully installed 'Newtonsoft.Json 6.0.4'.
Installing 'Microsoft.AspNet.WebApi.Client 5.2.3'.
You are downloading Microsoft.AspNet.WebApi.Client from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.2.3'.
Installing 'Microsoft.AspNet.WebApi.Core 5.2.3'.
You are downloading Microsoft.AspNet.WebApi.Core from Microsoft, the license agreement to which is available at http://www.microsoft.com/web/webpi/eula/net_library_eula_ENU.htm. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.AspNet.WebApi.Core 5.2.3'.
Installing 'AppForSharePointOnlineWebToolkit 3.1.2'.
Successfully installed 'AppForSharePointOnlineWebToolkit 3.1.2'.
Installing 'SharePointPnPCore2013 2.11.1701.1'.
You are downloading SharePointPnPCore2013 from Microsoft SharePoint Developer Patterns & Practices, the license agreement to which is available at https://github.com/OfficeDev/PnP-Sites-Core/blob/dev/LICENSE. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'SharePointPnPCore2013 2.11.1701.1'.
Adding 'Newtonsoft.Json 6.0.4' to XXX.PnP.Extensions.
Successfully added 'Newtonsoft.Json 6.0.4' to XXX.PnP.Extensions.
Adding 'Microsoft.AspNet.WebApi.Client 5.2.3' to XXX.PnP.Extensions.
Successfully added 'Microsoft.AspNet.WebApi.Client 5.2.3' to XXX.PnP.Extensions.
Adding 'Microsoft.AspNet.WebApi.Core 5.2.3' to XXX.PnP.Extensions.
Successfully added 'Microsoft.AspNet.WebApi.Core 5.2.3' to XXX.PnP.Extensions.
Adding 'AppForSharePointOnlineWebToolkit 3.1.2' to XXX.PnP.Extensions.
Successfully added 'AppForSharePointOnlineWebToolkit 3.1.2' to XXX.PnP.Extensions.
Adding 'SharePointPnPCore2013 2.11.1701.1' to XXX.PnP.Extensions.
Successfully added 'SharePointPnPCore2013 2.11.1701.1' to XXX.PnP.Extensions.
One or more packages could not be completely uninstalled: Microsoft.SharePointOnline.CSOM.16.1.6216.1200. Restart Visual Studio to finish uninstall.
(which works after restart of the Studio)
Hi @hyankov ,
We've released a version 1.2.2 of the SharePointPnP.IdentityModel.Extensions package which does not have a dependency on Microsoft.Extensions.WebEncoders. This updated package is set as minimal version for the March 2017 PnP packages we just pushed out, so this should solve your issue. I'll be closing this issue, but don't hesitate to open it again if you still see issues with the March 2017 version.
Hi there,
I am using .net core and when i try using SharePointPnP.IdentityModel.Extensions, i am getting it was restored using '..NETFramework, Version=v4.6.1' instead of the project target framework '.NetCoreApp,Version=v2.0'. And this may not be fully compatible. We need this working, because, we will be deploying this app in Linux/Centos.. please help..
In a brand new .NET Framework Class Library project there seems to be a problem with installing the latest SharePoint PnP Core (Install-Package SharePointPnPCore2013) NuGet. I have tried targeting 4.5, 4.6.* and what not.
There is no .NET Framework version that seems compatible with this dependency? Thankfully "Install-Package SharePointPnPCore2013 -Version 2.11.1701.1" installs without issue. My conclusion is that that one of the dependencies of one of your dependencies is no longer compatible with any classic .NET Framework version?