BuildApp – AssembliesFinder

This step finds all assemblies (DLLs) that are placed in the bin folder of the solution and stores instances of „System.IO.FileInfo“ inside the “AppDefinition.AssembliesToLoad” collection:

string tPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
 
#region Find files of path and own assembly
DirectoryInfo tDirectoryInfo = new DirectoryInfo(tPath);

string tOwnFile = Path.GetFileName(Assembly.GetExecutingAssembly().Location);
#endregion
 
#region Generate .dll file list (except own assembly)
foreach (FileInfo tFile in tDirectoryInfo.GetFiles("*.dll"))
{
	// Ignore own assembly
	if (tFile.Name != tOwnFile)
		app.AssembliesToLoad.Add(tFile);
}
#endregion

Last edited Apr 20, 2013 at 9:40 AM by InneHo, version 3

Comments

No comments yet.