ASP.NET 2.0 Compilation Model - I don't get it?

G

Guest

Hi all,

From what I read, VS.NET 2005 doesn't precompile web applications into a
DLL for deployment, rather you need to manually precompile before release.

However, I have a web application in my project and it is compiling like in
..NET 1.1 - it is generating a set of deployment DLLs.

Does anyone know why it is doing that? Does VS.NET 2005 still support both
deployment models?
 
G

Guest

Hi all,

From what I read, VS.NET 2005 doesn't precompile web applications into
a DLL for deployment, rather you need to manually precompile before
release.

However, I have a web application in my project and it is compiling
like in .NET 1.1 - it is generating a set of deployment DLLs.

Does anyone know why it is doing that? Does VS.NET 2005 still support
both deployment models?


Looks like I had SP1 installed, that's why my app was setup as a web
application project.


In anycase, what's everyone view of the new model vs. 2003 model?

Personally I prefer the 2003 model ... seems easier to deploy (no need to
precompile THEN deploy).

Any comments/views?
 
B

bruce barker

asp.net has its own compiler. just like version 1, a dll is created per
page (actually batching may cause more than 1 page per dll). the
difference is how the code behind classes are done. in vs2003 or vs2005
application model, the code behind file are compiled into one dll. in
vs2005 web site mode, the code behind code is included in the page dll.


take a simple site with 2 web pages.

page1.aspx -> page1.aspx.cs
page2.apsx -> page2.apsx.cs


for example with a vs2003 and vs2005 application you end up with 2 page
dlls built by the asp.net compiler and one code behind dll

page1.aspx.dll (name will depend on compilation model)
page2.aspx.dll (ditto)
project.dll (named by vs project)

in a vs2005 web site, only the first 2 dll's are built.

in vs2003/asp.net 1.0 the page dll's are built in a temp dir when the
web site is first accessed.

vs2005/asp.net support precompiling the page dll's into a deploy folder.
there are a couple modes depending on how you want to deploy updates.
you can fix the names, so that pages can be changed and deployed
individually (difficult with application mode), or whether the site is
redeployed in whole.


-- bruce (sqlwork.com)
 
J

Juan T. Llibre

Did you install Web Application Projects, Web Deployment Projects or VS 2005 SP1 ?

They all support what you are seeing.
 
M

Mark Rae

In anycase, what's everyone view of the new model vs. 2003 model?

Personally I prefer the 2003 model ... seems easier to deploy (no need to
precompile THEN deploy).

If you're talking about the website model versus the web application model,
opinion is divided - personally, I cannot abide the website model and would
never contemplate using it even for the simplest of websites... However,
that's just my view, which is what you asked for...

When VS.NET 2005 was first released, only the website model existed. There
was such an outcry from the ASP.NET developer community that Microsoft were
forced to rush out the Web Application Projects add-on - so that might tell
you something... :)

However, some people love the website model...
 
G

Guest

Did you install Web Application Projects, Web Deployment Projects or
VS 2005 SP1 ?

They all support what you are seeing.

Ya, that turned out to be the case - it was SP1. I didn't realize SP1
included the web application project deployment model.

For some reason I'm more comfortable with the web app project model. I
distribute my app to several customers and it seems easier to deploy (less
DLLs, etc).

Would be nice if the ASPXs could be compiled right into the app as well :)
 
G

Guest

When VS.NET 2005 was first released, only the website model existed.
There was such an outcry from the ASP.NET developer community that
Microsoft were forced to rush out the Web Application Projects add-on
- so that might tell you something... :)

That's what I thought ...

The web site model looks great if you have complete control over the
server, but if you're going to be deploying the app to multiple customer
sites + making frequent changes to the code base, the classic web app
project model seems more suited.

Is there a way to compile the ASPX right into the DLL in 2005? :)
 
M

Mark Rae

The web site model looks great if you have complete control over the
server, but if you're going to be deploying the app to multiple customer
sites + making frequent changes to the code base, the classic web app
project model seems more suited.

In that case, you should definitely investigate Web Deployment Projects...
 

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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top