You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Something broke down in dnGrep" when launched from a folder's context menu in Win10 #1476
<logevent time="2026-05-14 16:56:37.7761" level="Info" logger="dnGREP.WPF.CommandLineArgs">
<message>Command line arguments: "D:\Tools\search\dnGrep\dnGREP.exe" "D:\work"</message>
</logevent>
<logevent time="2026-05-14 16:56:38.1974" level="Error" logger="dnGREP.WPF.App">
<message>Failure in application startup</message>
<exception>System.IO.FileNotFoundException: Could not find file 'D:\nGREP.ico'.
File name: 'D:\nGREP.ico'
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Drawing.Icon..ctor(String fileName, Int32 width, Int32 height)
at dnGREP.WPF.MainForm..ctor(Boolean isVisible)
at dnGREP.WPF.App.Application_Startup(Object sender, StartupEventArgs e)</exception>
</logevent>
In Process Explorer I see:
Path = D:\Tools\search\dnGrep\dnGREP.exe
Command line = "D:\Tools\search\dnGrep\dnGREP.exe" "D:\work"
Current directory = D:\
The problem seems to be the "Current directory".
Might be solved by Directory.SetCurrentDirectory(Utils.GetCurrentPath()) in early Application_Startup, but not sure of side effects...
I'm guessing this loading the icon for the notification area - everywhere else it's loading the icon from the embedded resource in the dll, but this one is using the file. Do you have the setting 'MinimizeToNotificationArea' set to true? If so, either edit your dnGrep.Setting.dat file to set it false, or use the Options dialog to turn it off (if you can start dnGrep). This will work around the problem until I can get it fixed for the next release.
Activity
doug24 commentedon May 14, 2026
Thanks for the report.
I'm guessing this loading the icon for the notification area - everywhere else it's loading the icon from the embedded resource in the dll, but this one is using the file. Do you have the setting 'MinimizeToNotificationArea' set to true? If so, either edit your dnGrep.Setting.dat file to set it false, or use the Options dialog to turn it off (if you can start dnGrep). This will work around the problem until I can get it fixed for the next release.
DaPa commentedon May 14, 2026
Thanks! MinimizeToNotificationArea=false works!
doug24 commentedon Jun 10, 2026
Fixed in v5.0.9