private bool TryCopySiblingFileTo(string name, string folder)
{
if (File.Exists(Path.Combine(folder, name)))
{
return false;
}
string thisDllPath = this.GetType().Assembly.Location;
string fromPath = Path.Combine(Path.GetDirectoryName(thisDllPath), name);
string toPath = Path.Combine(folder, name);
try
{
File.Copy(fromPath, toPath);
}
catch
{
return false;
}
return true;
}