I need to create three temporary XML files for debugging purposes. I'm using a TempFileCollection as it fits the bill, but apparently the
AddExtension method doesn't actually return unique file names.
According to the MSDN:
This method can be called only once for each file name extension, because it will return the same name if it is called with the same extension.
Apparently I just have to add my own files anyway using the
AddFile method. What's the use of this method then? To work around it I'm just using
var filename = Guid.NewGuid().ToString + ".xml" collection.AddFile(filename, false);