Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Property Sheet (.prop) : how to refactor its filename and not break VS project?

If I rename a property sheet, the text of the property sheet will be changed.
However, the filename of property sheet will not be changed.
How to make the filename change along with the text automatically?

Example

First, I create foo worksheet.
It will be saved as foo.props.

After that, I think foo is not a suitable name, so I rename foo to bar in the project manager :-
(left to right)

enter image description here

However, foo.props-file will still be there, not renamed into bar.props automatically :-

enter image description here

Thus, when I want to add bar to any configuration, my eyes have to search for foo.props in system folder. (Actually, I should search for bar.props.)

This is error-prone.
The inconsistency makes me nervous.

My workaround

Whenever I rename it, I have to delete the old foo.props in Window Explorer manually, then save the bar worksheet as a new bar.props manually.

However, others work-sheet reference in my projects will be broken.

I will have to add bar.props to all related configuration of all related project again, otherwise the project will be invalid (unloadable) : can't find foo.props.

Question

Are there any better workflow? What is it?

like image 941
javaLover Avatar asked Mar 23 '17 11:03

javaLover


1 Answers

Rename it in file explorer. Edit it in Notepad++. Edit the vcxproj files that use it in Notepad++

I've never had a property sheet as part of my solution in solution explorer. I've also never had a solution that was more than 45 projects where find and replace didn't work well in notepad++.

like image 81
Christopher Pisz Avatar answered Sep 28 '22 13:09

Christopher Pisz