Can't save TaskFilter

How to save new TaskFilter to Mpp file? No new filters appear after saving.
I use
project.TaskFilters.Add(filter);
and save
project.Save("TestResult.mpp", new Aspose.Tasks.Saving.MPPSaveOptions() { WriteViewData = true });

@arslansai

Can you please explain the requirements in detail that what you are expecting from API to offer you in your case.

@mudassir.fayyaz
I, through your api, add a new task filter with showinmenu = true to the project and save it to the mpp file. After saving, I open it in msproject and this filter is not there, it has not been saved.

I am excepting saving added filter from api. Question - HOW TO SAVE NEW TASK FILTERS USING API?

Add from API (Added two filters):
image.png (252.5 KB)

Open in msproject (No filters saved):
image.png (28.7 KB)

@arslansai

After observing two images, it seems to be an issue. I request you to please share the source file, generated file and used sample code with us. We will try to investigate that further on our end based on information you shared. I am also assuming that you are already using the latest API version on your end.