473,769 Members | 8,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to use an ASSEMBLY

General:
- Using C#
- Using notepad to program (NOT Visual Studio).

I have a code-behind file name 'example1.cs'. I want to use an Assembly
given to me for a project I'm working on. I have put the assembly named
'assembly1.dll' in the /bin directory.

How do I import/load etc the assembly so that I can use it in example1.cs?

Thanks in advance

Nov 15 '05 #1
3 3949

"michael" <mp********@sbc global.net> wrote in message
news:OR******** ******@TK2MSFTN GP12.phx.gbl...
General:
- Using C#
- Using notepad to program (NOT Visual Studio).

I have a code-behind file name 'example1.cs'. I want to use an Assembly
given to me for a project I'm working on. I have put the assembly named
'assembly1.dll' in the /bin directory.

How do I import/load etc the assembly so that I can use it in example1.cs?

Thanks in advance


Use System.Reflecti on.Assembly.Loa d to load the assembly. After that, you
would typically use Assembly.Create Instance to create an instance of one of
the classes in that assembly.
Nov 15 '05 #2
So - how does that work ???

example.cs
----------------------------
System.Reflecti on.Assembly.Loa d assembly1.dll

public class ExampleClass {
AssemblyClass ac = Assembly.Create Instance(assemb ly1.dll);
}
------------------------------------

please provide more code ... thanks for you help :)

"Bret Mulvey [MS]" <br***@online.m icrosoft.com> wrote in message
news:HxHlb.1300 $9E1.11234@attb i_s52...

"michael" <mp********@sbc global.net> wrote in message
news:OR******** ******@TK2MSFTN GP12.phx.gbl...
General:
- Using C#
- Using notepad to program (NOT Visual Studio).

I have a code-behind file name 'example1.cs'. I want to use an Assembly
given to me for a project I'm working on. I have put the assembly named
'assembly1.dll' in the /bin directory.

How do I import/load etc the assembly so that I can use it in example1.cs?
Thanks in advance

Use System.Reflecti on.Assembly.Loa d to load the assembly. After that, you
would typically use Assembly.Create Instance to create an instance of one

of the classes in that assembly.

Nov 15 '05 #3
"michael" <mp********@sbc global.net> wrote in
news:OR******** ******@TK2MSFTN GP12.phx.gbl:
General:
- Using C#
- Using notepad to program (NOT Visual Studio).

I have a code-behind file name 'example1.cs'. I want to use an
Assembly given to me for a project I'm working on. I have put the
assembly named 'assembly1.dll' in the /bin directory.

How do I import/load etc the assembly so that I can use it in
example1.cs?

Thanks in advance


just add the namesapce(s) from that assembly with using to your source. and
when compileing add a /ref:assemblynam e.dll to your compile settings.

--
best regards

Peter Koen
-----------------------------------
MCAD, CAI/R, CAI/S, CASE/RS, CAT/RS
http://www.kema.at
Nov 15 '05 #4

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

Similar topics

2
8808
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding configuration every time there is an update to a shared assembly.
26
10553
by: nospam | last post by:
Just wondering, What do you think the difference in performance would be between (1.) Compiled C# (2.) Compiled C++ (3.) and Assembly Language And how would the mix be if some if any of these languages had to hit against a SQL Server database
2
6407
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this to happen we had to change the context in which asp.net runs from machine to SYSTEM by modifying the machine.config file. Under Windows 2003 no matter how asp.net is set to run as either machine or system. I get the following error: ...
10
3482
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
7
10962
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed this screen below. Please help, thanks in advance... Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify...
3
4412
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here really understand how this could be an issue. The assemblies that the system is complaining about are ones that we build here and we're not changing version numbers on anything. The errors come and go with no apparent rhyme or reason. We do not...
1
2370
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been installed into the GAC. We originally had this assembly without a strong-name and we were successfully using it by referencing it when it was NOT in the GAC. The assembly was built using the 1.0 framework and we were able to call it from both 1.0...
2
11767
by: Paul | last post by:
Hi, I have experience in Java and C++ but I am rather new to C# and just started learning it. I am using Visual C# 2005 Express Edition and I found that there is a file called "AssemblyInfo.cs", which is something like I attached below. Would anyone please let me know what is the purpose of this file? Or are there any equivalent stuff I can imagine in C++ or Java? Thanks a lot.
1
2259
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9 I have pasted the part I'm interested in below. My company doesn't use versioning or the gac and I'd like to. We're on vs.net 2005 & .net 2., is this still true or has it changed since then? thanks That article is not entirely accurate. ...
14
2669
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both reference the same BLL in a separate assembly, and I have all three projects in a single solution file for development, with the two UI's each having a project reference to the BLL assembly. I created a Setup and Deployment package for the winform app...
0
9414
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9977
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9848
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7391
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5293
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5432
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3947
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 we have to send another system
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.