Hi Peter,
I haven't really looked at your problem in detail, but I saw the
reference to Carlos's article
http://www.mztools.com/Articles/2006/MZ2006017.aspx
and I wanted to send some feedback to Carlos on this article anyway.
I find even Carlos's technique of opening and closing the file before
fetching the FileCodeModel unreliable. I have found a new tip, which I
am currently trying out, in the link:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=\
112636
This involves adding a reference to VsWebSite.Interop.dll and using
the VSWebProjectItem.Load method. I wasn't previously even aware of
the VSWebSite component! Maybe this is of some help to you.
Phil