Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Automatically Rename Dependent Files

$
0
0

So,

I've got the extensibility to now Create the items from a template as I desire, and I even have an editor for when i double click on the item.

The primary item is a dmxml file that contains meta-data used to generate the Designer.cs file.  I also include a one-time generated .cs file filled with the partial classes for user modified code elements.  Overrides from base classes, implementing other interfaces, you name it.

I discovered however that when I rename the .dmxml file, the .cs and .Designer.cs files do not rename as well.  This normally wouldn't be a problem but as dependent files i cannot manually rename them in solution explorer, so I'd have to rename them in explorer and edit the csproj file, or remove/add the renamed files.

How can i fix this?

csproj xml:

<Compile Include="Classes\ExcelSubscriber.cs"><DependentUpon>ExcelSubscriber.dmxml</DependentUpon></Compile><Compile Include="Classes\ExcelSubscriber.Designer.cs"><DependentUpon>ExcelSubscriber.dmxml</DependentUpon></Compile><None Include="Classes\ExcelSubscriber.dmxml"><SubType>Designer</SubType></None>

Solution View:

Thanks

Jaeden "Sifo Dyas" al'Raec Ruiner


"Never Trust a computer. Your brain is smarter than any micro-chip."
PS - Don't mark answers on other people's questions. There are such things as Vacations and Holidays which may reduce timely activity, and until the person asking the question can test your answer, it is not correct just because you think it is. Marking it correct for them often stops other people from even reading the question and possibly providing the real "correct" answer.




Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>