How to Generate a Strong Name for the Assembly and How to Build the Assembly and Add it to the Global Assembly Cache ?

InfoPath alternatives for form designing SharePoint
Generate a Strong Name for the Assembly
Assemblies that host serviced components must be strong named. This procedure generates a public-private key pair used to strong name the assembly.
To generate a strong name for the assembly
Step-1:Open a command window and go to the current project directory.
Step-2:Use the sn.exe utility to generate a key file that contains a public-private key pair.
sn.exe -k RajSimpleComponent.snk
Step-3:In Visual Studio, open assemblyinfo.cs.
Step-4:Locate the [AssemblyKeyFile] attribute and modify it to reference the key file in the project directory as follows.
[assembly: AssemblyKeyFile(@”..\..\RajSimpleComponent.snk”)]
Build the Assembly and Add it to the Global Assembly Cache
This procedure builds the assembly that contains the serviced component and then adds it to the global assembly cache. Serviced components should generally be registered in the global assembly cache because they are system level resources.
To build the assembly and add it to the global assembly cache
Step-1:On the Build menu, click Build Solution.
Step-2:Return to the command window and run the following command to add the assembly to the global assembly cache.
gacutil –i bin\debug\RajtestCom.dll

Similar SharePoint 2013 Tutorials


About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →

Leave a Reply