Hi Salma,
There are some errors in the C# code created by SAM's code generator.
1. SAM creates a file named "native-lib.cpp". You can change the extension from ".cpp" to ".cs" if it causes problems with your C# development environment.
2. The declaration of the variable 'time' in each block of code that runs a module is incorrect. The variable type should be 'double' instead of 'float'. Please try changing those variable declarations.
We will fix these problems for the Fall 2023 release:
github.com/NREL/SAM/issues/1427.
Best regards,
Paul.