Skip to content

Commit 9b501a4

Browse files
authored
Merge pull request #624 from LogExperts/silentsetupfor_winget
Silentsetupfor winget
2 parents 5c460af + 8326c49 commit 9b501a4

2 files changed

Lines changed: 34 additions & 23 deletions

File tree

build/Build.cs

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ partial class Build : NukeBuild
3232
/// - JetBrains Rider https://nuke.build/rider
3333
/// - Microsoft VisualStudio https://nuke.build/visualstudio
3434
/// - Microsoft VSCode https://nuke.build/vscode
35-
public static int Main () => Execute<Build>(x => x.Test);
35+
public static int Main() => Execute<Build>(x => x.Test);
3636

3737
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
3838
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
@@ -102,7 +102,7 @@ partial class Build : NukeBuild
102102
ChocolateyDirectory / $"logexpert.{VersionString}.nupkg"
103103
];
104104

105-
protected override void OnBuildInitialized ()
105+
protected override void OnBuildInitialized()
106106
{
107107
SetVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1");
108108

@@ -205,11 +205,22 @@ protected override void OnBuildInitialized ()
205205
Log.Information("Plugin hashes generated successfully");
206206

207207
// Rebuild PluginRegistry project to include the generated file
208-
// IMPORTANT: Set OutputPath to match the main build output directory
208+
// IMPORTANT: Set OutputPath to match the main build output directory.
209+
// OutputPath is a global property, so it propagates to PluginRegistry's
210+
// ProjectReferences (LogExpert.Core, LogExpert.Resources) and rebuilds them
211+
// into the same folder. The version properties MUST match the main Compile
212+
// target; otherwise those dependencies are re-emitted at the Directory.Build.props
213+
// default version, overwriting the GitVersion-stamped copies. That leaves
214+
// LogExpert.exe referencing one version of LogExpert.Core while the DLL on disk
215+
// has another, and the strong-name binder fails at startup with a
216+
// FileNotFoundException for the referenced version.
209217
Log.Information("Rebuilding PluginRegistry to include generated hashes...");
210218
DotNetBuild(s => s
211219
.SetProjectFile(SourceDirectory / "PluginRegistry" / "LogExpert.PluginRegistry.csproj")
212220
.SetConfiguration(Configuration)
221+
.SetAssemblyVersion(VersionString)
222+
.SetFileVersion(VersionFileString)
223+
.SetInformationalVersion(VersionInformationString)
213224
.SetProperty("OutputPath", OutputDirectory)
214225
.EnableNoRestore());
215226

@@ -491,7 +502,7 @@ protected override void OnBuildInitialized ()
491502
}
492503
});
493504

494-
private void ExecuteInnoSetup (AbsolutePath innoPath)
505+
private void ExecuteInnoSetup(AbsolutePath innoPath)
495506
{
496507
Process proc = new();
497508

@@ -513,7 +524,7 @@ private void ExecuteInnoSetup (AbsolutePath innoPath)
513524
}
514525
}
515526

516-
private void TransformTemplateFile (AbsolutePath path, bool deleteTemplate)
527+
private void TransformTemplateFile(AbsolutePath path, bool deleteTemplate)
517528
{
518529
string text = path.ReadAllText();
519530
text = text.Replace("##version##", VersionString);
@@ -527,8 +538,8 @@ private void TransformTemplateFile (AbsolutePath path, bool deleteTemplate)
527538
}
528539

529540
[GeneratedRegex(@"\w\w{2}[_]p?[tso]?[erzliasx]+[_rhe]{5}", RegexOptions.IgnoreCase, "en-GB")]
530-
private static partial Regex SFTPPlugin ();
541+
private static partial Regex SFTPPlugin();
531542

532543
[GeneratedRegex("\\.template$")]
533-
private static partial Regex TemplateRegex ();
544+
private static partial Regex TemplateRegex();
534545
}

