XmlRpcCS with Mono >1.1.x
I was trying to work on some XML-RPC craziness under Mono, and came across XmlRpcCS and a nice tutorial. Problem is, since I’m running Mono 1.1.4, I could reference the built XmlRpcCS.dll assembly at compile-time with no problems, but the resulting program would die with:
WARNING **: Could not find assembly XmlRpcCS, references from
~/source/monoblog/monoblog.exe (assemblyref_index=3)
This is because with Mono 1.1.x, it seems you must register signed assemblies with gacutil. In order to do this with XmlRpcCS, you need to do the following:
- Download the XmlRpcCS source file and unzip it.
cdto theXmlRpcCSdirectory and run “sn -k XmlRpcCS.snk” to generate your keyfile.- Edit the
makefileand change theCSFLAGSline to “CSFLAGS=-define:__MONO__ -delaysign-“ Edit
src/nwc/xmlrpc/AssemblyInfo.csand add the following lines:[assembly: AssemblyDelaySign(false)][assembly: AssemblyKeyFile("XmlRpcCS.snk")]Run
make- Run “
sudo gacutil -i XmlRpcCS.dll -package XmlRpcCS“
Now when you need to compile against XmlRpcCS, just add “-r /usr/lib/mono/XmlRpcCS/XmlRpcCS.dll“, and it should work fine.