mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 15:44:26 +01:00
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using System.Reflection;
|
|
using System.Text.Json;
|
|
|
|
var plugins = Directory.GetDirectories("../../../../Plugins");
|
|
var p = "";
|
|
foreach (var plugin in plugins)
|
|
{
|
|
try
|
|
{
|
|
var assemblyConfigurationAttribute = typeof(Program).Assembly.GetCustomAttribute<AssemblyConfigurationAttribute>();
|
|
var buildConfigurationName = assemblyConfigurationAttribute?.Configuration;
|
|
var x = Directory.GetDirectories(Path.Combine(plugin, "bin"));
|
|
|
|
p += $"{Path.GetFullPath(plugin)}/bin/{buildConfigurationName}/net6.0/{Path.GetFileName(plugin)}.dll;";
|
|
// if (x.Any(s => s.EndsWith("Altcoins-Debug")))
|
|
// {
|
|
// p += $"{Path.GetFullPath(plugin)}/bin/Altcoins-Debug/net6.0/{Path.GetFileName(plugin)}.dll;";
|
|
// }
|
|
// else
|
|
// {
|
|
// }
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine(e);
|
|
}
|
|
}
|
|
|
|
var content = JsonSerializer.Serialize(new
|
|
{
|
|
DEBUG_PLUGINS = p
|
|
});
|
|
|
|
Console.WriteLine(content);
|
|
await File.WriteAllTextAsync("../../../../submodules/BTCPayServer/BTCPayServer/appsettings.dev.json", content); |