Closed jmrog closed 6 years ago
Note this bit from the API documentation:
The workspace offers support for listening to fs events and for finding files. Both perform well and run outside the editor-process so that they should be always used instead of nodejs-equivalents.
Marking as a bug due to the final clause there.
Actually, there appears to be no method provided in the VS Code extensions API to refresh an open file. See the issue here: https://github.com/Microsoft/vscode/issues/7532
Removing "bug" label for this reason.
It also appears to turn out that the editor is supposed to refresh (after a small delay) in response to filesystem changes. Apparently there are a few cases where it does not, and these are bugs. A few such cases are mentioned here: https://github.com/Microsoft/vscode/issues/22266
Marking as blocked for now; will revisit later.
Closing due to the fact that Microsoft/vscode#22266 is now closed. The update should now happen automatically.
Right now, the extension writes to the
.csproj
file and, if it is currently open in the editor, leaves it to the editor itself to refresh and reflect the changes. This seems to happen sometimes, but not other times (sometimes the editor does not reflect the file changes). It is probably more correct, and also more reliable, to use some aspect of the vscodeworkspace
API to either apply edits or insure that the editor refreshes.