You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to generate an AutoRest C# client from AutoRestClient.json, I get the following error:
(node:18000) ExperimentalWarning: The fs.promises API is experimental
TypeError: plainDirectives.flatMap is not a function
at ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Core.Generators.ProcessLauncher.StartInternal(String command, String arguments, Action`1 onOutputData, Action`1 onErrorData, String workingDirectory)
at ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Core.Generators.ProcessLauncher.Start(String command, String arguments, Action`1 onOutputData, Action`1 onErrorData, String workingDirectory)
at ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Core.Generators.ProcessLauncher.Start(String command, String arguments, String workingDirectory)
at ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Core.Generators.AutoRest.AutoRestCSharpCodeGenerator.OnGenerateCode(IProgressReporter pGenerateProgress)
at ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Core.Generators.AutoRest.AutoRestCSharpCodeGenerator.GenerateCode(IProgressReporter pGenerateProgress)
at ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.CustomTool.SingleFileCodeGenerator.Generate(String wszInputFilePath, String bstrInputFileContents, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, IVsGeneratorProgress pGenerateProgress)
Support Key: 14a9a75
Steps to reproduce
Visual Studio 2019 Enterprise Edition
Create a new C# library project which targets .net standard 2.0
Right-click on the project and select Add > New REST API Client > Generate with AutoRest
Enter URL of swagger.json
Enter Filename AutoRestClient
Click OK
I expected the client to get generated here, but it didn't.
The Output window indicated the "Microsoft.Azure.AutoRest.CSharp" nuget package installation failed.
I had to add this to my csproj to be able to build: <LangVersion>8.0</LangVersion>
Right-click on AutoRestClient.json and select "Run Custom Tool"
Error appeared in the Output window.
Expected behavior
I expected the REST API client class to be generated.
When I try to generate an AutoRest C# client from AutoRestClient.json, I get the following error:
Support Key:
14a9a75
Steps to reproduce
I expected the client to get generated here, but it didn't.
The Output window indicated the "Microsoft.Azure.AutoRest.CSharp" nuget package installation failed.
I had to add this to my csproj to be able to build:
<LangVersion>8.0</LangVersion>
Error appeared in the Output window.
Expected behavior
I expected the REST API client class to be generated.
Screenshots
Visual Studio Extension:
Additional context
Thank you!
Edit FYI, as a work-around, I'm now using https://devblogs.microsoft.com/aspnet/generating-http-api-clients-using-visual-studio-connected-services/ instead.
The text was updated successfully, but these errors were encountered: