PnP-Sites-Core icon indicating copy to clipboard operation
PnP-Sites-Core copied to clipboard

.Net Standard Nuget Package

Open toddca opened this issue 3 years ago • 22 comments

Category

[ ] Bug [ X] Enhancement

Environment

[X ] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013

Adding the latest package from Nuget within a class library .net standard 2.1 project pulls down the .net framework 4.6.1 package.

toddca avatar Jul 10 '20 21:07 toddca

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Jul 10 '20 21:07 ghost

Hi Todd,

Are you referring to the PnP Sites Core nuget or the CSOM nuget? We have no release available yet for .NET Standard of PnP Sites Core as a Nuget package, and the behaviour is then that it will fall back to the .NET Framework version.

erwinvanhunen avatar Jul 14 '20 10:07 erwinvanhunen

@erwinvanhunen, any word on when the netstandard release is expected?

andrasg avatar Jul 14 '20 11:07 andrasg

@erwinvanhunen i am asking about the PnP Sites core, I know there is not a .net standard and asking when it will be available

toddca avatar Jul 14 '20 12:07 toddca

If you're in a hurry you can pull down the source code of PnP Sites Core. Open the PnPCore.sln solution and build it. You will get a working, albeit not tested, build.

We expect to come out with a Nuget package in a month or two.

erwinvanhunen avatar Jul 14 '20 19:07 erwinvanhunen

Thanks @erwinvanhunen - this is what I am actually doing ATM and for what I am doing it works great; read: no issues,

toddca avatar Jul 15 '20 11:07 toddca

@erwinvanhunen I have some updates in support of .Net Standard 2.1 that I can contribute. (Mostly supporting the Azure Blob connector and "modern" authentication.)

Is there a branch in which that work is ongoing?

pschaeflein avatar Jul 24 '20 15:07 pschaeflein

Been working with the CSOM for .NET Standard and am a bit concerned that modern auth means an azure ad app is required and sharepoint app, app-only auth is not possible. I realize this is a pnp thread, but knowing now if that is the case using CSOM or PnP would be useful for the project I'm currently on. I'm hoping that someone here can tell me I'm wrong.

tbithell avatar Aug 24 '20 22:08 tbithell

Answered my own question by pulling down the code and building etc, and it works. Very happy to be wrong :)

tbithell avatar Aug 25 '20 14:08 tbithell

There is a new nuget of SharePointPnPCoreOnline released 3 days ago but it is not netstandard yet. Any update about when the netstandard version will be released as nuget?

HaroldH76 avatar Sep 11 '20 13:09 HaroldH76

Master has the .net standard code in it. Why is that not pushed to nuget?

araver avatar Oct 01 '20 17:10 araver

https://aka.ms/pnp/coresdk

pschaeflein avatar Oct 02 '20 01:10 pschaeflein

@pschaeflein - last I check on the core sdk it couldn't run in the app context, has that changed? Also, until MS provides the same level of granularity in graph permissions as they do for add-ins, or at least something similar, graph is a no go for every organization that has a security team that isn't cool with an app having access to every site collection in a tenant. From this community member's perspective, the fact that I can create a package locally that works with .net standard, but there isn't one available in nuget is confusing.

tbithell avatar Oct 02 '20 15:10 tbithell

At this point, I believe those questions should be asked in an issue in that repository instead of this one.

pschaeflein avatar Oct 05 '20 21:10 pschaeflein

At this point is really just a matter of someone pushing it up to NuGet. Does someone want to flip that switch?

araver avatar Oct 07 '20 03:10 araver

It is understandable that at the moment most of the resources are bound to the new coresdk project which is in it's final stages. But maybe it would be an option to release the pnp-sites-core to NuGet marked as 'beta' without further testing? For us the code is working but it's cumbersome to handle the library without NuGet, especially in projects where several developers are involved. Maybe @erwinvanhunen could provide us with a new ETA for getting this one pushed as a beta to NuGet?

cwdata avatar Oct 07 '20 13:10 cwdata

Is this still not available?

tbithell avatar Oct 12 '20 13:10 tbithell

Just pulled what was released today and even though it was said on the call that is should have a preview available it breaks in the token helper in the same place it always does because it doesn't support .NET Standard.

tbithell avatar Oct 12 '20 14:10 tbithell

@tbithell It might be, that there will never be a Nuget package for pnp-sites-core. There is another project you can find here: https://github.com/pnp/pnpframework In its readme it says that it is the successor of pnp-sites-core. That readme also contains a nice graphic which shows the planned future of all of these projects. That PnP Framework is available on Nuget if you switch 'show preview versions' to on. The generation of the ClientContext is a little bit different there. As long as you're not using ACS you'll have to provide the majority of parameters through the constructor of the AuthenticationManager class and then just call GetContext(sharePointUrl) on that object. Apart from that for a first look it seems to be quite similar to pnp-sites-core.

cwdata avatar Oct 12 '20 14:10 cwdata

@cwdata - I see that now, giving it a shot now, much appreciated!

tbithell avatar Oct 12 '20 14:10 tbithell

@cwdata - Got it working with the new package, much appreciated. I haven't run through all the tests yet, but the only change I had to make to get context was to replace a call to GetAppOnlyAuthenticatedContext, which doesn't exist in this package with GetACSAppOnlyContext.

tbithell avatar Oct 12 '20 14:10 tbithell

@cwdata - Got it working with the new package, much appreciated. I haven't run through all the tests yet, but the only change I had to make to get context was to replace a call to GetAppOnlyAuthenticatedContext, which doesn't exist in this package with GetACSAppOnlyContext.

Hello @tbithell can you please share with us a part of the code that are working ?

MRaihane avatar Oct 31 '20 23:10 MRaihane