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

Renameproject should report errors caused by locked files or folders in a manner understandable by the user #33

Open
nikriaz opened this issue May 24, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@nikriaz
Copy link

nikriaz commented May 24, 2021

Get message "Do you want to continue with the rename operation? [Enter=Yes, any other key=No]" at renameproject. Nothing happens then, PMC got unresponsive, tried to wait few minutes. Need to restart VS to back to be operational. VS 2019, ver. 16.9.6 - latest as of today.

Also, would be really great to have the utility as VS extension instead of package. We really need it :)

@ModernRonin
Copy link
Owner

re getting stuck: I need more info.

However, VS should notice only if files were changed - which is odd because you are saying there is no further output after you press on the prompt.
I would try and have VS closed while running renamer. Or just make sure no instance has the solution or projects within open.

re VS extension: I'm afraid that's too far out-of-scope for me, sorry

@ghhv
Copy link

ghhv commented May 29, 2021

FYI - I can confirm this gets 'stuck' when running from package manager console. Stuck meaning it never does the next step
Analyzing references in your projects - depending on the number of projects this can take a bit... after hitting Enter=yes.
No keys seem to work. You can abort by pressing the X (cancel) in PM console title bar which returns the message The pipeline has been stopped.

I had better progress from Developer Powershell (on Windows) but still failed as in my case it doesn't seem to like relative folders in project references?

UPDATE: my failure was occurring because I had the project folder open in a separate Explorer window which was 'locking' the folder rename.

@nikriaz
Copy link
Author

nikriaz commented Jun 5, 2021

Yes, right. The reason why renamer got stuck is file locking. It was unclear what was keeping them locked. The same applies to the ProjectRenamer itself - I was unable to remove it with uninstall command. Finally accomplished removal by rebooting machine and renamed my project manually.

May be you can add a check if some files are locked and display a warning to a user.

@ModernRonin
Copy link
Owner

Interesting, I never thought of people using the package manager console because I personally use a Windows Terminal configured with PowerShell.Core.

Anyway, @nikriaz proposal to check for locking makes sense and I'll add that when I got a little time.

@ModernRonin ModernRonin self-assigned this Jun 6, 2021
@ModernRonin ModernRonin added the enhancement New feature or request label Jun 6, 2021
@ModernRonin ModernRonin changed the title Get stuck on rename Renameproject should report errors caused by locked files or folders in a manner understandable by the user Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants