Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Flow.Launcher.Core/Flow.Launcher.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0-windows</TargetFramework>
Expand Down Expand Up @@ -55,12 +55,12 @@

<ItemGroup>
<PackageReference Include="Droplex" Version="1.7.0" />
<PackageReference Include="FSharp.Core" Version="9.0.300" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.3" />
<PackageReference Include="FSharp.Core" Version="9.0.201" />
<PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.0" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="SemanticVersioning" Version="3.0.0" />
<PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
<PackageReference Include="StreamJsonRpc" Version="2.22.11" />
<PackageReference Include="StreamJsonRpc" Version="2.21.10" />
</ItemGroup>
Comment on lines 56 to 64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Pin Microsoft.Win32.SystemEvents explicitly instead of broad downgrades.

If #3846 is due to SystemEvents regressions, rely on an explicit, direct pin rather than downgrading unrelated packages (StreamJsonRpc, FSharp.Core, etc.). This makes intent clear and prevents future transitive bumps from reintroducing the bug.

Apply:

   <ItemGroup>
     <PackageReference Include="Droplex" Version="1.7.0" />
     <PackageReference Include="FSharp.Core" Version="9.0.201" />
     <PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.0" />
     <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
     <PackageReference Include="SemanticVersioning" Version="3.0.0" />
     <PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
     <PackageReference Include="StreamJsonRpc" Version="2.21.10" />
+    <PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
   </ItemGroup>

Follow-up: after pinning, consider reverting unrelated downgrades if they weren’t required.


🏁 Script executed:

#!/bin/bash

git diff HEAD~1 -- Flow.Launcher.Core/Flow.Launcher.Core.csproj

Length of output: 1279


🏁 Script executed:

#!/bin/bash
# Search for any references to SystemEvents in the codebase
rg -n 'SystemEvents' -C3 .

Length of output: 3791


🏁 Script executed:

#!/bin/bash
# Show context around the transitive Microsoft.Win32.SystemEvents entry
sed -n '200,230p' Flow.Launcher.Core/packages.lock.json

# Show dependencies for each direct PackageReference to identify which pulls in SystemEvents
for pkg in Droplex FSharp.Core Meziantou.Framework.Win32.Jobs Microsoft.IO.RecyclableMemoryStream SemanticVersioning squirrel.windows StreamJsonRpc; do
  echo "=== $pkg ==="
  grep -R -n "\"$pkg\"" -A5 -B2 Flow.Launcher.Core/packages.lock.json
done

Length of output: 5926


Pin Microsoft.Win32.SystemEvents explicitly to 7.0.0.

Add this direct reference in Flow.Launcher.Core/Flow.Launcher.Core.csproj to lock the transitive SystemEvents version instead of downgrading unrelated packages:

   <ItemGroup>
     <PackageReference Include="Droplex" Version="1.7.0" />
     <PackageReference Include="FSharp.Core" Version="9.0.201" />
     <PackageReference Include="Meziantou.Framework.Win32.Jobs" Version="3.4.0" />
     <PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
     <PackageReference Include="SemanticVersioning" Version="3.0.0" />
     <PackageReference Include="squirrel.windows" Version="1.5.2" NoWarn="NU1701" />
     <PackageReference Include="StreamJsonRpc" Version="2.21.10" />
+    <PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
   </ItemGroup>

This makes the intent clear and prevents future transitive bumps (via System.Drawing.Common) from reintroducing the issue.

🤖 Prompt for AI Agents
In Flow.Launcher.Core/Flow.Launcher.Core.csproj around lines 56 to 64, add a
direct PackageReference to Microsoft.Win32.SystemEvents with Version="7.0.0"
inside the existing ItemGroup to pin the transitive SystemEvents version; this
locks the dependency (preventing future transitive bumps via
System.Drawing.Common) and makes the intent explicit—add the reference alongside
the other PackageReference entries in that ItemGroup.


