private static void SafeAddRef(ProjectFile csproj, string refName, string hintPath) { try { csproj.AddRef(refName, hintPath); } catch (Exception e) { Console.WriteLine(e); Log.Error("Fail to add reference", e); } }