CSharp.lua icon indicating copy to clipboard operation
CSharp.lua copied to clipboard

Need more explanations for -l and -module

Open 2dpdlja496or43iq opened this issue 2 years ago • 6 comments

Please help. You said that .NET DLLs can't be used directly as they need to be decompiled to C# first. So what do these switches do?

2dpdlja496or43iq avatar Apr 29 '23 22:04 2dpdlja496or43iq

@yanghuan @Drake53

2dpdlja496or43iq avatar May 01 '23 07:05 2dpdlja496or43iq

The -module parameter is used when compiling a DLL project with CSharp.lua. The -l parameter is used to indicate that the project being compiled by CSharp.lua has a reference to this DLL project. To ensure proper execution in Lua, both of these parameters need to be used in conjunction.

yanghuan avatar May 22 '23 10:05 yanghuan

To ensure proper execution in Lua, both of these parameters need to be used in conjunction.

Please give me an example. I think I still not really understand this part of your answer. Thank you.

2dpdlja496or43iq avatar May 22 '23 17:05 2dpdlja496or43iq

https://github.com/yanghuan/CSharp.lua/blob/master/test/BridgeNetTests/Tests/test.lua#L12 test project use it, you can see this example

yanghuan avatar Sep 26 '23 06:09 yanghuan

#502

ghost avatar Feb 08 '24 04:02 ghost

@yanghuan @Drake53 The DLL to be used with the -l switch is a .NET assembly or a Lua extension DLL? Please clarify.

ghost avatar Feb 10 '24 12:02 ghost