Updates framework support for credential provider and adds source link support

This commit is contained in:
Ryan Newington
2023-02-02 06:45:25 +11:00
parent a5a97bdf68
commit f874047354
8 changed files with 31 additions and 22 deletions
@@ -0,0 +1,8 @@
// This file is used by Code Analysis to maintain SuppressMessage
// attributes that are applied to this project.
// Project-level suppressions either have no target or are given
// a specific target and scoped to a namespace, type, member, etc.
using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")]
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;net472</TargetFrameworks>
<TargetFrameworks>net6.0-windows;net7.0-windows;net461</TargetFrameworks>
<RegisterForComInterop>false</RegisterForComInterop>
<OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -18,7 +18,7 @@
<Copyright>Copyright 2023 Lithnet Pty Ltd</Copyright>
<ProductName>Lithnet Windows Credential Provider</ProductName>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>beta.38</VersionSuffix>
<VersionSuffix>beta.43</VersionSuffix>
<Authors>Lithnet</Authors>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AutoIncrementPackageRevision>true</AutoIncrementPackageRevision>
@@ -28,10 +28,22 @@
<RepositoryUrl>https://github.com/lithnet/windows-credential-provider</RepositoryUrl>
<SupportUrl>https://github.com/lithnet/windows-credential-provider</SupportUrl>
<PackageOutputPath>D:\dev\nuget\packages</PackageOutputPath>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.32" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" Condition="$(TargetFramework) == 'netstandard2.1'" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Drawing.Common" Version="6.0.0" Condition="$(TargetFrameworkIdentifier) != '.NETFramework'" />
</ItemGroup>
</Project>
@@ -39,20 +39,7 @@ namespace Lithnet.CredentialProvider.ModuleInit
var name = new AssemblyName(args.Name);
Trace.WriteLine($"Request for {args.Name}");
#if NETFRAMEWORK
if (name.Name.StartsWith("System.", StringComparison.OrdinalIgnoreCase))
{
string gacPath = $@"C:\Windows\Microsoft.NET\assembly\GAC_MSIL\{name.Name}\v4.0_4.0.0.0__b03f5f7f11d50a3a\{name.Name}.dll";
if (File.Exists(gacPath))
{
Trace.WriteLine($"System assembly found at {gacPath}");
return Assembly.LoadFrom(gacPath);
}
}
#endif
string assyPath = Path.Combine(basePath, $"{name.Name}.dll");
string assyPath = Path.Combine(basePath, $"{name.Name}.dll");
if (File.Exists(assyPath))
@@ -1,7 +1,9 @@
namespace System.Runtime.CompilerServices
#if !NET5_0_OR_GREATER
namespace System.Runtime.CompilerServices
{
[AttributeUsage(System.AttributeTargets.Method, Inherited = false)]
internal sealed class ModuleInitializerAttribute : Attribute
{
}
}
#endif
@@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.38" />
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.43" />
<PackageReference Include="NLog" Version="5.1.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.1" />
</ItemGroup>
@@ -21,7 +21,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.38" />
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.43" />
<PackageReference Include="NLog" Version="5.1.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.1" />
</ItemGroup>
@@ -22,7 +22,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.36" />
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.43" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="NLog" Version="5.1.1" />
@@ -22,7 +22,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.36" />
<PackageReference Include="Lithnet.CredentialProvider" Version="1.0.0-beta.43" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
<PackageReference Include="NLog" Version="5.1.1" />