Remove documentation about how to sign the assemblies, as we sign them now.

Estimated hours taken: 0.1
Branches: main, 12.08

README.CSharp:
	Remove documentation about how to sign the assemblies, as we sign them now.
This commit is contained in:
Peter Ross
2012-11-22 20:53:35 +00:00
parent e73b87e77e
commit 06708ee186

View File

@@ -85,69 +85,15 @@ where <prefix> is the location of the Mercury installation.
Copy all of the dll files in the above directory into that of the process
assembly.
As for (2), in order to enter assemblies into the GAC they must be strongly-
named; unfortunately the Mercury compiler does not currently support creating
strongly-named assemblies in the csharp grade. If you're feeling particularly
fearless, then you can give the standard library assemblies strong-names and
enter them into the GAC manually using the following instructions.
To enter assemblies into the GAC, run the following command for each
assembly.
(0) We require the .NET SDK tools, such as gacutil.exe, to be available
from the command line. (You can use the ``Visual Studio Command Prompt''
shortcut to start a command line session with the environment suitably
set up.)
(1) Copy the standard library assemblies out of <prefix>\lib\mercury\lib\csharp
and into a separate directory.
(2) Create a new strong-name key-pair with which to sign the assemblies.
A key-pair can be created by using the sn.exe tool, for example
sn -k mercury.snk
will create a new key-pair and place it in the file mercury.snk.
(You may skip this step if you already have a strong-name key-pair
that you wish to use.)
(3) For each dll file do the following. (We illustrate using mer_std.dll.)
(i) Disassemble the assembly into MSIL.
ildasm mer_std.dll /out:mer_std.il
Note that this may also result in the creation of a resource file
mer_std.res.
(ii) Delete mer_std.dll.
(iii) Reassemble the assembly and sign it using the key-pair.
ilasm mer_std.il /dll /output=mer_std.dll /resource=mer_std.res /key=mercury.snk
Note that the /resource switch is only required if a resource file
is generated during disassembly.
(iv) Enter the assembly in the GAC.
gacutil /i mer_std.dll
(v) Replace Mercury's copy of the assembly with the newly signed one.
copy mer_std.dll <prefix>\lib\mercury\lib\csharp
This last step is important - the C# compiler does not look for
assemblies in the GAC at compile-time. We need to keep the "reference"
copy of the assembly in the Mercury library installation consistent with
the one in the GAC. (If something goes wrong here, the symptom will
typically be an abort from the runtime with a message saying that it
could not find the assembly.)
Assemblies can be removed from the GAC by doing, for example
gacutil /u mer_std.dll
We hope to improve support for signing assemblies in future versions of the
Mercury compiler.
-----------------------------------------------------------------------------
USING C#