'Why does VS 'copy full path' of working file sometimes give all lowercase pathname?

Note: This is not a programming or coding issue, just a minor annoyance when using the VS IDE.

While working in Visual Studio, I'd like to grab the full pathname of the current source file I am working on, so naturally I right-click the source file tab and select 'Copy full path'.

This does indeed give me the full pathname of the current source file, but many times, for some particular files, it is returned in all lowercase. For example, the actual file pathname may be:

C:\Projects\Repos\SurveyForm\web\DataLayer\QuestionData.cs

but the right-click gives me:

c:\projects\repos\surveyform\web\datalayer\questiondata.cs

So,

  • Is there a reason for this?
  • Why does this happen only with some files?
  • Is there an option or setting to change this?


Solution 1:[1]

One workaround that worked for me is, closing the file from editor and opening it back from Solution Explorer view. Copying the full path now gives the file path in correct case.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jawahar