Index: mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets
--- mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets.orig
+++ mcs/tools/xbuild/data/12.0/Microsoft.CSharp.targets
@@ -20,6 +20,11 @@
 		<NoCompilerStandardLib Condition="'$(NoCompilerStandardLib)'==''">true</NoCompilerStandardLib>
 	</PropertyGroup>
 
+	<PropertyGroup >
+		<SnToolExe>sn</SnToolExe>
+		<SnToolPath>$(CscToolPath)</SnToolPath>
+	</PropertyGroup>
+
 	<ItemGroup>
 		<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)' != ''"/>
 	</ItemGroup>
@@ -101,6 +106,11 @@
 			Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
 			ToolExe="$(CscToolExe)"
 			ToolPath="$(CscToolPath)" />
+
+		<Exec
+			Command="$(SnToolPath)$(SnToolExe) -R @(IntermediateAssembly) $(KeyOriginatorFile)"
+			Condition="'$(DelaySign)' == '' and '$(KeyContainerName)' == '' and '$(KeyOriginatorFile)' != '' and ( $(CscToolExe.EndsWith('csc.exe')) or $(CscToolExe.EndsWith('csc')) or $(CscToolExe) == '' )" />
+
 
 	</Target>
 