src/PluginRegistry/PluginHashGenerator.Generated.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,35 @@ public static partial class PluginValidator
1010
{
1111
/// <summary>
1212
/// Gets pre-calculated SHA256 hashes for built-in plugins.
13-
/// Generated: 2026-06-14 15:18:01 UTC
13+
/// Generated: 2026-06-15 07:05:04 UTC
1414
/// Configuration: Release
1515
/// Plugin count: 21
1616
/// </summary>
1717
public static Dictionary<string, string> GetBuiltInPluginHashes()
1818
{
1919
return new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
2020
{
21-
["AutoColumnizer.dll"] = "2B51D49EB1CB1FC861A72682A8828A7A1AABDC13B45A9D71021E6D34D656AC5F",
21+
["AutoColumnizer.dll"] = "5E36733BC9FB4DFD122297FCB46B65708221260C7EFB3B7C1C3FD6C6029F6C56",
2222
["BouncyCastle.Cryptography.dll"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6",
2323
["BouncyCastle.Cryptography.dll (x86)"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6",
24-
["CsvColumnizer.dll"] = "BF426E7168CB602A7FB7ABBE4211A454969853E09FA3B54530AAB80423DE767B",
25-
["CsvColumnizer.dll (x86)"] = "BF426E7168CB602A7FB7ABBE4211A454969853E09FA3B54530AAB80423DE767B",
26-
["DefaultPlugins.dll"] = "C256A9738665E5796FCFDE2B95FF1898690851206DD46F515A5DB6E360C672C7",
27-
["FlashIconHighlighter.dll"] = "C288A013DC7CBF0D4CC016C19372497880E33F50863F363537B703CD5200A7A8",
28-
["GlassfishColumnizer.dll"] = "A20D6E4A03FAA1153C60852C9FC02B0BAE699D4A841AD2E7470B327FAC009C02",
29-
["JsonColumnizer.dll"] = "F14B13F91A77334D7449032DF6B5B331859F19E2540932956C8F37825B1E2950",
30-
["JsonCompactColumnizer.dll"] = "1F4AC39C9CF2E515717ECE97126B17F2BB1F7E8A49E54EA4EC96339DDFD7D341",
31-
["Log4jXmlColumnizer.dll"] = "0A9799FC27ECA9B08458FCA1110059D6317FD04E52F8E31A5C7C4809F43C1007",
32-
["LogExpert.Resources.dll"] = "36CC47E8DAF4BDCE068FFE20F859DA8DA3C0F83B6F9249737C1A3333C468439D",
24+
["CsvColumnizer.dll"] = "8CAD7564DF9F1F48F008FAE761CBF9EBC385BB5003A0A0161365C22B960C7D48",
25+
["CsvColumnizer.dll (x86)"] = "8CAD7564DF9F1F48F008FAE761CBF9EBC385BB5003A0A0161365C22B960C7D48",
26+
["DefaultPlugins.dll"] = "DE7EC37D128B99433CC9D6A1779DF9E0372F06643C668A488B15DA2B12EFFEAB",
27+
["FlashIconHighlighter.dll"] = "9CA8E2A1A1A4D7AD5B3ABE21EA77FBEF49055B4E411E29F7E79961258734CCC3",
28+
["GlassfishColumnizer.dll"] = "34AE8863229D0BBBCCFDBA64D9F8B6991019A9B5E9A226ABBFEB431AE2DEC9FC",
29+
["JsonColumnizer.dll"] = "685A895444D6122DDB872CE4CF320B7292D6AB2711E454AE614229DFD3FFA2CA",
30+
["JsonCompactColumnizer.dll"] = "8C35E9E5B1BF3EFB9321946400F1EDDC0ACD891498D979C678A612CB4A3FC704",
31+
["Log4jXmlColumnizer.dll"] = "5A5DF0BE626A4C842CF06CFA54502563E1C0CA243101B0DDFCA436EBF2D990E2",
32+
["LogExpert.Resources.dll"] = "D1BE3ADE2375330192907B97722731C874F7C426FB622B7CD37005B5C386811F",
3333
["Microsoft.Extensions.DependencyInjection.Abstractions.dll"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93",
3434
["Microsoft.Extensions.DependencyInjection.Abstractions.dll (x86)"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93",
3535
["Microsoft.Extensions.Logging.Abstractions.dll"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D",
3636
["Microsoft.Extensions.Logging.Abstractions.dll (x86)"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D",
37-
["RegexColumnizer.dll"] = "ECAE7B76E490245A0B4ACE61F01CFBC53D35F2603844750AA81FC5963D0BB846",
38-
["SftpFileSystem.dll"] = "DD7401C9D71819B4BC8D8AC58DC04F18B652DDAB84919E42A0B3E69051EFCFEC",
39-
["SftpFileSystem.dll (x86)"] = "7211D918ED22E47BA641FB1F61A3C21DDC691205FD62C367CAB6F3C89B0DFD6E",
40-
["SftpFileSystem.Resources.dll"] = "2AC4794A3EF888EC8F61393CDA7C4812FFFB7DE0CE5C9D6A8EAF6B68F7AE3E40",
41-
["SftpFileSystem.Resources.dll (x86)"] = "2AC4794A3EF888EC8F61393CDA7C4812FFFB7DE0CE5C9D6A8EAF6B68F7AE3E40",
37+
["RegexColumnizer.dll"] = "1B9D12854AA7288DEB2C32EFBF6C7E34F4D239C2759E4AB76DDB98E78A30E717",
38+
["SftpFileSystem.dll"] = "D6C6C74FB34BE5DCCFA05D79F7708B05838B25357F3FD2D3F57A0511FE43DA08",
39+
["SftpFileSystem.dll (x86)"] = "7DE08DA569EABA5F84A4A8FCFA6B611D437177305055ED29E369BA1A7360FC34",
40+
["SftpFileSystem.Resources.dll"] = "0D53D35B98A7FD606A0345122E80C55DC8CBA8AC81D9F579DA287059A78CA93C",
41+
["SftpFileSystem.Resources.dll (x86)"] = "0D53D35B98A7FD606A0345122E80C55DC8CBA8AC81D9F579DA287059A78CA93C",
4242

4343
};
4444
}

0 commit comments

Comments
 (0)