Step 1
first of all make a dll file and give a strong name and write following code in assemblyInfo.cs
for giving strong name right click on project name in visual studio and go to property and now go in signing tab and choose snk name and write following code in "assemblyInfo.cs"
then press ctrl+s for save
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile(@"E:\ktp\ktp\ktp1.snk")]//path for strong name
[assembly: AssemblyKeyName("")]
now rebulid application again
Step 2
now go to your new project and make a set up now right click on set up and go to view now further go to file system now right click on file system on target machine and add a global assembly cache folder
and now right click on global assembly cache folder and add assembly or dll that we want to add gac
Step3
now rebulid the set up and install set up that dll automatically added in "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\ktp(dll name) location.and we use that dll
By: Dalip Kumar