This log tracks technical hurdles, mistakes, and their subsequent fixes to prevent regressions and repeated errors during development. Always reference this log before making major architectural changes.
- Mistake: Initially implemented the Shell Extension using .NET 8. While .NET 8 supports COM hosting via
comhost.dll, the version of SharpShell (2.7.2) and the Windows Shell itself are far more stable when targeting the native .NET Framework.ServerManager.exefailed to recognize the .NET 8 assemblies as valid SharpShell servers. - Fix: Ported the entire solution (App, Engine, and Shell Extension) to .NET Framework 4.8.
- Intent: Achieve 100% compatibility with
regasm.exe, SharpShell tools, and ensure maximum stability within theexplorer.exeprocess.
- Mistake: Targeting
net48in SDK-style projects defaults to C# 7.3, which caused build failures because the code used modern features likeNullableandImplicitUsings. - Fix: Explicitly added
<LangVersion>latest</LangVersion>to all.csprojfiles. - Intent: Retain modern C# syntax and safety features while targeting the legacy .NET Framework.
- Mistake: Used
\"to escape paths in the[Run]section ofMetadataEditor.iss. Inno Setup does not recognize backslash escaping for parameters; it requires double-double quotes (""`). - Fix: Updated all
regasm.execalls to use""for file paths. - Intent: Ensure the installer can handle installation paths that contain spaces.
- Mistake: Used
Excludein the[Files]section to skip architecture folders. - Fix: Corrected the parameter name to
Excludes(plural). - Intent: Resolve installer compilation errors.
- Mistake: Omitted
[DisplayName]and[RegistrationName]attributes in theIconPropertySheetExtensionclass. - Fix: Added both attributes to
PropertySheetExtension.cs. - Intent: Improve discovery and professional labeling within the SharpShell Server Manager and Windows Registry.
- Mistake: Pointed to
ICON_FOR_METADATA_EDITOR.icoin the project folder, but the file was actually in the solution root. - Fix: Updated the relative path in
METADATA_EDITOR_APP.csprojto..\ICON_FOR_METADATA_EDITOR.ico. - Intent: Resolve build failure.
- Mistake: The installer was overwriting files but not cleaning the directory, leading to potential conflicts with older
.deps.jsonor.pdbfiles. - Fix: Added
[InstallDelete]to wipe the{app}directory and implemented aCurStepChangedprocedure in[Code]to unregister the old DLLs before the new ones are installed. - Intent: Guarantee a "Clean Reinstall" state for every update.