Is it possible to determine if the assembly has changed?
I have a standard project that generates an assembly called MyAssembly.dll.
In a separate project, I read the assembly and generate a hash.
When I generate a hash for the assembly, I recompile every time. I set the build version to be static, are there any other attributes that I need to change?
class Program
{
static void Main(string[] args)
{
var array = File.ReadAllBytes(@"MyAssembly.dll");
SHA256Managed algo = new SHA256Managed();
var hash = algo.ComputeHash(array);
Console.WriteLine(Convert.ToBase64String(hash));
}
}
thanks
Rohan
source
share