Click here to Skip to main content
12,352,294 members (61,534 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
I want to read solution file for my project, let me know the mechanism other than solution parser.
Posted 5-Nov-12 23:15pm
Comments
n.podbielski 6-Nov-12 5:22am
   
And for what you need that?
manoj629 6-Nov-12 5:30am
   
I need to get project name and version fron solution file
Ankur\m/ 6-Nov-12 5:23am
   
I Googled for 'Solution Parser' and this was the first result - http://stackoverflow.com/questions/2192545/visual-studio-solution-parser.
Might help!

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

SLN files are text files, you can get the version of the solution file by reading the first line :
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "consoletest", "consoletest\consoletest.csproj", "{6BADD8B3-618E-412A-BBCA-8420EFD5B62E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fastJSON", "fastJSON\fastJSON.csproj", "{207E91B1-C9F8-4913-88E1-3549EF5F3273}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{F4BFF0D2-45F6-413B-B1E7-BC4A0D6596FC}"
EndProject
...
The project names are there also as you can see from the above.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 6 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100