RSS

Tag Archives: assembly

Assembly Creation Date

It might be sometimes the time when you need the creation date of the assembly or to name it more accurate, the build date. In order to get it you will need to retrieve the location on the hard drive where the assembly is located. Once found you have to retrieve the creation time of that file. This is achieved with following short piece of code.

Note:I do not care about handling errors in the following lines. It’s up to you whether you handle them or not. Also note that the following method is an extension method.

public static DateTime GetBuildDate(this Assembly assembly)
{
    if(assembly == null)
        throw new ArgumentNullException("assembly","should not be null.");
    returnĀ File.GetCreationTime(assembly.Location);
}
 
Leave a comment

Posted by on February 20, 2012 in C-Sharp

 

Tags:

Error: Assembly MySmartAssembly.dll must be strong signed in order to be marked as a prerequisite

Today I got into troubles building my application by using one of my libraries. The error message was the following:

Assembly MySmartAssembly.dll must be strong signed in order to be marked as a prerequisite

It took a very long time for trying out different things, but with no success. Finally I tried to clean the whole solution: no effect. But after cleaning up each single project in the solution the problem has disappeared.
Luckily

 
Leave a comment

Posted by on March 1, 2011 in Visual Studio

 

Tags: