Last post Mar 07, 2017 08:19 AM by krishn451
Mar 02, 2017 06:49 AM|krishn451|LINK
I have a requirement that I have solution with some projects. I have new project and want to read that solution .sln file and have to modify the .sln file.
How to do programatically using c#?
thanks in advance
Mar 02, 2017 07:55 AM|kaushalparik27|LINK
You can read just like we read a Text file with System.IO.File as:
//-- this will give you list of lines of .sln file
List<string> slnLines = System.IO.File.ReadAllLines(@"C:\visual studio 2015\Projects\WebApps\WebApps.sln").ToList();
//-- this will give you all texts of .sln file
string slnText = System.IO.File.ReadAllText(@"C:\visual studio 2015\Projects\WebApps\WebApps.sln");
Mar 07, 2017 08:19 AM|krishn451|LINK
Thanks for ur reply. As per you suggestion i can able to read .sln