Rename file in Solution Explorer does not work

.971 Java

If I rename a .pas file in the Solution Explorer, I get below error. Notice this is the NEW name.

Microsoft Visual Studio

Could not find file ‘Z:\Mobile\nl.edb.tabellenapp\nl.edb.tabellenapp\MainActivityFragment.pas’.

OK

After reloading the project (saving changes) the old name is back again…

Thanks, logged as bugs://53278 for review
Posted by Bugs for Mac

Yeah, I’ve been seeing that one too. Forgot to report it though… :-S

Does this still persist in the current beta?

Hi Brian,
I can confirm that, sometimes, we have it in the .975 .NET version.
Also, color coding is not always correct after renaming a file!
Patrick

What I noticed yesterday the renaming did seem to work, but the old file was still there. That got me into problems later.

does either of you have more complete steps or data points towards when you see this happening and when you don’t? i gather from your posts that it doesn’t happen for every single rename, correct? is there something special about the file? or about the circumstances when you rename it?

Marc,

  1. Create a new Class Library project.

  2. Rename the file Class1.pas to MyClass.pas.

  3. In the public interface of Class1, add a constructor:

constructor;
  1. Right-click and Complete Class: does not work :frowning:

  2. Save and close the file.

  3. Reopen it.

  4. Right-click and Complete Class: works :slight_smile:

  5. Rename MyClass.pas to Class1.pas.

  6. Go just before the constructor declaration and press Enter: color coding is wrong :frowning:

Patrick

Patrick — thanx for the steps, we’ll try and repro, but: the description doesn’t match the original report, which supposedly gets an error message on renaming? i take it you dont see that error dialog?

Patrick - I just logged those steps as 53732. Thanx again for the steps.

Thanx for the reports, all… finally nailed this one down. It’ll be in an update in the near future.

this fix should be in .991, out now

Hello,
still doesn’t work in .991.

Simple test case:

  1. Create a new Class Library Project.
  2. Close the Class1.pas that is automatically open.
  3. Rename the Class1.pas file in the solution explorer: error Could not find file.

Step 2 is important: if the file is open I can rename it, otherwise not.

Patrick

this was closed as “cannot reproduce” before, but i’ll reopen it a last time…

Hello,
it seems to be OK now, with version .1011.
Patrick

glad to hear it! i too saw this again last week and re-logged; i saw it had been worked on but hand;t had a chance to retest yet. this one seemed to be the gift that kept on giving.