tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Get strongly-named TdLib and TdLib.Api DLLs #2779

Closed CualeMarke closed 8 months ago

CualeMarke commented 8 months ago

Hi, I have an MVC .NET Framework web application and I'd added the TdLib and TdLib.Api packages from nuget (version 1.8.21). Then I've seen that some dependencies were missing, so I've compiled the project "https://github.com/tdlib/td" to get the required DLLs. Then I've managed to get the "tdjson.dll", "libcrypto-3-x64.dll", "libssl-3-x64.dll", "zlib1.dll" DLLs from the ".\td\tdlib\bin" folder. Finally I've added them to the web application and everything started working.

Sadly my project is signed and strongly-named via a .pfx file (I've tried also a .snk) and since this DLLs aren't strongly-named my web application can't run anymore if I keep the Signing enabled. I've tried in many ways to sign these DLLs in some way (Assembly Linker, Sn.exe, Signtool.exe), but nothing worked.

Am I missing something? Is there a way to get these DLLs strongly-named?

Thank you

levlam commented 8 months ago

You can open the project for TDLib building in Visual Studio and change properties manually. There should be no need to strongly-name native DLLs "libcrypto-3-x64.dll", "libssl-3-x64.dll", "zlib1.dll".

CualeMarke commented 8 months ago

Ok, it worked, thank you. So, basically you are confirming me that I should not use TdLib and TdLib.Api from nuget, but I should use Telegram.Td generated by TdLib project.

levlam commented 8 months ago

TDLib in nuget is provided by a third-party publisher. It is definitely simpler to use the nuget version, but it is always advisable to use the latest TDLib version from Github instead.