Design-time Reflection

I have created several type editors that require design-time reflection in order to accomplish their tasks.  Using methods from the System.Reflection namespace works perfectly until the code is changed thereby modifying the type.  After the code change, I have to rebuild the solution and restart Visual Studio before the reflection is up-to-date again.

I know there must be a way to gether reflection information at design-time (intellisense doesn't require you to rebuild and restart VS before it can be used).  I've downloaded the October VSIP SDK and have been trying to gain access to the VsObjectModel, but I cannot seem to enumerate the libraries. 

Am I going down the correct path trying to use the VsObjectManager, or is there another solution for design-time reflection that would work better


Answer this question

Design-time Reflection

  • eiger

    Have you tried using the code model The code model is an object model around the code constructs within the text buffer.

    Craig

  • kjordan

    I ended up using the ITypeResolutionService service to resolve the loaded types within Visual Studio... kept me from having to restart it constantly. And yes, I did try to use the CodeModel... but having to trace through the tree of CodeElements took too long.
  • Design-time Reflection