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

Item templates - $classname$ versus $safeitemname$

$
0
0

Since moving to VS2010, some of our item templates have broken.

We have a few item templates that create several classes in various sub-folders.  We used the $classname$ parameter to prefix each class with the item name.  $classname$ is no longer being replaced, so I tried using $safeitemname$ instead.  However it seems that $safeitemname$ does not perform according to the documentation - it is replaced with the filename that is added rather than the item name that was provided in the "new item" dialog.

For example, we get classes called CellDataViewRequestViewRequest instead of CellDataViewRequest - where "CellData" was the new item name, the item template contains $safeitemname$ViewRequest and the file containing the class template is named ViewRequest.cs.  Likewise, $rootnamespace$.Client.DataViews.$safeitemname$ comes out as "Logic.Client.DataViews.CellDataRequest" rather than "...CellData" as expected.

Any explanations?


Viewing all articles
Browse latest Browse all 4410

Trending Articles



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