/**
* If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified). A sourceReference is only valid for a session, so it must not be used to persist a source. The value should be less than or equal to 2147483647 (2^31 - 1).
*/
sourceReference?: number;
However, if source.sourceReference > 0 and the source.name contains a ., no SourceRequest is made, and you are presented with the Find File dialog. If the dot is replaced with an underscore, the IDE makes the SourceRequest and the file is shown.
This is especially troublesome as VSCode (and probably VS) will use the file extension to know how to syntax highlight the source.
According to the specification of
Source.sourceReference
aSourceRequest
must be made if the source has asourceReference > 0
:However, if
source.sourceReference > 0
and thesource.name
contains a.
, noSourceRequest
is made, and you are presented with the Find File dialog. If the dot is replaced with an underscore, the IDE makes theSourceRequest
and the file is shown.This is especially troublesome as VSCode (and probably VS) will use the file extension to know how to syntax highlight the source.