Can I put together both C# and C++/CLI source files in a single project, and then compile them to obtain a single .DLL assembly?
You can obtain single DLL from code both in c++/cli and c# using command line tools. Let's assume you have two files: A.cc with C++/CLI code and B.cs with C# code. It should look something like this:
cl.exe /MD /c /clr A.cc
csc.exe /target:module /addmodule:A.obj B.cs
link.exe /DLL /LTCG /NOENTRY /CLRIMAGETYPE:IJW A.obj B.netmodule
I haven't tested it but it should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With