From: Rich P on
I need to perform a search for all vb.net/C# projects that were created
in visual studio 2008. Can I use fileInfo for this? How can I specify
Visual Studio 2008 format? I have hundreds (maybe more)*.vbproj/csproj
files that range from VS2003 - VS2005 - VS2008. Is there a way to
search for VS2008 format?

Thanks,

Rich

*** Sent via Developersdex http://www.developersdex.com ***
From: BobF on
Rich P wrote:
> I need to perform a search for all vb.net/C# projects that were created
> in visual studio 2008. Can I use fileInfo for this? How can I specify
> Visual Studio 2008 format? I have hundreds (maybe more)*.vbproj/csproj
> files that range from VS2003 - VS2005 - VS2008. Is there a way to
> search for VS2008 format?
>
> Thanks,
>
> Rich
>
> *** Sent via Developersdex http://www.developersdex.com ***

Write something that searches contents of these files.

For example, c#2008e.csproj files include

<ProductVersion>9.0.30729</ProductVersion>
From: Rich P on
>Write something that searches contents of these files.

>For example, c#2008e.csproj files include

> <ProductVersion>9.0.30729</ProductVersion>

Thanks for the reply. Question: It looks like I will have to open the
file(s) and read/search the contents (and then close the file). Since
the contents appear to be in xml format -- is there any builtin
functionality in VS2008 for reading these files and searching for a
<ProductVersion> tag I could take advantage of? Or should I just
perform a straight forward text search?


Rich

*** Sent via Developersdex http://www.developersdex.com ***
From: Peter Duniho on
Rich P wrote:
>> Write something that searches contents of these files.
>
>> For example, c#2008e.csproj files include
>
>> <ProductVersion>9.0.30729</ProductVersion>
>
> Thanks for the reply. Question: It looks like I will have to open the
> file(s) and read/search the contents (and then close the file). Since
> the contents appear to be in xml format -- is there any builtin
> functionality in VS2008 for reading these files and searching for a
> <ProductVersion> tag I could take advantage of? Or should I just
> perform a straight forward text search?

You can use the classes in the System.Xml or System.Xml.Linq namespaces.
They can be used to read the XML linearly, or to allow access to the
entire XML file in a "document object model".

Pete
 | 
Pages: 1
Prev: Event Handler
Next: Console Application and WPF