Hi Jack,
I'm not sure about the CodeDom and VBCodeProvider, but using the
extensibility model of Visual Studio you can create either:
- A macro
- An add-in
- A Visual Studio package (VSIP / VS 2005 SDK).
The extensibility model offers ProjectItem.FileCodeModel, which in turn
offers FileCodeModel.CodeElements, etc. See for example my article:
HOWTO: Navigate the code elements of a file from a Visual Studio .NET macro
or add-in
http://www.mztools.com/articles/2006/MZ008.htm
You have lots of resources to get you started on my web site ("For add-in
developers").
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
"jack" <ja*************@lycos.com> escribió en el mensaje
news:11*********************@z14g2000cwz.googlegro ups.com...
Trying to make a utility that
- Reads a VB.Net source file
- Parses it into it's constuent parts
- Evaluates and modifies as required
- Saves the source
I thought that the CodeDom and the VBCodeProvider would be the way to
go.
I can gen code and compile it, but I can not figure out how to parse a
VB.Net file into a CodeCompileUnit. (Neither CreateParser or Parse
seems to work)
How to I read a VB.Net source file into theee code dom so that I can
progaramatically inspect it.
Am I going down the wrong path?
Jack Stephenson