public static IAssemblyTarget FromPath(Uri codebase, string location = null, string fullname = null)
{
if (codebase == null)
{
throw new ArgumentNullException("codebase", "Codebase URI cannot be null!");
}
if (!File.Exists(codebase.LocalPath))
{
throw new FileNotFoundException("The target location must be an existing file!");
}
if (!string.IsNullOrEmpty(location) && !File.Exists(location))
{
throw new FileNotFoundException("The target location must be an existing file!");
}
return new AssemblyTarget()
{
CodeBase = codebase,
Location = location,
FullName = fullname,
IsDynamic = false,
};
}