using System.Collections.Generic;
public static Dictionary<string, object?> Files1 = new(StringComparer.OrdinalIgnoreCase);
public static Dictionary<string, object?> Files2 = new(StringComparer.OrdinalIgnoreCase);
public static string BasePath = Path.Join("C:","User","admin","develop");
public static void PopulateFiles() {
Program.Files1.Add(Path.Join(Program.BasePath,"soup.dll"), null);
Program.Files1.Add(Path.Join(Program.BasePath,"soup.txt"), null);
Program.Files1.Add(Path.Join(Program.BasePath,"soup.exe"), null);
Program.Files2.Add(Path.Join(Program.BasePath,"soup.txt"), null);
Program.Files2.Add(Path.Join(Program.BasePath,"soup.exe"), null);
public static void Test(int number, Dictionary<string, object?> files, bool negate1, bool negate2) {
if (files.Any(p => p.Key.EndsWith(".dll") == negate2) == negate1)
throw new Exception("Could not create mod package because no .dll file was found in the project or build output.");
Console.WriteLine($"Test #{number}: Failed ({negate1}, {negate2})");
} catch (Exception exception) {
Console.WriteLine($"Test #{number}: Successful ({negate1}, {negate2})");
Console.WriteLine(exception.ToString());
Console.WriteLine($"\n{new string('=', 25)}\n");
public static void Main()
Program.Test(1, Program.Files1, false, false);
Program.Test(2, Program.Files1, true, false);
Program.Test(3, Program.Files1, false, true);
Program.Test(4, Program.Files1, true, true);
Program.Test(5, Program.Files2, false, false);
Program.Test(6, Program.Files2, true, false);
Program.Test(7, Program.Files2, false, true);
Program.Test(8, Program.Files2, true, true);