I don't know how Intellisense works with Visual Studio, but I know in fine detail how a project works and can say for sure:
parsing of the project will not provide any essential help. The project only contains a structure of the projects: basically, source files, dependencies and methods of processing of the source files (more than that, in fact but I listed all that matters). Accessing of all the types and all their members, all the meta-data is pretty easy with Reflection. There is only one problem: Intellisense shows even the methods (parameters, etc) of the code which fails to compile!
If not that feature, Reflection-based implementation would be easy. The project could be pre-build in memory (it is important to do it in a separate
AppDomain
, otherwise it would cause tremendous memory leak, because otherwise a compiled assembly could not be removed) and the meta-data obtained. As to the project that fails to build… Theoretically, this is not impossible, but certainly there is no
easy way to accomplish this.
You could learn how Intellisense is implemented in Open Source SharpDevelop:
http://www.icsharpcode.net/OpenSource/SD/Default.aspx[
^], but this is not the same.
All the aspect of dealing with projects and building them are covered in name space
Microsoft.Build
:
http://msdn.microsoft.com/en-us/library/gg145008.aspx[
^]. This is quite a big topic, including several Microsoft assemblies. To learn developing Visual Studio Extensions one can start here:
http://msdn.microsoft.com/en-us/library/dd885119.aspx[
^].
Sorry I cannot provide complete answer. I just think that this information and considerations are better then nothing. At least it may help you to avoid wasting your valuable time along some of the wrong lines.
—SA