Hi,@Lukasz Zymla. Welcome to Microsoft Q&A.
1.Prefer using the signed version (v4.0_4.0.0.0) in your application by explicitly referencing it and setting up binding redirects.
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.DirectoryServices.Protocols" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
If the unsigned version is causing problems, consider reinstalling or repairing the .NET Framework to get the correct assembly version.
Uninstall and reinstall the appropriate version of the .NET Framework that includes the correct signed version. Ensure that all updates or patches are correctly applied.
You can also try repairing the .NET Framework installation through Programs and Features in Windows.
2.The different versions of System.DirectoryServices.Protocols.dll (e.g., v4.0_4.0.0.0 and v4.0_5.0.0.0) are likely the result of different .NET runtime installations.
These DLLs are stored in the Global Assembly Cache (GAC), where .NET assemblies are shared across applications. Different versions of the same assembly can coexist in the GAC.
The v4.0_5.0.0.0 version is unsigned could be due to an incomplete or incorrect installation of the .NET Framework, or this specific version might have been installed as part of a specific update or patch. Unsigned assemblies might cause trust or security issues, depending on how your application is configured to handle strong names.
If the response is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.