Skip to content

Code Quality: Improve the way packages are managed in the codebase #16430

@Lamparter

Description

@Lamparter

Description

Currently, local NuGet Packages, Link Libraries and Windows Metadata files are managed in a very messy way:

  • They are stored in src/Files.App/nupkgs which is not a PascalCase folder like others

Preferably, they should be stored in a place like pkgs/* or src/Packages/* etc.

  • App extension files (link libraries) are stored in the root src/Files.App directory.

src/Files.App/*.dll

This is a bad idea as it clutters the codebase when they could more neatly be organised in the same directory as the NuGet package store, or inside another folder altogether.

  • The NuGet Gallery server entry is duplicated in the NuGet package manager

NuGet packages for Solution...

This is because the NuGet Gallery endpoint is also listed inside Files's nuget.config file which it should not as this entry is already provided automatically by Visual Studio.

Concerned code

  • <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
  • <add key="Local Packages" value="src/Files.App/nupkgs/" />
  • src/Files.App/*.dll
  • src/Files.App/nupkgs/

Gains

  • Better codebase structure
  • Less confusion when choosing a package source
  • Central store for NuGet Packages, Link Libraries and Windows Metadata files

Requirements

This should be removed.

-         <add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />

This should be changed to a different pattern that matches with the rest of the codebase.

-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="src/Files.App/Packages" />
-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="src/Packages" />
-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="nupkgs" />
-         <add key="Local Packages" value="src/Files.App/nupkgs" />
+         <add key="Local Packages" value="pkgs" />

The dll files should also be migrated to the same or a similar store.

Comments

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions