A part of big project is a payment system, that I would like to reuse. I want to merge all the class files of this payment system into DLLs so that add them as a reference in all the other projects. The present payment system is also using namespaces from the DLLs of a commercial application (nsoftware-paypal n few others). I tried csc to compile the individual files into DLLs but couldnt make it work. I also tried the ILMerge but this doesnt seem to work either.
CSC
As the .cs files uses the namespaces from the DLLs of nsoftware-Paypal, I included DLL files along with .cs in csc command. it gives me an error saying "...nsoftware.InPayPal.dll is a binary file instead of a text file". When I try to compile without the paypal DLLs it throws an error saying 'The type or namespace named nsoftware is missing'.
ILMerge does not allow the .cs files either(as its not an assembly of course).
All I need to do is to generate the one(or more) DLLs for this whole system so that I can use it in other projects.
Possible?
you need to compile your .cs files using csc, then use ILMerge to combine the 3rd party assemblies with your generated assembly.
fyi there is an open source gui for ILMerge that can make things a little easier (at least at first).
http://sourceforge.net/projects/gilma/
In regards to your compilation issues you might want to check out this tutorial
in order to compile your code with a dll do something like this
csc /out:out.exe /r:third_party_dll.dll program.cs