<ItemGroup>
Expand Down
107 changes: 45 additions & 62 deletions Flow.Launcher.Core/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
},
"FSharp.Core": {
"type": "Direct",
"requested": "[9.0.300, )",
"resolved": "9.0.300",
"contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ=="
"requested": "[9.0.201, )",
"resolved": "9.0.201",
"contentHash": "Ozq4T0ISTkqTYJ035XW/JkdDDaXofbykvfyVwkjLSqaDZ/4uNXfpf92cjcMI9lf9CxWqmlWHScViPh/4AvnWcw=="
},
"Meziantou.Framework.Win32.Jobs": {
"type": "Direct",
"requested": "[3.4.3, )",
"resolved": "3.4.3",
"contentHash": "REjInKnQ0OrhjjtSMPQtLtdURctCroB4L8Sd2gjTOYDysklvsdnrStx1tHS7uLv+fSyFF3aazZmo5Ka0v1oz/w=="
"requested": "[3.4.0, )",
"resolved": "3.4.0",
"contentHash": "5GGLckfpwoC1jznInEYfK2INrHyD7K1RtwZJ98kNPKBU6jeu24i4zfgDGHHfb+eK3J+eFPAxo0aYcbUxNXIbNw=="
},
"Microsoft.IO.RecyclableMemoryStream": {
"type": "Direct",
Expand All @@ -48,15 +48,16 @@
},
"StreamJsonRpc": {
"type": "Direct",
"requested": "[2.22.11, )",
"resolved": "2.22.11",
"contentHash": "TQcqBFswLNpdSJANjhxZmIIe0Yl0kGqzjZ+uHLdhrkxntofvNu6C53XPEEYQ3Wkj8AorKumkuv/VMvTH4BHOZw==",
"requested": "[2.21.10, )",
"resolved": "2.21.10",
"contentHash": "wjBlFiaE+npUco9Jj4K11EEZfmAg4poRFYhcCJOiVdiHZ3UxapbGemtLNRcVYGXa/p8nqvZ38TfJPHnlrromDg==",
"dependencies": {
"MessagePack": "2.5.192",
"Microsoft.VisualStudio.Threading.Only": "17.13.61",
"MessagePack": "2.5.187",
"Microsoft.VisualStudio.Threading": "17.10.48",
"Microsoft.VisualStudio.Threading.Analyzers": "17.10.48",
"Microsoft.VisualStudio.Validation": "17.8.8",
"Nerdbank.Streams": "2.12.87",
"Newtonsoft.Json": "13.0.3",
"Nerdbank.Streams": "2.11.74",
"Newtonsoft.Json": "13.0.1",
"System.IO.Pipelines": "8.0.0"
}
},
Expand All @@ -70,8 +71,8 @@
},
"BitFaster.Caching": {
"type": "Transitive",
"resolved": "2.5.4",
"contentHash": "1QroTY1PVCZOSG9FnkkCrmCKk/+bZCgI/YXq376HnYwUDJ4Ho0EaV4YaA/5v5WYLnwIwIO7RZkdWbg9pxIpueQ=="
"resolved": "2.5.3",
"contentHash": "Vo/39qcam5Xe+DbyfH0JZyqPswdOoa7jv4PGtRJ6Wj8AU+aZ+TuJRlJcIe+MQjRTJwliI8k8VSQpN8sEoBIv2g=="
},
"CommunityToolkit.Mvvm": {
"type": "Transitive",
Expand Down Expand Up @@ -114,17 +115,17 @@
},
"MessagePack": {
"type": "Transitive",
"resolved": "2.5.192",
"contentHash": "Jtle5MaFeIFkdXtxQeL9Tu2Y3HsAQGoSntOzrn6Br/jrl6c8QmG22GEioT5HBtZJR0zw0s46OnKU8ei2M3QifA==",
"resolved": "2.5.187",
"contentHash": "uW4j8m4Nc+2Mk5n6arOChavJ9bLjkis0qWASOj2h2OwmfINuzYv+mjCHUymrYhmyyKTu3N+ObtTXAY4uQ7jIhg==",
"dependencies": {
"MessagePack.Annotations": "2.5.192",
"MessagePack.Annotations": "2.5.187",
"Microsoft.NET.StringTools": "17.6.3"
}
},
"MessagePack.Annotations": {
"type": "Transitive",
"resolved": "2.5.192",
"contentHash": "jaJuwcgovWIZ8Zysdyf3b7b34/BrADw4v82GaEZymUhDd3ScMPrYd/cttekeDteJJPXseJxp04yTIcxiVUjTWg=="
"resolved": "2.5.187",
"contentHash": "/IvvMMS8opvlHjEJ/fR2Cal4Co726Kj77Z8KiohFhuHfLHHmb9uUxW5+tSCL4ToKFfkQlrS3HD638mRq83ySqA=="
},
"Microsoft.NET.StringTools": {
"type": "Transitive",
Expand All @@ -133,26 +134,17 @@
},
"Microsoft.VisualStudio.Threading": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "1DrCusT3xNLSlaJg77BsUSAzrhjdZBAvvsS0PMzyPM+fGais6SnISOhqdZQop8VVMIBLsYm2gyF9W7THjgavwA==",
"resolved": "17.12.19",
"contentHash": "eLiGMkMYyaSguqHs3lsrFxy3tAWSLuPEL2pIWRcADMDVAs2xqm3dr1d9QYjiEusTgiClF9KD6OB2NdZP72Oy0Q==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Analyzers": "17.14.15",
"Microsoft.VisualStudio.Threading.Only": "17.14.15",
"Microsoft.VisualStudio.Threading.Analyzers": "17.12.19",
"Microsoft.VisualStudio.Validation": "17.8.8"
}
},
"Microsoft.VisualStudio.Threading.Analyzers": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "mXQPJsbuUD2ydq4/ffd8h8tSOFCXec+2xJOVNCvXjuMOq/+5EKHq3D2m2MC2+nUaXeFMSt66VS/J4HdKBixgcw=="
},
"Microsoft.VisualStudio.Threading.Only": {
"type": "Transitive",
"resolved": "17.14.15",
"contentHash": "NqONyw1RXyj9P3k5e1uU2k9kc1ptwuU5NJQzG+MPq7vQVHUzBY8HLuJf/N2Rw5H/myD96CVxziDxmjawPuzntw==",
"dependencies": {
"Microsoft.VisualStudio.Validation": "17.8.8"
}
"resolved": "17.12.19",
"contentHash": "v3IYeedjoktvZ+GqYmLudxZJngmf/YWIxNT2Uy6QMMN19cvw+nkWoip1Gr1RtnFkUo1MPUVMis4C8Kj8d8DpSQ=="
},
"Microsoft.VisualStudio.Validation": {
"type": "Transitive",
Expand All @@ -161,54 +153,46 @@
},
"Microsoft.Win32.SystemEvents": {
"type": "Transitive",
"resolved": "9.0.7",
"contentHash": "lFGY2aGgmMREPJEfOmZcA6v0CLjWVpcfNHRgqYMoSQhy80+GxhYqdW5xe+DCLrVqE1M7/0RpOkIo49/KH/cd/A=="
"resolved": "7.0.0",
"contentHash": "2nXPrhdAyAzir0gLl8Yy8S5Mnm/uBSQQA7jEsILOS1MTyS7DbmV1NgViMtvV1sfCD1ebITpNwb1NIinKeJgUVQ=="
Comment on lines +165 to +166
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Also pin SystemEvents in Core or centrally.

SystemEvents 7.0.0 is transitive; add a direct PackageReference in Flow.Launcher.Core.csproj or centralize via Directory.Packages.props to keep versions uniform.

🤖 Prompt for AI Agents
Flow.Launcher.Core/packages.lock.json lines 165-166: SystemEvents is only pulled
transitively at 7.0.0—add a direct pin so the version stays explicit; either add
a PackageReference Include="SystemEvents" Version="7.0.0" to
Flow.Launcher.Core.csproj, or add a central entry in Directory.Packages.props
(e.g., <PackageVersion Include="SystemEvents" Version="7.0.0" />) and ensure the
project references it, then run dotnet restore/update lock file to commit the
pinned version.

},
Comment on lines 163 to 167
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

