Friday, November 04, 2005 3:45 PM szurgot

Changes to Web Projects - Mostly good, one bad

Ok, so they fixed most, if not all, of the issues I brought up in a much older post, like giving the ability to exclude projects, and not checking in references. These things are wonderful, and go a long way towards re-establishing that web sites aren't quite second class citizens.

But, there is one new issue that was "introduced", I guess you could say. If you put the references in the web project, it will auto-update them. But apparently, it auto-updates them everytime. Before every build, in a project with about external auto-updating reference, it would take about 2 minutes just to start the build, not to mention actually building and validating all of the pages. This happens even on "Build Page"

Not acceptable.

Fortunately, there is a work-around. (It was actually the same one suggested for auto-updating references under the old methodology) Put your references in another project, and reference that project. That's auto-updating and almost instant, which makes "Build Page" useful again.

But, there's one catch here... If you then use MSBuild to build the project, it will only copy the dll of the project, and not the rest of the reference. (Not sure why there's an MSBuild inconsistency, hopefully they can fix it.) In order to work around that, a post build copy step is necessary. (But again, an inconsistency... VS 2005 doesn't have a problem copying into the web bin directory, but MSBuild doesn't like to allow you to copy the reference dll a second time., so you have to ignore any copy errors. Ugh!)

Oh, well, just something to keep an eye out for, and a little helpful info to work around it.

Filed under:

Comments

# re: Changes to Web Projects - Mostly good, one bad

Friday, November 04, 2005 6:30 PM by scottgu@microsoft.com

Chris,

Can you send me email with more details on this?

The logic with .refresh files is that they only update the assembly if the time-stamp of the target assembly has changed. Unless you are updating this target assembly no copy or clean re-build is required. We just tested this on builds here and verified that is the shipping behavior.

Can you send me more details about your project? Do you have other class library projects in the web solution? Could then potentially have pre-post build steps that run each time that are causing a re-build for lower dependency projects?

Thanks,

Scott

# re: Changes to Web Projects - Mostly good, one bad

Sunday, November 06, 2005 3:15 PM by scottgu

I'm glad everything turned out all right! :-)

http://weblogs.asp.net/cszurgot/archive/2005/11/06/429698.aspx