microsoft / carbon-aware-sdk

Carbon-Aware Core SDK
MIT License
14 stars 8 forks source link

Enhance packaging.md to include how to run, build and consume the ConsoleApp using GSF.CarbonAware library. #224

Open Lybecker opened 1 year ago

Lybecker commented 1 year ago

Contact Details

anlybeck@microsoft.com

What happened?

The ConsoleApp sample does not compile right out of the box. I would expect it to compile and guide to how to configure

client

WebAPI (Default)

Relevant log output

C:\code\carbon-aware-sdk\samples\lib-integration\ConsoleApp> dotnet run
C:\code\carbon-aware-sdk\samples\lib-integration\ConsoleApp\Program.cs(1,7): error CS0246: The type or namespace name '
GSF' could not be found (are you missing a using directive or an assembly reference?) [C:\code\carbon-aware-sdk\samples
\lib-integration\ConsoleApp\ConsoleApp.csproj]
C:\code\carbon-aware-sdk\samples\lib-integration\ConsoleApp\Program.cs(2,7): error CS0246: The type or namespace name '
GSF' could not be found (are you missing a using directive or an assembly reference?) [C:\code\carbon-aware-sdk\samples
\lib-integration\ConsoleApp\ConsoleApp.csproj]
C:\code\carbon-aware-sdk\samples\lib-integration\ConsoleApp\Program.cs(3,7): error CS0246: The type or namespace name '
GSF' could not be found (are you missing a using directive or an assembly reference?) [C:\code\carbon-aware-sdk\samples
\lib-integration\ConsoleApp\ConsoleApp.csproj]

The build failed. Fix the build errors and run again.

Code of Conduct

gfmatthews commented 1 year ago

@Lybecker - Seems like this is something to do with a misconfigured reference in the csproj of that example. As that example isn't actively in use in the library, this, shouldn't be a showstopper but it's still annoying and we should fix it.

Marking this as approved.

juzuluag commented 1 year ago

After talking to @pritipath , this is not a bug. It was by design. Please refer to the documentation on how to build and run the ConsoleApp

Lybecker commented 1 year ago

Okay. For ease of use for the consumer, I would expect to be able to compile and execute the code right away. If you do not include the project reference, make it very clear which assembly to link to

juzuluag commented 1 year ago

Sounds good. We will enhance the current documentation. Thanks for the feedback.