SystemEvents fixed at 7.0.0 (transitive).

Good for the immediate bug, but pin directly in csproj to avoid accidental bumps via unrelated package updates.

🤖 Prompt for AI Agents
In Flow.Launcher.Core/packages.lock.json around lines 154 to 158,
Microsoft.Win32.SystemEvents is pinned transitively to 7.0.0 but not declared
directly in the project; add a direct PackageReference for
Microsoft.Win32.SystemEvents with Version="7.0.0" to the appropriate .csproj (or
Directory.Build.props) to lock the version explicitly, include
PrivateAssets="All" if you want it to be non-transitive for consumers, save the
file and run dotnet restore to ensure the lockfile reflects the direct pin.

"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.9.6.1",
"contentHash": "yMsurNaOxxKIjyW9pEB+tRrR1S3DFnN1+iBgKvYvXG8kW0Y6yknJeMAe/tl3+P78/2C6304TgF7aVqpqXgEQ9Q=="
},
"Nerdbank.Streams": {

Check warning on line 164 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`Nerdbank` is not a recognized word. (unrecognized-spelling)
"type": "Transitive",
"resolved": "2.12.87",
"contentHash": "oDKOeKZ865I5X8qmU3IXMyrAnssYEiYWTobPGdrqubN3RtTzEHIv+D6fwhdcfrdhPJzHjCkK/ORztR/IsnmA6g==",
"resolved": "2.11.74",
"contentHash": "r4G7uHHfoo8LCilPOdtf2C+Q5ymHOAXtciT4ZtB2xRlAvv4gPkWBYNAijFblStv3+uidp81j5DP11jMZl4BfJw==",
"dependencies": {
"Microsoft.VisualStudio.Threading.Only": "17.13.61",
"Microsoft.VisualStudio.Threading": "17.10.48",
"Microsoft.VisualStudio.Validation": "17.8.8",
"System.IO.Pipelines": "8.0.0"
}
},
"Newtonsoft.Json": {

Check warning on line 174 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`Newtonsoft` is not a recognized word. (unrecognized-spelling)
"type": "Transitive",
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
"resolved": "13.0.1",
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
},
"NHotkey": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "IEghs0QqWsQYH0uUmvIl0Ye6RaebWRh38eB6ToOkDnQucTYRGFOgtig0gSxlwCszTilYFz3n1ZuY762x+kDR3A=="
},
"NHotkey.Wpf": {

Check warning on line 184 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`NHotkey` is not a recognized word. (unrecognized-spelling)
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "BIUKlhTG5KtFf9OQzWvkmVmktt5/FFj6AOEgag8Uf0R2YdZt5ajUzs3sVskcJcT2TztWlEHKQr1jFj3KQ0D9Nw==",
"dependencies": {
"NHotkey": "3.0.0"

Check warning on line 189 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`NHotkey` is not a recognized word. (unrecognized-spelling)
}
},
"NLog": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "qDWiqy8/xdpZKtHna/645KbalwP86N2NFJEzfqhcv+Si4V2iNaEfR/dCneuF/4+Dcwl3f7jHMXj3ndWYftV3Ug=="
},
"NLog.OutputDebugString": {
"type": "Transitive",
"resolved": "6.0.1",
"contentHash": "wwJCQLaHVzuRf8TsXB+EEdrzVvE3dnzCSMQMDgwkw3AXp8VSp3JSVF/Q/H0oEqggKgKhPs13hh3a7svyQr4s3A==",
"dependencies": {
"NLog": "6.0.1"
}
"resolved": "4.7.10",
"contentHash": "rcegW7kYOCjl7wX0SzsqpPBqnJ51JKi1WkYb6QBVX0Wc5IgH19Pv4t/co+T0s06OS0Ne44xgkY/mHg0PdrmJow=="
},
"SharpVectors.Wpf": {
"type": "Transitive",
Expand All @@ -222,10 +206,10 @@
},
"System.Drawing.Common": {
"type": "Transitive",
"resolved": "9.0.7",
"contentHash": "1k/Pk7hcM3vP2tfIRRS2ECCCN7ya+hvocsM1JMc4ZDCU6qw7yOuUmqmCDfgXZ4Q4FS6jass2EAai5ByKodDi0g==",
"resolved": "7.0.0",
"contentHash": "KIX+oBU38pxkKPxvLcLfIkOV5Ien8ReN78wro7OF5/erwcmortzeFx+iBswlh2Vz6gVne0khocQudGwaO1Ey6A==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "9.0.7"
"Microsoft.Win32.SystemEvents": "7.0.0"
}
},
"System.IO.Pipelines": {
Expand All @@ -240,8 +224,8 @@
},
"ToolGood.Words.Pinyin": {
"type": "Transitive",
"resolved": "3.1.0.3",
"contentHash": "VKcf8sUq/+LyY99WgLhOu7Q32ROEyR30/2xCCj9ADRi45wVC7kpXrYCf9vH1qirkmrIfpL8inoxAbrqAlfXxsQ=="
"resolved": "3.0.1.4",
"contentHash": "uQo97618y9yzLDxrnehPN+/tuiOlk5BqieEdwctHZOAS9miMXnHKgMFYVw8CSGXRglyTYXlrW7qtUlU7Fje5Ew=="
},
"YamlDotNet": {
"type": "Transitive",
Expand All @@ -251,19 +235,18 @@
"flow.launcher.infrastructure": {
"type": "Project",
"dependencies": {
"Ben.Demystifier": "[0.4.1, )",

Check warning on line 238 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`Demystifier` is not a recognized word. (unrecognized-spelling)
"BitFaster.Caching": "[2.5.4, )",
"BitFaster.Caching": "[2.5.3, )",
"CommunityToolkit.Mvvm": "[8.4.0, )",
"Flow.Launcher.Plugin": "[4.7.0, )",
"InputSimulator": "[1.0.4, )",
"MemoryPack": "[1.21.4, )",
"Microsoft.VisualStudio.Threading": "[17.14.15, )",
"Microsoft.VisualStudio.Threading": "[17.12.19, )",
"NHotkey.Wpf": "[3.0.0, )",

Check warning on line 245 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`NHotkey` is not a recognized word. (unrecognized-spelling)
"NLog": "[6.0.1, )",
"NLog.OutputDebugString": "[6.0.1, )",
"NLog": "[4.7.10, )",

Check warning on line 246 in Flow.Launcher.Core/packages.lock.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`NLog` is not a recognized word. (unrecognized-spelling)
"SharpVectors.Wpf": "[1.8.4.2, )",
"System.Drawing.Common": "[9.0.7, )",
"ToolGood.Words.Pinyin": "[3.1.0.3, )"
"System.Drawing.Common": "[7.0.0, )",
"ToolGood.Words.Pinyin": "[3.0.1.4, )"
}
},
"flow.launcher.plugin": {
Expand Down
15 changes: 7 additions & 8 deletions Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,27 @@

<ItemGroup>
<PackageReference Include="Ben.Demystifier" Version="0.4.1" />
<PackageReference Include="BitFaster.Caching" Version="2.5.4" />
<PackageReference Include="BitFaster.Caching" Version="2.5.3" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Fody" Version="6.9.2">
<PackageReference Include="Fody" Version="6.5.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="InputSimulator" Version="1.0.4" />
<PackageReference Include="MemoryPack" Version="1.21.4" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.14.15" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
<PackageReference Include="NLog" Version="6.0.1" />
<PackageReference Include="NLog.OutputDebugString" Version="6.0.1" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0">
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="SharpVectors.Wpf" Version="1.8.4.2" />
<PackageReference Include="System.Drawing.Common" Version="9.0.7" />
<PackageReference Include="ToolGood.Words.Pinyin" Version="3.1.0.3" />
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
<PackageReference Include="ToolGood.Words.Pinyin" Version="3.0.1.4" />
</ItemGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Guard against runtime/config breaks from NLog and SystemEvents changes.

  • NLog 4.7.10 is a major downgrade; ensure no 5.x APIs/targets (e.g., OutputDebugString target) are referenced in code or NLog configs.
  • Add an explicit pin for Microsoft.Win32.SystemEvents to stabilize the fix across future transitive changes.

Apply:

   <ItemGroup>
     <PackageReference Include="Ben.Demystifier" Version="0.4.1" />
     <PackageReference Include="BitFaster.Caching" Version="2.5.3" />
     <PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
     <PackageReference Include="Fody" Version="6.5.5">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
     <PackageReference Include="InputSimulator" Version="1.0.4" />
     <PackageReference Include="MemoryPack" Version="1.21.4" />
     <PackageReference Include="Microsoft.VisualStudio.Threading" Version="17.12.19" />
     <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
       <PrivateAssets>all</PrivateAssets>
       <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
     </PackageReference>
     <PackageReference Include="NHotkey.Wpf" Version="3.0.0" />
     <PackageReference Include="NLog" Version="4.7.10" />
     <PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
       <PrivateAssets>all</PrivateAssets>
     </PackageReference>
     <PackageReference Include="SharpVectors.Wpf" Version="1.8.4.2" />
     <PackageReference Include="System.Drawing.Common" Version="7.0.0" />
     <PackageReference Include="ToolGood.Words.Pinyin" Version="3.0.1.4" />
+    <PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
   </ItemGroup>

To verify NLog/config, search for removed targets/usages:


🏁 Script executed:

#!/bin/bash
rg -n -i -C2 'OutputDebugString|NLog\.Target.*OutputDebugString|WriteToDebug|UseNLog5' --type-add 'xml:*.config' --type xml --type cs

Length of output: 547


🏁 Script executed:

#!/bin/bash
rg -n -C2 'SystemEvents' --type cs
rg -n -C2 'using Microsoft.Win32' --type cs

Length of output: 4982


Pin or restore the OutputDebugStringTarget in NLog
Log.cs line 43 instantiates OutputDebugStringTarget, which isn’t provided by NLog 4.7.10 and will throw at runtime. Either upgrade the NLog reference to ≥5.x or add the appropriate target package (e.g. NLog.Targets.Debugger) to your csproj.

🤖 Prompt for AI Agents
Flow.Launcher.Infrastructure/Flow.Launcher.Infrastructure.csproj lines 55-78:
the project references NLog 4.7.10 but Log.cs constructs OutputDebugStringTarget
which is not included in that NLog version and will throw at runtime; fix by
either updating the NLog PackageReference to a 5.x version that includes
OutputDebugStringTarget (bump Version to >=5.0.0) or add the appropriate targets
package by adding a PackageReference for NLog.Targets.Debugger (choose a
compatible version) to this ItemGroup so the OutputDebugStringTarget type is
available.


</Project>
Loading
Loading