Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate with Kiota doesn't work on Visual Studio for Mac when using ZSH as default shell #497

Closed
christianhelle opened this issue Mar 10, 2023 · 1 comment
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@christianhelle
Copy link
Owner

Describe the bug
Generate with Kiota context menu doesn't work on Visual Studio for Mac 2022 when using ZSH as the default shell

To Reproduce
Steps to reproduce the behavior:

  1. Right click a project file, select Add -> New REST API Client -> Generate with Kiota
  2. Insert URL to Swagger Petstore v3 OpenAPI spec
  3. Wait for NuGet packages to be installed after a couple of project reloads

Expected behavior
A code behind file is generated for the newly added OpenAPI spec file

Screenshots
If applicable, add screenshots to help explain your problem.

Visual Studio Extension (please complete the following information):

  • Visual Studio Version: Visual Studio for Mac 2022
  • Extension Version: v1.7.2

Additional context
Add any other context about the problem here.

The tool outputs the following

Executing:
dotnet tool install --global Microsoft.OpenApi.Kiota --version 1.0.1
Tools directory '/Users/christian/.dotnet/tools' is not currently on the PATH environment variable.
If you are using zsh, you can add it to your profile by running the following command:

cat << \EOF >> ~/.zprofile
# Add .NET Core SDK tools
export PATH="$PATH:/Users/christian/.dotnet/tools"
EOF

And run `zsh -l` to make it available for current session.

You can only add it to the current session by running the following command:

export PATH="$PATH:/Users/christian/.dotnet/tools"

You can invoke the tool using the following command: kiota
Tool 'microsoft.openapi.kiota' (version '1.0.1') was successfully installed.

PROGRESS: 30%

PROGRESS: 40%
Executing:
kiota  generate -l CSharp -d ./Swagger.json -o /var/folders/6f/sxylb9b11ln1f9cbcyc6r9jh0000gn/T/fde34d26-ea98-449a-893e-fc93c31d47fb -n GeneratedCode
Error: An error occurred trying to start process 'kiota' with working directory '/Users/christian/projects/testapp'. No such file or directory
@christianhelle christianhelle added the bug Something isn't working label Mar 10, 2023
@christianhelle christianhelle self-assigned this Mar 10, 2023
@christianhelle christianhelle added this to In progress in Visual Studio for Mac Mar 17, 2023
@christianhelle christianhelle moved this from In progress to Done in Visual Studio for Mac Jun 12, 2024
@christianhelle christianhelle added the wontfix This will not be worked on label Jun 12, 2024
@christianhelle
Copy link
Owner Author

Visual Studio for Mac is a dying product and this is no longer relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
Development

No branches or pull requests

1 participant