Simon Ellis

Hi, I've been looking at web site project templates recently. I've run into an issue when trying to create a master page template for my language. When adding a file with a codefile the web project system does not show the code file as a nested project item. For example, with C#, you might have Site.Master and Site.Master.cs. The .cs file shows correctly as a nested file. With a language extension of anything other than this (I didn't try VB but assumed that would work), the code file is listed as a normal project item. The web project system looks like it's restricting the extension to one of the Microsoft languages. As an experiment I tried the IronPython sample too and interestingly that didn't work either - but I noticed that the IronPython master page template initially doesn't use a code file. A simple rename of the extension to .cs will work on a project load (regardless of the fact that it won't compile). It's strange that this issue occurs considering that it's extremely similiar to web forms (e.g. default.aspx and default.aspx.cs etc) but this works as expected.

Is this a bug in the web project system and is there a way round it

Thanks,



Re: Visual Studio Extensibility Web projects and master pages.

Dmitry Pavlov

Hi Simon,

Not sure but that might be helpful to read about standard templates structure:






Re: Visual Studio Extensibility Web projects and master pages.

Simon Ellis

Hi Dmitry, yes I've been through a lot of the documentation although it's possible I missed something. That's why I've posted here; I was hoping for one of the Microsoft guys to give a yes/no answer to whether this should be possible. Unfortunately, the IronPython sample which is what I'd normally look to for the answer seems to have steered clear of supporting master pages with a code beside file.

Regards,