When adding an analyzer, warn if an older version of the assembly has already been loaded.
If an analyzer assembly changes on disk after it has been loaded in VS we put a warning in the Error List letting the user know that they will need to restart VS to use the new version. We do not, however, warn the user in the situation where they add an analyzer to a project but an older version of that file has already been loaded. This change updates the AnalyzerFileWatcherService to record the creation/modification time when it sees an analyzer assembly being loaded. Later, when an analyzer is added to a project we check if the current creation/modification time of the file matches the recorded time; if it does not, the file does not currently match what was loaded and we need to raise the warning. We also now tell the AnalyzerFileWatcherService when an analyzer is removed so that the corresponding warnings can be removed from the Error List. (changeset 1410175)
Showing
想要评论请 注册 或 登录