Blog Home  Home Feed your aggregator (RSS 2.0)  
Web Application Projects vs Web Site Projects - Subtle differences (Part 2) - Manuel Abadia's ASP.NET stuff
 
# Monday, 27 August 2007

One cool thing in ASP.NET 2.0 is the concept of build providers. A file extension can be associated with a build provider that parses it and generates the associated code.

For example, the .XSD files have an associated build provider that generates a strongly typed dataset.

The bad news is that build providers only work for web site projects and not for web application projects. I don’t know what the exact reason is for Microsoft not having them working on web application projects but at the moment, we have to manually generate the associated code files and add them to our project. I hope they will fix this at least for VS 2008.

For now, they recommend creating a custom tool in order to handle the file creation. I don’t know very much about Visual Studio internals and I don’t have free time at the moment so I won’t try it.
 
If someone has some free time and can give it a try it will be cool to create a custom tool that reads the configured build providers from the web.config and generates code based on the file type and build provider.

There is a nice article that explains how to create something like the build providers for windows forms that can be a good starting point:

http://msdn.microsoft.com/msdnmag/issues/06/02/CuttingEdge/

Monday, 27 August 2007 10:44:35 (Romance Daylight Time, UTC+02:00)  #    Comments [1]   ASP.NET | Visual Studio  | 
Copyright © 2018 Manuel Abadia. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.