Programming in C# — Question 99

You are developing an assembly that will be used by multiple applications.
You need to install the assembly in the Global Assembly Cache (GAC).
Which two actions can you perform to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

Answer options

Correct answer: D, E

Explanation

The correct answers are D and E because both methods specifically allow the assembly to be added to the Global Assembly Cache. Option A is incorrect because regasm.exe does not copy assemblies to the GAC; it is used for COM interop. Option B is incorrect as sn.exe is used for creating strong-named assemblies, not for adding to the GAC. Option C is also wrong since regsvr32.exe is intended for registering COM components, not for GAC operations.