mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Bring back C# sample logging!
This commit is contained in:
@@ -5,6 +5,8 @@ namespace CSharpWpf
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public static MemoryLogger Log { get; private set; } = new();
|
||||
|
||||
// Since WPF has an "automatic" Program.Main, we need to create our own.
|
||||
// In order for this to work, you must also add the following to your .csproj:
|
||||
// <StartupObject>CSharpWpf.App</StartupObject>
|
||||
@@ -15,6 +17,7 @@ namespace CSharpWpf
|
||||
// It's important to Run() the VelopackApp as early as possible in app startup.
|
||||
VelopackApp.Build()
|
||||
.OnFirstRun((v) => { /* Your first run code here */ })
|
||||
.SetLogger(Log)
|
||||
.Run();
|
||||
|
||||
// We can now launch the WPF application as normal.
|
||||
|
||||
Reference in New Issue
Block a user