Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renaming linked file results in error dialog #350

Closed
latkin opened this issue Apr 8, 2015 · 3 comments · Fixed by #352
Closed

Renaming linked file results in error dialog #350

latkin opened this issue Apr 8, 2015 · 3 comments · Fixed by #352

Comments

@latkin
Copy link
Contributor

latkin commented Apr 8, 2015

If you have a linked file in an F# project, you can attempt to rename the file in solution explorer:

image

However you get an error dialog when you try it:

image

FWIW C# prohibits rename on linked files entirely. This seems reasonable, as it's not clear what "renaming" even means with respect to linked files (change the name of the link? or the file itself?). So IMO fix would be to just mark this field a read-only.

image

@latkin latkin added the Bug label Apr 8, 2015
@enricosada
Copy link
Contributor

Linked file are used more in f# than c#. We can help:

  • rename the physical file if file name = label
  • If different we rename the link label only

I know is more work but not too much.
But maybe two different behavior are too confusing.

Another approach, easier:

Rename label and show a dialog asking to rename the physical file too

@latkin
Copy link
Contributor Author

latkin commented Apr 8, 2015

I think disabling the broken rename scenario is the cheap and correct thing to do for now (i.e. for VS 2015 if someone sends a PR).

Personally I don't see this particular issue as worth spending time building out as a feature... It opens up a lot of corner cases and behaviors that need to be tested and supported for all eternity, for fairly small value. There are more useful and impactful ways to contribute to the VS tools :-)

@enricosada
Copy link
Contributor

readonly is also the current behaviour (F2 or double click) for linked items

@latkin latkin added the fixed label Apr 11, 2015
@latkin latkin closed this as completed Apr 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants