AutoRest failed with vscode-jsonrpc error: Message header must separate key and value using
Describe the bug
Please provide as much information as you can. This would be:
- OpenAPI files having the issues: the sample pets.json provided by autorest tutorial (https://raw.githubusercontent.com/Azure/autorest/master/docs/openapi/examples/pets.json)
- Autorest command used: autorest --input-file=pets.json --csharp --output-folder=sdk/ --namespace=pets
Expected behavior Autorest runs successfully and generates the client for the sample API.
Additional context I tried nodejs v12, v14, v15 and autorest all failed with the same error - not sure if it has anything to do with my setup?
Error:
autorest --input-file=pets.json --csharp --output-folder=sdk/ --namespace=pets AutoRest code generation utility [cli version: 3.0.6339; node: v12.20.2, max-memory: 2048 MB] (C) 2018 Microsoft Corporation. https://aka.ms/autorest NOTE: AutoRest core version selected from configuration: ~3.0.6298. Loading AutoRest core 'C:\Users\yashi.autorest@[email protected]\node_modules@autorest\core\dist' (3.0.6373) Loading AutoRest extension '@autorest/csharp' (latest->3.0.0-beta.20210211.1) Loading AutoRest extension '@autorest/modelerfour' (4.15.456->4.15.456) Unknown option: --roll-forward
C:\Users\yashi.autorest@[email protected]\node_modules@autorest\core\dist\vendors-common_temp_node_modules_pnpm_azure-tools_extension_3_1_272_node_modules_azure-tools_-78c196.js:85719
headers.forEach(function (header) {
^
Error: Message header must separate key and value using :
at C:\Users\yashi.autorest@[email protected]\node_modules@autorest\core\dist\vendors-common_temp_node_modules_pnpm_azure-tools_extension_3_1_272_node_modules_azure-tools_-78c196.js:85722:23
at Array.forEach (
Hi @bangbingsyb could you confirm the version of dotnet you have installed. I think the actual issue here is
Unknown option: --roll-forward
which is a flag used on the dotnet start command for the chsarp generator v3
Hi @bangbingsyb could you confirm the version of
dotnetyou have installed. I think the actual issue here isUnknown option: --roll-forwardwhich is a flag used on the dotnet start command for the chsarp generator v3
Awesome! Thanks for pointing out the root cause, @timotheeguerin . It was indeed a .NET core SDK version conflict. I resolved it by uninstalling the lower versions SDK. Thanks for your help!
hi @bangbingsyb, what are the versions used here, can you share?