Updates framework support for credential provider and adds source link support
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user