Stop or Resume an Assignment


translation: true type: docs template: /templates/_template-net.md linktitle: Stop or Resume an Assignment h1: Stop or Resume an Assignment title: Stop or Resume an Assignment | Aspose.Tasks Documentation weight: 80 url: /net/stop-or-resume-an-assignment/ description: Learn how to stop or resume Microsoft Project (MPP/XML) resource assignments programmatically using Aspose.Tasks for .NET. is_root: true lastmod: 2025-10-01

In Microsoft Project, resource assignments can have specific Stop and Resume dates, which define when work on an assignment is paused and when it should continue. Aspose.Tasks for .NET enables developers to programmatically read and update these properties, providing more control over scheduling and automation of project data.

Stop or Resume an Assignment

The Asn class provides the following properties to work with assignment scheduling:

Viewing Stop and Resume Dates in Microsoft Project

To see stop and resume dates manually in Microsoft Project:

  1. Open the Task Usage view.
  2. Select Insert > Column.
  3. Add the Stop and Resume columns.

Reading Stop and Resume Dates using Aspose.Tasks

If an assignment has not been stopped, the Stop and Resume properties will have the value NA.

The following example demonstrates how to read stop and resume dates for resource assignments and display them in the console:

 1Project project = new Project("New Project.mpp");
 2
 3// Print resource assignment's stop and resume dates
 4foreach (ResourceAssignment ra in project.ResourceAssignments)
 5{
 6    if (ra.Get(Asn.Stop).ToShortDateString() == "1/1/2000")
 7        Console.WriteLine("NA");
 8    else
 9        Console.WriteLine(ra.Get(Asn.Stop).ToShortDateString());
10
11    if (ra.Get(Asn.Resume).ToShortDateString() == "1/1/2000")
12        Console.WriteLine("NA");
13    else
14        Console.WriteLine(ra.Get(Asn.Resume).ToShortDateString());
15}

In this example, the code iterates through assignments in the project, retrieves stop and resume dates, and prints them. This allows developers to programmatically check whether tasks have been paused or resumed and take appropriate action in project automation workflows.

FAQ

Q: What is the difference between Stop and Resume dates in an assignment?

Q: How does Aspose.Tasks handle NA values for stop and resume dates?

Q: Can I modify Stop and Resume dates programmatically?

Q: Do I need Microsoft Project installed to work with stop and resume dates?

Conclusion

In this article, we learned how to read and manage Stop and Resume dates for resource assignments using Aspose.Tasks for .NET. By programmatically controlling these properties, developers can automate project scheduling, handle paused tasks, and ensure accurate tracking of work progress in MPP or XML files.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.