Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 15th, 2006, 12:36 PM
Registered User
 
Join Date: Jan 2006
Location: Mumbai, Maharastra, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Assembly

Hi There,

I have some doubts about dotnet framework. If someone can please clear it.

I have read...

.Net Framework gives advantage of using dotnet application without registering with system registry. This is made possible due to following reasons

.Net can automatically locate referenced assemblies. It contains manifest which has information about assemblies information with other assemblies.

Does it mean that the folder of dotnet application directory has all referenced files. If so then isn't it waste of diskspace if i already have the file in harddisk in someother location.when a dotnet application is copied from one computer to other it copies all the files even though if they are there. Does it finds out before copying the application wheather all refered dll files are there or not?

Thanking you and waiting for some kind replies.

Amit



Reply With Quote
  #2 (permalink)  
Old January 15th, 2006, 11:42 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

To a certain extent, yes, it could be a waste of space. However, typically you won't have the same application in multiple places on the same machine.

Let's take an example of a program "MyProgram.exe" and a helper assembly "MyProgram.Helpers.dll". "MyProgram" is the programs namespace and "MyProgram.Helpers" is the DLL's namespace. When you run a MyProgram.exe, and that program to use a class from MyProgram.Helpers the framework will first look in the directory that the application is running for a library (DLL) that contains the "MyProgram.Helpers" namespace. If it doesn't find it there, it will then look in the GAC. (I believe there are ways of telling a program where else it can look for assemblies but I've never done it.) If the framework can't find the assembly it will throw an exception and tell you that it can't find a referenced assembly.

ASP.NET application are a little different. The execution directory of the application is the virtual directory established in IIS. Executable binaries must live inside the bin\ folder of the directory.

Assemblies that are commonly used such as those that make up the base .NET framework, are placed into the framework's Global Assembly Cache (GAC). Having an assembly in the GAC is kind of like registering it like you would a COM component. You can then reference an assembly namespace from anywhere on the computer. An important feature of the GAC is that it is aware of more than just the name of the assembly. The GAC can maintain several versions of the same assembly. Programs reference a specific version of a namespace in addition to the namespace. You can install version 1.0, 1.1 and 2.0 of the .NET framework on the same machine. When you build a program with version 1.1, the program references the 1.1 versions of the framework.

-Peter
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New to Assembly OnlyHuman925 Assembly Language 4 January 10th, 2010 07:28 AM
Assembly upadhyayharish83 ASP.NET 3.5 Basics 1 August 5th, 2008 01:25 AM
Converting .NET 2.0 Assembly to .Net 1.x Assembly pskaushik .NET Framework 2.0 1 November 25th, 2006 01:51 PM
assembly sreenu.pocha C# 4 July 26th, 2006 07:31 AM
Assembly arv1980 .NET Framework 2.0 1 January 15th, 2006 02:12 PM



All times are GMT -4. The time now is 05:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.