I work for a source control vendor and I'm currently working on the
"Open From Source Control" functionality. I'd like to allow projects
to load asynchronously as files are retrieved from the repository, but
I have some questions about the API.
IVsProjectFactory2.GetAsynchOpenProjectType() "returns the
asynchronous open type that the project supports" according to the
docs. It looks like I'll get a pointer to something from this
function, but it's not clear what. Can anybody help alleviate my
ignorance here?
Without understanding GetAsynchOpenProjectType I have tried to get
asynchronous loading of a C# windows application project to work,
without success. I'll describe what I did here, in the hopes that
somebody can help. :)
I implemented IVsAsynchOpenFromScc, and the C# windows app project
appears to implement IVsAsynchOpenFromSccProjectEvents. The problem (I
think) is that the project never calls
IVsAsynchOpenFromScc.LoadProject(). I return true for
LoadProjectAsynchronously, and the UI reflects that the project is
loading asynchronously, but then nothing happens. If I go ahead and
start retrieving files and calling the project's
IVsAsynchOpenFromSccProjectEvents.OnFilesDownloaded(), I get
E_UNEXPECTED failures. In fact, anything I call on
IVsAsynchOpenFromSccProjectEvents returns that error code. Does
anybody know how this is supposed to work? Do C# projects just not
support this?
Thanks much.
Ian Olsen
Ian Olsen - 08 Nov 2006 15:11 GMT
> IVsProjectFactory2.GetAsynchOpenProjectType() "returns the
> asynchronous open type that the project supports" according to the
> docs. It looks like I'll get a pointer to something from this
> function, but it's not clear what. Can anybody help alleviate my
> ignorance here?
I'm not sure how I missed this before, but I found
__VSASYNCHOPENPROJECTTYPE, which appears to be what this function
returns.
Ian Olsen - 08 Nov 2006 15:42 GMT
> I'm not sure how I missed this before, but I found
> __VSASYNCHOPENPROJECTTYPE, which appears to be what this function
> returns.
The project I've been testing with (actually a C# library, not a
windows app) returns AOPT_ASYNCHRONOUS. So my confusion about why I
can't call any of the IVsAsynchOpenFromSccProjectEvents methods without
error remains.