|
@@ -15,11 +15,15 @@ namespace ET
|
|
|
|
|
|
public static void BuildModel(CodeOptimization codeOptimization, GlobalConfig globalConfig)
|
|
|
{
|
|
|
- string[] logicFiles = Directory.GetFiles(Define.BuildOutputDir, "Model_*");
|
|
|
- foreach (string file in logicFiles)
|
|
|
+ try
|
|
|
{
|
|
|
- File.Delete(file);
|
|
|
+ string[] logicFiles = Directory.GetFiles(Define.BuildOutputDir, "Model_*");
|
|
|
+ foreach (string file in logicFiles)
|
|
|
+ {
|
|
|
+ File.Delete(file);
|
|
|
+ }
|
|
|
}
|
|
|
+ catch { }
|
|
|
|
|
|
int random = RandomGenerator.RandomNumber(100000000, 999999999);
|
|
|
string logicFile = $"Model_{random}";
|
|
@@ -69,11 +73,16 @@ namespace ET
|
|
|
|
|
|
public static void BuildHotfix(CodeOptimization codeOptimization, GlobalConfig globalConfig)
|
|
|
{
|
|
|
- string[] logicFiles = Directory.GetFiles(Define.BuildOutputDir, "Hotfix_*");
|
|
|
- foreach (string file in logicFiles)
|
|
|
+ try
|
|
|
{
|
|
|
- File.Delete(file);
|
|
|
+ string[] logicFiles = Directory.GetFiles(Define.BuildOutputDir, "Hotfix_*");
|
|
|
+ foreach (string file in logicFiles)
|
|
|
+ {
|
|
|
+ File.Delete(file);
|
|
|
+ }
|
|
|
}
|
|
|
+ catch { }
|
|
|
+
|
|
|
string modelfile;
|
|
|
string[] modelFiles = Directory.GetFiles(Define.BuildOutputDir, "Model_*.dll");
|
|
|
if (modelFiles.Length > 0)
|