Transforming MVC3 .cshtml files

May 26, 2012 at 4:40 PM

I created a new package and needed to add some code to the _Layout.cshtml file and the _ViewStart.cshtml files. I proceeded to create the files with the same names but with .pp extension (.transform is only for web.config as I understand, the site does not clarify).

I noticed upon deploying the package that none of these transformations were performed. Then I also read in STackOverflows that the .pp are meant for new files???

 

Coordinator
Aug 3, 2012 at 7:02 PM

You're correct. .pp is meant for new file only.

There is currently no support in nugget to add code to non-XML file.