This short guide describes how to create a Work Breakdown Structure (WBS) using C#. It shares details about IDE configuration, a list of steps, and sample code to add and access the WBS using C#. You will also receive additional information to customize the resulting WBS code while working with tasks in a project.
Passaggi per creare una Work Breakdown Structure usando C#
- Set up the environment to use Aspose.Tasks for .NET to create WBS in a project
- Apply the product license to obtain the MPP file format as output.
- Configure a custom WBS code by setting properties such as auto-generation, uniqueness checking, and a defined prefix string.
- Add a numbering mask as a two‑digit ordered number separated by hyphens for each WBS level.
- Crea un’attività con due sotto‑task
- Create another task with a single subtask.
- Recalculate the resulting project to create an updated WBS with each activity according to the configuration indicated above.
- Save the output project and reload it again to read the WBS code of each activity.
I passaggi forniti descrivono il processo per lavorare con la struttura WBS di MS Project usando C#. Apply the license to generate output in MPP format, create and configure a custom WBS code, add a numbering mask, add this definition to the project, and insert some tasks into the sample project file. Also add some sub‑activities under the new activities, recalculate the project to update the WBS codes with the activities, and save the output.
Code to create a WBS using C#
Questo codice dimostra come impostare una struttura di scomposizione del lavoro usando C#. If you don’t want to recalculate the entire project, use RenumberWBSCode() to regenerate the WBS codes, use WBSSequence to vary the codes across different levels, and use Task.WBS o attività.WBSLevel to manually overwrite the automatically generated code.
Questo articolo spiega come lavorare con la struttura di scomposizione del progetto. To convert an MPP file to Excel, refer to the article Convert MPP to Excel using C#.