473,466 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

assemblies

what are static and dynamic assemblies
with differences between them
May 10 '06 #1
5 2735
Static assemblies can include .NET Framework types (interfaces and classes),
as well as resources for the assembly (bitmaps, JPEG files, resource files,
and so on). Static assemblies are stored on disk in portable executable (PE)
files. You can also use the .NET Framework to create dynamic assemblies,
which are run directly from memory and are not saved to disk before
execution. You can save dynamic assemblies to disk after they have executed.

"Vikas Kumar" wrote:
what are static and dynamic assemblies
with differences between them

May 10 '06 #2
this much i was able to found on net on msdn site
i want something with example
"Altaf Al-Amin Najwani" <Al****************@discussions.microsoft.com> wrote
in message news:C6**********************************@microsof t.com...
Static assemblies can include .NET Framework types (interfaces and
classes),
as well as resources for the assembly (bitmaps, JPEG files, resource
files,
and so on). Static assemblies are stored on disk in portable executable
(PE)
files. You can also use the .NET Framework to create dynamic assemblies,
which are run directly from memory and are not saved to disk before
execution. You can save dynamic assemblies to disk after they have
executed.

"Vikas Kumar" wrote:
what are static and dynamic assemblies
with differences between them

May 10 '06 #3
Any normal assembly is an example of a "static" assembly i.e. your main app
....

http://geekswithblogs.net/gyoung/arc.../27/76533.aspx includes two
examples of dynamic assemblies (one actually references the other).

Cheers,

Greg Young
MVP - C#
"Vikas Kumar" <ef*****@newsgroups.nospam> wrote in message
news:OF**************@TK2MSFTNGP05.phx.gbl...
this much i was able to found on net on msdn site
i want something with example
"Altaf Al-Amin Najwani" <Al****************@discussions.microsoft.com>
wrote in message
news:C6**********************************@microsof t.com...
Static assemblies can include .NET Framework types (interfaces and
classes),
as well as resources for the assembly (bitmaps, JPEG files, resource
files,
and so on). Static assemblies are stored on disk in portable executable
(PE)
files. You can also use the .NET Framework to create dynamic assemblies,
which are run directly from memory and are not saved to disk before
execution. You can save dynamic assemblies to disk after they have
executed.

"Vikas Kumar" wrote:
what are static and dynamic assemblies
with differences between them


May 10 '06 #4
Hi,

Dynamic assemblies are code that you generate in your code dynamically.
There are several cases where this is needed.
static assemblies are any other assembly that is stored in a file.

generating an assembly in code is not easy task nor that common at all, I
have never had the need to generate one. and I'm sure the vast majority of
the other posters here wil say the same

why r u so interesting in it?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Vikas Kumar" <ef*****@newsgroups.nospam> wrote in message
news:OF**************@TK2MSFTNGP05.phx.gbl...
this much i was able to found on net on msdn site
i want something with example


May 10 '06 #5
I disagree that it is a difficult task.

static Assembly GenerateSatelliteAssembly() {
CSharpCodeProvider codeProvider = new
Microsoft.CSharp.CSharpCodeProvider();
ICodeCompiler compiler = codeProvider.CreateCompiler();
CompilerParameters Parameters = new CompilerParameters(new string[]
{"mscorlib.dll"});
Parameters.ReferencedAssemblies.Add("System.dll");
Parameters.OutputAssembly = "inmemoryassembly.dll";
Parameters.GenerateExecutable = false;
Parameters.GenerateInMemory = true;
string source = "";
source += "public class OtherObject {";
source += " public static void SomeMethod() {";
source += " System.Console.WriteLine(\"Hello World from other object
located in an in memory assembly\");";
source += " }";
source += "}";

CompilerResults results = compiler.CompileAssemblyFromSource(Parameters,
source);
CheckResults(results);
return results.CompiledAssembly;
}

Cheers,

Greg Young
MVP - C#

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:uQ**************@TK2MSFTNGP05.phx.gbl...
Hi,

Dynamic assemblies are code that you generate in your code dynamically.
There are several cases where this is needed.
static assemblies are any other assembly that is stored in a file.

generating an assembly in code is not easy task nor that common at all, I
have never had the need to generate one. and I'm sure the vast majority of
the other posters here wil say the same

why r u so interesting in it?
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Vikas Kumar" <ef*****@newsgroups.nospam> wrote in message
news:OF**************@TK2MSFTNGP05.phx.gbl...
this much i was able to found on net on msdn site
i want something with example


May 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom Dacon | last post by:
If you're not putting assemblies in the GAC, but are referencing shared code with copylocal=true into the projects that use them, is there any value to signing the assemblies? In the environment...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
3
by: Joel Leong | last post by:
I wish to know the industrial practices for signing assemblies with key files. I genereted a key file to sign my assemblies. Should I sign all my assemblies with a single key files or I shall...
1
by: Afaq | last post by:
Hi, After adding large number of empty resource files (which will be updated later), we are not able to compile the project. the following is the output of the build process. It fails while...
6
by: Sam-I-Am | last post by:
Hi There I have several websites that use shared assemblies in the GAC. When I try and update the GAC assemblies I get the following error: "The process cannot access the file because it is...
8
by: Jason | last post by:
In my ASP.NET 1.1 solutions, I created several web projects and compiled them each into an assembly. The assembly names reflected the functionality of the feature (Membership.dll, Dues.dll, etc)....
8
by: Charles Law | last post by:
I'm sorry to keep harping on about this one, but it is really quite important for me to be able to list _all_ required assemblies in my Help About box. Herfried kindly posted some code before that...
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
4
by: illegal.prime | last post by:
Hi all, I'm getting unexpected results when trying to preload assemblies into an AppDomain I'm creating. Upon creation of the AppDomain - I attach an AssemblyResolve to both my current AppDomain...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.