Either way, I am not sure that there exists an already made solution specific to what you need. Many people have probably implemented something like this in their program before but it had to be written. CSV and XML file formats are both very common and there exists a lot of support for reading and writing of both. I highly recommend using LINQ as it has a lot of great features for dealing with iterating through things such as elements in an XML file or elements in a CSV file.
For this problem I would use a switch statement that reads in the file paths and then calls another method to read the specific file that you have. There is no (at least that I know of) NuGet package that handles all text files etc. and I did do a quick search before I posted this.
var extension = Path.GetExtension(fileName);
switch (extension)
{
case ".xml":
ConvertXmlFile(file);
break;
case ".csv":
ConvertCsvFile(file);
break;
}
Inside each of the two methods in the switch statement you will need to transform the file into the object that you need to continue on in your program. Here are two links that should help and a lot more in depth that what I can do here:
XML: http://www.codeproject.com/Tips/366993/Convert-XML-to-Object-using-LINQ
CSV: Read Csv using LINQ
Finding file extensions: http://msdn.microsoft.com/en-us/library/system.io.path.getextension(v=vs.110).aspx
Hope this helps.