how to precompile a web application?

B

bruce barker

a previous long thread brought this up.

I can find no way to precompile a web application from visual studio. by
precompile I mean all the aspx code is converted to assemblies by visual
studio, not at runtime by asp.net. if you view the compiled aspx page it
should only contain the line:

This is a marker file generated by the precompilation tool, and should
not be deleted!

replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.

vs2005 & vs2008 support this for websites (all i use), but was looking
for the out of the box web application solution.

note: this a asp.net 2.0+ feature and does not exist for 1.1

-- bruce (sqlwork.com)
 
M

Mark Rae [MVP]

I can find no way to precompile a web application from visual studio.

Not sure about natively, but Web Deployment Projects does this (I never use
anything else for deployment).

It's a simple matter of unchecking the "Allow this precompiled site to be
updatable" checkbox in the WDP's Compilation options...
by precompile I mean all the aspx code is converted to assemblies by
visual studio, not at runtime by asp.net. if you view the compiled aspx
page it should only contain the line:

This is a marker file generated by the precompilation tool, and should not
be deleted!

That's right.
replacing all the original aspx source, and of course a page assembly
should exist in the bin folder thats the compiled aspx.

It certainly does.
 
G

Guest

Not to sound like a broken MP3, but if you use the Web Application Project
model you will never have to go through this B.S. - you get a /bin folder
with your entire project all compiled into a single assembly. No muss, no
fuss. And none of those silly marker files that are required for an endpoint
for each page. Works just like the original VS 2003 deal.
Cheers,
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
 
B

bruce barker

i use web deployment projects with web sites, i just can not find how to
add one to a web application solution, especially for vs2008.

-- bruce (sqlwork.com)
 
B

bruce barker

if you are not using marker files, then your site is compiled at runtime
on the first page request (just like 1.1). web deployment projects are
used to build precompiled sites, I'm just missing how to create a web
deployment project for a web application. though it is easy to
precompile a web application project manually.


-- bruce (sqlwork.com)
 
M

Mark Rae [MVP]

I use web deployment projects with web sites, i just can not find how to
add one to a web application solution

1) Right-click the project name in Solution Explorer

2) Click Add Web Deployment Project...
 
B

bruce barker

if only it was so easy, the menu pick appears for a web site, but not
for a web application. But I'll take your word for it. I really wanted
to look at the msbuild file it generated to compare to the one produced
for web sites, to see what differences it had (if any) and if it had an
option to run the merge utility.

also I'm more interested in vs2008's approach to web deployments.


-- bruce (sqlwork.com)
 
M

Mark Rae [MVP]

the menu pick appears for a web site, but not for a web application.

It most certainly does appear for a web application - I'm sitting looking at
it right now...

I never go anywhere near web sites - all my ASP.NET projects are web
applications, and they all have a WDP added in precisely this way...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top