tmds / Tmds.DBus

D-Bus for .NET
MIT License
282 stars 54 forks source link

Codegen: System.ArgumentNullException: Value cannot be null. (Parameter 'address') #274

Closed uriel-kluk closed 7 months ago

uriel-kluk commented 7 months ago

Hello,

I am running the command you provided in the documentation: dotnet dbus codegen --bus system --service org.freedesktop.NetworkManager --interface org.freedesktop.NetworkManager.Connection.Active:ActiveConnection

But I it is returning the following error:

Unhandled exception. System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'address'))
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'address')
   at Tmds.DBus.ClientConnectionOptions..ctor(String address) in /home/tmds/repos/Tmds.DBus/src/Tmds.DBus/ClientConnectionOptions.cs:line 25
   at Tmds.DBus.Tool.CodeGenCommand.GenerateCodeAsync(CodeGenArguments codeGenArguments) in /home/tmds/repos/Tmds.DBus/src/Tmds.DBus.Tool/CodeGenCommand.cs:line 179

Do I need to run the codegen from a Linux machine with networkmanager, or can I invoke it from my Windows development box?

Thanks, Uri Kluk

tmds commented 7 months ago

Do I need to run the codegen from a Linux machine with networkmanager

Yes. Alternatively, you can get the xml files (like from https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/tree/main/introspection) and pass the file names to the codegen command.