We have an IVsQueryEditQuerySave2.QuerySaveFiles
hook that traps attempts to write to source controlled files. If we allow an overwrite, we post a adviseFileChange hook for the files. This hook is used to update internal status once the files have been modified. The scenario
is for adding a new file to a C++ project under a pessimistic source control provider where a semi-optimistic mode is allowed e.g local read only files can be overwritten. In VS2010 QEQS.QuerySaveFiles is called for both the .vcxproj
file and the .vcxproj.filters files. The FileChange hook is set up and is called when the files are actually written. We look for change in time or size ( adding a new file will add it to the .vcxproj.filters file thus changing
its size ). However, in VS2012, the same QEQS.QuerySave hooks are called and we set up the FileChangeEx hooks. The FiilesChanged hook for the .vcxproj.filters file is never called and our internal status is not updated.
Is there any reason for the change in behaviour between VS2010 and vs2012 ?
↧