Can i change private assembly to shared assembly?How?

Showing Answers 1 - 2 of 2 Answers

Saravanan

  • Sep 12th, 2005
 

Yes, You can change from Private to Shared.

- Get the SN using sn.exe

- Add the SN to the Assembly

- Put the Assembly in GAC.

  Was this answer useful?  Yes

Sathiyavathi

  • Mar 28th, 2006
 

Hi,

  Yeah we can do.

  1. Compile the Private assembly first.For ex:Sample.cs 

  2. Create the strong name through command prompt as sn -k  Test.It will return the Key.

  3.Mention these lines in your .cs or AssemblyInfo.cs and you must use the namespace

    usingSystem.Reflection;

    [assembly:AssemblyKeyFile("Test")]
    [assembly:AssemblyVersion("1.0.0.0")]

  4. Compile your Sample.cs file once again.

  5. Now you want to place this dll in GAC for that you mention these lines in your command prompt:

     gacutil -i Sample.dll

  6. Now your private assembly become a shared assembly.

  7. If you want to check it means go to

     C:/WINNT/Assembly

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions