@GEPlalbihari
Thanks for sharing sample console application.
Your application did not contain any sample files. However, we have tested the scenario in our environment and were unable to notice any issue. We also noticed that you were trying to add attachments in empty PDF (i.e. with no page). Please try to add at least one blank page inside PDF before adding attachment and in case you still face any issue, please let us know.
Attach Files in PDF Document using Aspose.PDF for .NET
Document pdfDocument = new Document();
pdfDocument.Pages.Add();
// Setup new file to be added as attachment
FileSpecification fileSpecification = new FileSpecification(dataDir + "test.xlsx", "Sample xlsx file");
// Add attachment to document's attachment collection
pdfDocument.EmbeddedFiles.Add(fileSpecification);
// Save new output
pdfDocument.Save("AddAttachment_out.pdf");