C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Working with Assembly


Posted Date: 12 Sep 2007    Resource Type: Articles    Category: .NET Framework
Author: Cema Indumathy VMember Level: Diamond    
Rating: 1 out of 5Points: 10



Just follow the steps to create shared assembly:

1) Create dll


2) Create key pair.
For that open the sdk command prompt then follow the syntax

sn -k "path of the key pair file to be created"

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>sn -k e:\my\MyButton.key

Microsoft (R) .NET Framework Strong Name Utility Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Key pair written to e:\my\MyButton.key



3) Do the signing process.
After creating the key pair, the created keys should be signed to the assembly in order to make the GAC to differentiate the assembly from other assembly. This process is said to be strong naming.

Open the Assembly info in the project(where you created that dll) & include the line

<Assembly: AssemblyKeyFile("e:\my\MyButton.key")>



4) Now the assembly is ready for the installation. Do the installation as follows, again go to the sdk command prompt, then follow the syntax

syntax: gacutil /i "path of the strong named dll"

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>gacutil /i "e:\my\MyButton\bin\MyButton.dll"

Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.

Assembly successfully added to the cache



5) Finally go to registry
hkey_local_machine -> software -> microsoft -> .net framework -> assembly folders -> right click on it - create new key - give name - then - in the right pane - right click on name - modify - give the path - eg: e:\test\bin






Responses

Author: VASANTH R    21 Sep 2007Member Level: Gold   Points : 0
1. The article doesn't mention clearly how to include the Key pair in the Assembly info file.
In the article it just menitoned 'Open the Assembly info in the project(where you created that dll) & include the line'

2. What is the need to make dll reference in the Registry




Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Working with Assembly  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Using a Thread Pool in C# for Multiple Currency Conversion
Previous Resource: The Power and Prowess of Console Applications and Enhancing it with .NET Framework 2.0
Return to Discussion Resource Index
Post New Resource
Category: .NET Framework


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use