Building paclet documentation

Hello,

I am trying to structure my code into a Paclet to include documentation and integrate the functionalities developed in Mathematica.

I have defined a Paclet and placed my code in PacletName/Kernel/PacletName.wl.

I used the Documentation Tools palette to edit the documentation pages for certain functions.

At this point, I am trying to verify that the overall structure is correct by attempting to build the Paclet.

From a notebook located outside the Paclet directory, I execute the following commands:

Needs["PacletTools`"];

$InstallationDirectory = FileNameJoin[{"Path", "to", "the", "directory", "containing", "the", "paclet", "directory"}];

PacletDirectoryLoad[$InstallationDirectory];

PacletDocumentationBuild[First@PacletFind["PacletName"]]

The execution of PacletDocumentationBuild results in the following error messages:

Import::infer: Cannot infer format of file WorkflowDesktopTabSelected.m.

Import::infer: Cannot infer format of file WorkflowDesktopTabUnselected-off.m.

Import::infer: Cannot infer format of file WorkflowDesktopTabUnselected-over.m.

General::stop: Further output of Import::infer will be suppressed during this calculation.

DocumentationBuild`DocumentationBuildNotebooks::error: Reference.nb or Reference-ja.nb is corrupted or missing.

DocumentationBuild`DocumentationBuild::assertfail: ERROR: "ProcessedFiles" key was missing or had unexpected value. Full build result was: $Failed

I must be doing something wrong.

Any assistance would be greatly appreciated.

Thank you in advance for your help.

Regards,
Guillaume