Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

how to precompile a web application?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bruce barker - 16 Oct 2007 01:19 GMT
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)
Mark Rae [MVP] - 16 Oct 2007 01:33 GMT
> 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.

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

bruce barker - 16 Oct 2007 14:33 GMT
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)

>> I can find no way to precompile a web application from visual studio.
>
[quoted text clipped - 17 lines]
>
> It certainly does.
Mark Rae [MVP] - 16 Oct 2007 14:48 GMT
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

bruce barker - 16 Oct 2007 16:17 GMT
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)

>> 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...
Mark Rae [MVP] - 16 Oct 2007 18:16 GMT
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Peter Bromberg [C# MVP] - 16 Oct 2007 02:34 GMT
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

> a previous long thread brought this up.
>
[quoted text clipped - 15 lines]
>
> -- bruce (sqlwork.com)
bruce barker - 16 Oct 2007 14:39 GMT
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)

> 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
[quoted text clipped - 27 lines]
>>
>> -- bruce (sqlwork.com)

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.