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, August 27, 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:

Monday, August 27, 2007 10:44:35 AM (Romance Daylight Time, UTC+02:00)  #    Comments [1]   ASP.NET | Visual Studio  | 
Tuesday, August 28, 2007 12:43:16 PM (Romance Daylight Time, UTC+02:00)
I am currently looking for a way for adapting a custom build provider for using in web application projects.

My first option is create a console app that parses the files and create an assembly, and integrate in my build script.

So I agree 100%, Visual Studio should have an option to associate files with custom build providers. And the custom tool option doesn't exist in Express editions.
All comments require the approval of the site owner before being displayed.
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2020 Manuel Abadia. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.