Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VCCodeModel for code parsing inside a msbuild task

$
0
0

heya,

i just learned about VCCodeModel. What im trying to achieve is parsing every c++ file in an msbuild custom task to find an user defined keyword, get what kind of code is right after (function declaration, class definition, data declaration, ect...) and get the name of the object as it appears in the source code.

I just read that article http://msdn.microsoft.com/en-us/library/vstudio/ms228770.aspx

My questions are,

is getting a reference to EnvDTE.Solution the only way to access VCCodeModel interfaces?

If so, is there a way to get a reference to the solution inside of a msbuild custom task?

Seems like VCCodeModel is essentially used by intellisense. As we all know intellisense sometimes fail, how relevants are the informations i can get through VCCodeModel? Can i rely on this to do some pre-compiling modifications?

Is there an other way to achieve what i'm trying to do? (ie easily parsing c++ files using vc compiler tools (this way im sure i will get exactly the data the compiler will compile, no preprocessor compatibility problems, ect...))

Let me know if the problem is not clear.



Viewing all articles
Browse latest Browse all 4410


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>