zeroc-ice / ice-demos

Sample programs for Ice
https://zeroc.com
GNU General Public License v2.0
323 stars 217 forks source link

C# analyzer and formatting #215

Closed externl closed 3 months ago

externl commented 3 months ago

Still various things to fix:

I tried to add dotnet format as a separate workflow but it failed to restore packages.

Run dotnet format --verify-no-changes "csharp/C# NET demos.sln"
Unhandled exception: System.Exception: Restore operation failed.
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.OpenMSBuildWorkspaceAsync(String solutionOrProjectPath, WorkspaceType workspaceType, Boolean noRestore, Boolean requiresSemantics, String binaryLogPath, Boolean logWorkspaceWarnings, ILogger logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.FormatWorkspaceAsync(FormatOptions formatOptions, ILogger logger, CancellationToken cancellationToken, String binaryLogPath)
   at Microsoft.CodeAnalysis.Tools.FormatCommandCommon.FormatAsync(FormatOptions formatOptions, ILogger`1 logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.Commands.RootFormatCommand.FormatCommandDefaultHandler.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Error: Process completed with exit code 1.
pepone commented 3 months ago
Run dotnet format --verify-no-changes "csharp/C# NET demos.sln"
Unhandled exception: System.Exception: Restore operation failed.

Probably because we didn't install the 3.8.0-alpha package, and it cannot be found in any of the default repositories.