Currently we have a bunch of web sites (web site projects) that I think should be converted to web application projects. Everybody agrees.
But a number of custom BuildProviders are used to generate controls and u开发者_运维技巧nfortunately MSDN says that
Adding a customized BuildProvider class to the Web.config file works in an ASP.NET Web site but does not work in an ASP.NET Web application project
Are there some ways to migrate though without full discarding of custom BuildProviders mechanism?
Without knowing exactly what your build provider do I can see two possible solutions:
- Custom MSBuild tasks
- T4 templates
Hey you need to implement, a custom IVsSingleFileGenerator. And register it with your VS, to generate a custom .designer-File. The way DesignTime-Compilation works changed with Web Application Projects.
In combination with a BuildProvider you will get the same as ASPX-Pages.
I used it to generate user-interfaces with partial-methods to implement behavior in a codebehind-file.
That's impossible without review of the whole approach.
精彩评论