.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren't compiled to machine language.
if the dll's are going to be in the deployment bin, you can compute a hash at build time, and then at runtime compare the hash. if the dll is under your control, you should sign it.
using System;
using System.IO;
using System.Security.Cryptography;
public bool ValidateDllHash(string dllPath, string expectedHash)
{
using (var sha256 = SHA256.Create())
{
using (var stream = File.OpenRead(dllPath))
{
byte[] hashBytes = sha256.ComputeHash(stream);
string actualHash = BitConverter.ToString(hashBytes).Replace("-", "").ToLower();
return actualHash == expectedHash.ToLower();
}
}
}