Skip to content

Commit

Permalink
PnP Framework assembly is now strong named #458 #468
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenbe committed Sep 23, 2021
1 parent ee0cbf2 commit e8abcc8
Show file tree
Hide file tree
Showing 23 changed files with 29,693 additions and 19 deletions.
1 change: 1 addition & 0 deletions src/lib/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Including the requested SelectProperties in the output of ListUsers #460 [koenzomers - Koen Zomers]
- Fix PnPPS #1024 - issue with folder name having special chars #461 [gautamdsheth - Gautam Sheth]
- Fix regression - adding users/groups as site collection admins #462 [gautamdsheth - Gautam Sheth]
- PnP Framework assembly is now strong named #458 #468 [jansenbe - Bert Jansen]

## [1.6.0]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>netcoreapp3.1</TargetFramework>

<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/lib/PnP.Framework.Test/PnP.Framework.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
6 changes: 2 additions & 4 deletions src/lib/PnP.Framework/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System.Resources;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("PnP.PowerShell")]

#if DEBUG
[assembly: InternalsVisibleTo("PnP.Framework.Test")]
[assembly: InternalsVisibleTo("PnP.Framework.Modernization.Test")]
[assembly: InternalsVisibleTo("PnP.Framework.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Framework.Modernization.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
#endif

[assembly: NeutralResourcesLanguage("en")]
8 changes: 4 additions & 4 deletions src/lib/PnP.Framework/AuthenticationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public class AuthenticationManager : IDisposable
private readonly IAuthenticationProvider authenticationProvider;
private readonly PnPContext pnpContext;

internal CookieContainer CookieContainer { get; set; }
public CookieContainer CookieContainer { get; set; }

private IMsalHttpClientFactory HttpClientFactory
{
Expand Down Expand Up @@ -1150,7 +1150,7 @@ private static string GetKnownClientId(KnownClientId id)
}
}

internal ClientContext GetOnPremisesContext(string siteUrl, string userName, SecureString password)
public ClientContext GetOnPremisesContext(string siteUrl, string userName, SecureString password)
{
ClientContext clientContext = new ClientContext(siteUrl)
{
Expand All @@ -1163,7 +1163,7 @@ internal ClientContext GetOnPremisesContext(string siteUrl, string userName, Sec
return clientContext;
}

internal ClientContext GetOnPremisesContext(string siteUrl, ICredentials credentials)
public ClientContext GetOnPremisesContext(string siteUrl, ICredentials credentials)
{
ClientContext clientContext = new ClientContext(siteUrl)
{
Expand All @@ -1176,7 +1176,7 @@ internal ClientContext GetOnPremisesContext(string siteUrl, ICredentials credent
return clientContext;
}

internal ClientContext GetOnPremisesContext(string siteUrl)
public ClientContext GetOnPremisesContext(string siteUrl)
{
ClientContext clientContext = new ClientContext(siteUrl)
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/PnP.Framework/Extensions/ClientObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private static bool EnsureCollectionLoaded<T>(T clientObject, Expression<Func<T,
return false;
}

internal static void ClearObjectData(this ClientObject clientObject)
public static void ClearObjectData(this ClientObject clientObject)
{
var info_ClientObject_ObjectData = typeof(ClientObject)
.GetProperty("ObjectData", BindingFlags.NonPublic | BindingFlags.Instance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ namespace Microsoft.SharePoint.Client
/// <summary>
/// Class that holds the extension methods used to "tag" a client context for cloning support
/// </summary>
static partial class InternalClientContextExtensions
public static partial class InternalClientContextExtensions
{
private const string PnPSettingsKey = "SharePointPnP$Settings$ContextCloning";

internal static void AddContextSettings(this ClientRuntimeContext clientContext, ClientContextSettings contextData)
public static void AddContextSettings(this ClientRuntimeContext clientContext, ClientContextSettings contextData)
{
clientContext.StaticObjects[PnPSettingsKey] = contextData;
}

internal static ClientContextSettings GetContextSettings(this ClientRuntimeContext clientContext)
public static ClientContextSettings GetContextSettings(this ClientRuntimeContext clientContext)
{
if (!clientContext.StaticObjects.TryGetValue(PnPSettingsKey, out object settingsObject))
{
Expand Down
21 changes: 19 additions & 2 deletions src/lib/PnP.Framework/PnP.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<!-- Set the PnPCoreSdkPath and PnPCoreSdkPathNet5 to non published PnP Core SDK binaries to load them instead of the nuget ones -->
<PnPCoreSdkPath Condition="'$(PnPCoreSdkPath)' == ''"></PnPCoreSdkPath>
<PnPCoreSdkPathNet5 Condition="'$(PnPCoreSdkPathNet5)' == ''"></PnPCoreSdkPathNet5>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(IsWindows)'=='true'">
Expand Down Expand Up @@ -173,9 +175,25 @@
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<Compile Update="SystemResources\SR.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>SR.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="SystemResources\SR.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SR.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.13.1" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" />
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="2.2.0" />
Expand Down Expand Up @@ -220,12 +238,11 @@
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="PnP.Core" Version="1.3.*-*" Condition="'$(PnPCoreSdkPath)' == ''" />
<PackageReference Include="Portable.Xaml" Version="0.26.0" />
<PackageReference Include="ResXResourceReader.NetStandard" Version="1.0.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.1" />
</ItemGroup>

<ItemGroup Condition="'$(PnPCoreSdkPath)' != ''">
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" Condition="'$(TargetFramework)' == 'netstandard2.0'"/>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="1.1.1" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<Reference Include="PnP.Core" Condition="'$(TargetFramework)' == 'netstandard2.0'">
<HintPath>$(PnPCoreSdkPath)</HintPath>
<Private>true</Private>
Expand Down
Loading

0 comments on commit e8abcc8

Please # to comment.