Version Used: Visual Studio 2019 16.8 Preview 1
Steps to Reproduce:
class Class1 gets renamed to class Class2 in code.class Class1.Expected Behavior:
I believe Class2 - Copy.cs should also be class Class2 since I made a copy of it after changing the name.
Actual Behavior:
The copied file contains the Class name before the original file was renamed, copied and pasted.
Hope this helps.
I wasn't able to reproduce this in Version 16.8.0 Preview 5.0
@shaggygi I'm going to close, but feel free to reopen if you're still having issues. If this does still happen, can you check that the contents of Class2.cs get updated before your copy?
@ryzngard Thanks for reviewing this, but I'm still seeing in 16.8.0 Preview 5.0. I did however notice I made some bad wording in initial steps. Sorry.
"4. Double click Class2.cs file to see code. The Class name in code is still class Class1."
Should have been the copied file name...
"4. Double click Class2 - Copy.cs file to see code. The Class name in code is still class Class1."
In addition, I also tried an additional step that appears to update to expected results. However, if you don't do step 4 (save before opening), I still see Class1.
@shaggygi is Class2.cs open in the editor when you do this? If possible, could you get a gif recording or use "Submit Feedback" to record the steps?
@ryzngard does this help?

Perfect, I have a repro now. Thanks!
@ryzngard thank you. sorry for the confusion. have a good weekend :)
@davkean @ocallesp From investigation it looks like if the editor window is open, we're not automatically saving the contents after the name change. Since we're copying the on disk contents and not the unsaved changes, Class1 is still showing. This doesn't happen if the editor window for the file is closed. This does happen if the active editor window is not the file being modified, as long as there is an open editor window for the file being renamed.
@ryzngard This has nothing to do with rename. You can repro this just by manually changing the contents of the file. This is a limitation in the project-system's implementation of copy and paste, where it will only copy the on-disk version of the file.
You should not move to saving the file, we should just do better on the project-system side for this.
@davkean Thanks for the explanation. Should we move this to an AzDo bug? Is there already one?
There isn't one.