Home » Microsoft » 70-487 v.2 » Which tool should you run?
You have a web server that hosts several web applications.
From Microsoft Visual Studio, you create an assembly that is signed.
You need to make the assembly available to all of the web applications on the web server. The solution must minimize the number of copies of the assembly.
Which tool should you run?
A. gacutil.exe
B. sn.exe
C. tlbImp.exe
D. regasm.exe
Correct Answer: B
Explanation/Reference:
Strong Name Scenario
The following scenario outlines the process of signing an assembly with a strong name and later referencing it by that name.
Assembly A is created with a strong name using one of the following methods:
Using a development environment that supports creating strong names, such as Visual Studio 2005.
Creating a cryptographic key pair using the Strong Name tool (Sn.exe) and assigning that key pair to the assembly using either a command-line compiler or the Assembly Linker (Al.exe). The Windows Software Development Kit (SDK) provides both Sn.exe and Al.exe.
References: https://docs.microsoft.com/en-us/dotnet/framework/app-domains/create-and-use-strong-named-assemblies
A. gacutil.exe
The assembly is already signed. No need to call sn.exe again.
The answer is A.
“You can install only strong-named assemblies into the global assembly cache.”
That’s why the question specified the assembly is signed.
https://docs.microsoft.com/en-us/dotnet/framework/app-domains/install-assembly-into-gac
The question also states the following:
“The solution must minimize the number of copies of the assembly.”
This is the GAC’s purpose:
https://docs.microsoft.com/en-us/dotnet/framework/app-domains/working-with-assemblies-and-the-gac