Re: ASP .NET 2.0 Unanswered questions...

Tech-Archive recommends: Speed Up your PC by fixing your registry



But Bruce, you seem to be talking about the compile process more than the
simple fact that in 1.1, only one assembly file is produced. It is
*possilbe* to deploy pages without the assemblies and let that process
happen on the fly. But, when producing assemblies ahead of time, there
would just be the one.


"bruce barker" <nospam@xxxxxxxxxx> wrote in message
news:OtI9cJuDIHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
in both 1.1 and 2.0 there are two types of source files. code behind
usually written in c# or vb, and asp.net source files.

version 1.1 of asp.net in order to support inline server script (or
asp.net codebehind with no visual studio support), generated source code
for the page, then called the desired compiler to build a dll. this was
done on the first request to the page. the source file was produced in a
temp folder (and an actual compiler script), and after being built the
assembly was loaded into memory. this also required all dll's in the bin
folder be copied to the temp. a visual studio project would build the
codebe

in version 2.0, because of partial classes, the aspnet_compiler converts
aspx pages to il directly, (actually so did 1.1, but it used the .net
codedom library to convert il to source code). version 2.0 has a bunch of
compiler options, (if you look in your msbuild scripts you can see the
aspnet_compiler options you are using). you shoudl read the apnet_compiler
documentation to get an idea of how it works.

you can also look in your deployment project. if the aspx pages are all
empty (no source) then your site was precompiled for all the aspx pages
and has been batched into dll's (again depending on compiler switches). if
they contain source code, then they will be compiled at runtime on first
page request much like 1.1

again in version 2.0 the only difference between web sites and web
application is the handling of the code behind files compilation (whether
the aspnet_compiler call the language compiler or msbuild) and in the case
of a web applications the existence of a project file. there is no
difference in how the aspx pages are compiled.

in either case you should use deployment projects to build a deployment
folder.

even if you use only notepad, and the aspnet_compiler, to build a
production web site, you can get the same results as visual studio.

again the main benefit of web applications (to the developer) is not
having to define formal interfaces in the app_code folder for pages to
call each other (this is what broke most 1.1 apps trying to move to 2.0
and drove MS to release web application projects).

i personally feel defining interfaces is a better practice (see interface
design pattern), but it is more work.

in any case disk space is cheap and you shouldn't worry too much about how
many dlls are produced.

ps. looking in vs2008, with a web application i can see no way with visual
studio to do a full precompile of the aspx pages like you can with a
website. you could still update the msbuild file manually to do it though.
i'll check with vs2005 when i get chance to see if it has the same
limitation.



-- bruce (sqlwork.com)






Rory Becker wrote:
Bruce....

...can you point to any references to back this up?

Whilst I am interested in all versions of ASP.Net, I would be very
interested for you to provide a reference which suggests that an ASP.Net
1.1 application produces 1 assembly per page as I do not believe this is
the case.

Likewise I have not seen this behaviour for ASP.Net 2.0 "Web
Applications"

All shadow copied assemblies appear to be literally copies of those found
in a Bin directory of the Web Applications source.

Also I believe that with the exception of NGen (whose native images are
ignored by ASP.Net 1.1 anyway.) Jit compiling does not produce further
assemblies as it is an in-memory process only.
Thanks
--
Rory



.



Relevant Pages

  • Re: ASP .NET 2.0 Unanswered questions...
    ... It is *possilbe* to deploy pages without the assemblies and let that process happen on the fly. ... support), generated source code for the page, then called the desired compiler to build a dll. ... in version 2.0, because of partial classes, the aspnet_compiler converts aspx pages to il directly, (actually so did ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Why does VS mark files as changed?
    ... assemblies that are used in multiple solutions. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP .NET 2.0 Unanswered questions...
    ... When I look in the ASP.NET Temporary Files directory for 1.1 apps., ... one that exists in my /bin folder). ... As for finding other component assemblies in these folders, that may be true, but those assemblies are not for the ... support), generated source code for the page, then called the desired compiler to build a dll. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How would you steer Delphi if you were Nick?
    ... I know why Allan thinks that D.Net needs an RTL lib, and I know very well what an RTL lib, that gets updated between compiler version means. ... It *will* let your assemblies look as if you were still in the Delphi32 world, ... you remember me of that "Jehovah's Witnesses" that ringed at my door 2 years ago and kind of tried me to sell his blabla about blabla because blabla. ...
    (borland.public.delphi.non-technical)
  • Re: CLS Compliance
    ... Note The current Microsoft Visual Basic compiler intentionally does not ... will issue that warning. ... 2003 vb class file this project referenced some vb 2005 assemblies, ... class file and pasted in the code from the vb2003 class, ...
    (microsoft.public.dotnet.general)