Closed yphuangms closed 6 years ago
Great Suggestion @yphuangms!
I will add here to out backlog try it out and add.
Remember that you can always do a Pull Request and contribute back! This would be a great contribution.
Let us know,
Angelo Ribeiro.
Thanks for the feature request. However, at this time, we are not planning to take on this work. We would be happy to take a pull request. Thanks!
For the convenience to build and to debug/run those dotnet modules, "CMakeLists.txt" could be added into these project folders, and add these folder into parent folder "CMakeLists.txt".
For example,
To add "SensorModule" module sample into build process, add ""%build-root%\bindings\dotnet\dotnet-binding\SensorModule\CMakeLists.txt"
And add "%build-root%\bindings\dotnet\dotnet-binding\CMakeLists.txt", content of this file:
Apply the same methods above to those dotnet modules you would like to add into build process.
Modify to add one line at the end of file of "%build-root%\bindings\dotnet\CMakeLists.txt"
Later on, when "build.cmd --enable-dotnet-binding" is done, find the gateway SDK Visual Studio Solution file at "%build-root%\build\azure_iot_gateway_sdk.sln". Open this solution file to start build/debug/run the gateway sample program for dotnet modules. To debug into dotnet modules, one project properties needs to be changed for debugging in gateway sample program, open "dotnet_binding_sample" project property page, select "Configuration Properties>Debugging", and modify following property values:
-- "Command Arguments" : (JSON configuration file path) -- "Working Directory": "$(OutDir)" -- "Debugger Type": "Mixed"
By doing so, it will work when you set breakpoint at dotnet modules and debug step by step between native C code and dotnet code.