I am trying to do a demo for Fusion Log Viewer, wanting to view the Assembly Bind Logs in a custom directory.
I just created a small demo application for this as follows:
A small class library project containing just one method GetString() and set assembly version as 1.0.0.0
namespace ClassLibrary1
{
public class Class1
{
public static string GetString()
{
return "yes";
}
}
}
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
A small console application project referencing the above library and having the following code:
References ClassLibrary1.dll Version 1.0.0.0
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(ClassLibrary1.Class1.GetString());
Console.ReadLine();
}
}
}
I build this console application and close the visual studio and then run the executable. It prints 'yes' as expected.
Then, I upgrade the ClassLibrary1's AssemblyInfo as follows to change its version number to 2.0.0.0:
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
After replacing the library inside console application with this version 2.0, and running the executable again, it still works and prints 'yes'.
Why is it still working when the referenced DLL doesn't exist in it? The expectation should be creation of an Assembly Bind Log failure inside the Fusion Log Viewer's custom directory.
Can any one explain, why is it still working?