I used this code to sign assembly in msbuild script file:
<Exec Command="$(SNexePath)\sn.exe -R $(TargetPath)\Exchange.dll" />
but I've got error: error MSB3073: The command "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\sn.exe -R D:\Program\Exchange.dll" exited with code 1
After that I executed same command in Visual Studio command prompt to check if it will work with command prompt or not:
C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\sn.exe -R D:\Program\Exchange.dll but after that I've got this message:
Option -R takes 2 arguments
How to correctly sign assembly in msbuild script file?
To sign assembly you need to give sn.exe both assembly and keyfile: