Application DLL In The Bin Folder

K

Kulgan

Hi

This might seem like a wierd question, but I'm going to ask it anyway!
When I build my ASP.NET apps, a DLL is created in the bin folder for
the application. What exactly is in this DLL and what does it do?

Thanks,

Kulgan.
 
R

Rick Strahl [MVP]

Kulgan,

All the Codebehind code you create in your ASPX forms in VS.NET get compiled
into this assembly

Note the dll is all the CodeBehind code - if you don't use CodeBehind and do
all your code inline no DLL is created. Not recommended though if you work
with VS.NET 2003, since it doesn't work well with non-CodeBehind pages.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
 
G

Grant Merwitz

a DLL is an assembly consisting of all you .cs files.
These sit in a semi-compiled state so your site runs quicker.

It also saves you the hassle of having all your source code up on the live
server.
All you should need (if compiled propertly - like Vis Studio's default) is
the assembly and your aspx files (ofcourse htm's, .configs etc)

So basicly, its all your .cs files compiled into a single file.
Makes deployment a helluva lot easier.

But beware, loading this file up, will have a dramatic efffect on the site,
it will have to load this into memory, and sessions may be lost.
Also, the next time your try view a page on your site, it will take a bit
longer to load as this will be loading up the new assembly. - but only for
the first page

HTH
 
K

Kulgan

Many thanks for the replies to this query. Are non-code behind source
files also compiled into this DLL? It is possible to place a .vb file
into the web app folder structure, s does this get compiled in as well?

Thanks,

Nick.
 
G

Grant Merwitz

Non code-behind files are NOT compiled into the dll.
Also, code behind files can be specified not to be compiled into the dll -
but then they have to be deployed with the live site
By default, Visual Studio compiles these into a DLL (and this is a better
more efficient approach - easier to deploy as well)

if you add a VB file into your project, Visual Studio will compile this into
the dll,
if this is not part of your project, but just in the same folder, it will
not be compiled into the dll.

So, if you right click in your solution explorer, and click add class file
(.vb file), this will by default be compiled into your assembly

Hope thats clear
 
G

Grant Merwitz

Sorry, just to clarify there

By NON-Code behind files, i was referring to ASPX pages with VB/C# code in
the ASPX pages.
I was not referring to .VB files which can also be called non code behind
files. - infact thats such a general term it can mean anything :)

So, if you place your code into an ASPX page as opposed to using Code Behind
it will not be compiled into the assembly.
But a .VB file will if added through the Visual Studio front end and you
have not changed the compilation method
 

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,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top