foreach (string f in fileName) { if (list.Where(p => p.FileName.Trim().Equals(f.Trim(), StringComparison.OrdinalIgnoreCase)).Count() == 0) { Serve
This is because your loop keeps adding the same object over and over, so your list ends up with multiple references to the same object.
Add projectfile = new ProjectFile() to the top of your loop to fix this problem.
projectfile = new ProjectFile()