Skip to content

Cleanup and upgrade .net10.0#10

Open
adambarath wants to merge 4 commits into
abatsakidis:masterfrom
adambarath:feature/cleanup
Open

Cleanup and upgrade .net10.0#10
adambarath wants to merge 4 commits into
abatsakidis:masterfrom
adambarath:feature/cleanup

Conversation

@adambarath
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 21, 2026 04:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures the repository under src/, adds standard Visual Studio/.NET project artifacts (solution, designer/resources/settings), and attempts to upgrade the WinForms app to a newer .NET target while updating dependencies.

Changes:

  • Introduces a solution file plus WinForms designer/resources/settings files under src/PDFDeSecure/.
  • Updates the project target framework and bumps the PDFsharp package version.
  • Adds repo-level .gitignore and a more complete .editorconfig, and updates README build instructions.

Reviewed changes

Copilot reviewed 18 out of 73 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/PDFDeSecure/PDFDeSecure.csproj Updates target framework and package reference; adds build/code-style properties.
src/PDFDeSecure/Properties/PublishProfiles/FolderProfile.pubxml Adds a filesystem publish profile (currently pins a TFM).
src/PDFDeSecure/Program.cs Keeps existing batch “auto processing” entrypoint logic; formatting/ordering changes.
src/PDFDeSecure/PDFDeSecure.cs WinForms UI logic retained; designer-backed form code added to repo.
src/PDFDeSecure/PDFDeSecure.Designer.cs Adds WinForms designer-generated layout and control wiring.
src/PDFDeSecure/PDFDeSecure.resx Adds form resource file (icon + designer metadata).
src/PDFDeSecure/Properties/Resources.resx Adds project resources resx (currently only headers).
src/PDFDeSecure/Properties/Resources.Designer.cs Adds strongly-typed resource accessor (auto-generated).
src/PDFDeSecure/Properties/Settings.settings Adds application settings definition file.
src/PDFDeSecure/Properties/Settings.Designer.cs Adds settings wrapper class (auto-generated).
src/PDFDeSecure/app.manifest Adds application manifest (UAC + compatibility).
src/PDFDeSecure/App.config Adds app config (currently contains .NET Framework startup settings).
src/PDFDeSecure.sln Adds a solution file pointing at the PDFDeSecure project and solution items.
src/.editorconfig Adds repo style/analyzer configuration for C# and XML artifacts.
README.md Updates build instructions to use the src/ layout.
.gitignore Adds a comprehensive ignore list for .NET/VS build + user artifacts.
.editorconfig Removes the previous minimal root editorconfig in favor of src/.editorconfig.
Comments suppressed due to low confidence (4)

src/PDFDeSecure/Program.cs:56

  • Building paths via Output + "\\" + fi.Name is error-prone (double slashes, missing slashes) and makes it harder to validate paths. Use Path.Combine(Output, fi.Name) (and similarly for the error log path).
    src/PDFDeSecure/PDFDeSecure.csproj:5
  • TargetFramework is set to net10.0-windows, which is not a currently supported .NET target framework moniker on released SDKs and will fail restore/build in CI. Use a released TFM (e.g., net8.0-windows/net9.0-windows) and align publish profiles accordingly.
    src/PDFDeSecure/Program.cs:59
  • When no PDFs are found (aryFi empty), counter + error is 0 and the percentage calculation divides by zero. Guard this case (e.g., show a separate message when total == 0) before computing the percentage.
    src/PDFDeSecure/Program.cs:51
  • File streams and PdfDocument instances are manually closed/disposed inside the try block, but if an exception occurs after opening the stream, resources may leak (and output streams from OpenWrite() are never disposed). Prefer using statements (or try/finally) for fi.OpenRead(), new FileInfo(...).OpenWrite(), and the PdfDocument instances.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants