Issue with setting up Q#: Command Line Project Templates in VS Code

55582465 1 Reputation point
2022-12-24T03:15:41.963+00:00

Hi,

I am having trouble installing the command line project templates for Q# in VS Code. I am following the instructions on Microsoft Learn, but I keep running into the following error. I checked the link in the error message, and I am still lost.

.NET Core SDK exited with code 106 when installing project templates: Microsoft.Quantum.ProjectTemplates::0.27.244707 could not be installed, no NuGet feeds are configured or they are invalid. For details on the exit code, refer to https://aka.ms/templating-exit-codes#106

Link to Microsoft Learn:

https://video2.skills-academy.com/en-us/training/modules/qsharp-create-first-quantum-development-kit/2-install-quantum-development-kit-code

Azure Quantum
Azure Quantum
An Azure service that provides quantum computing and optimization solutions.
65 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Arun Siripuram 801 Reputation points
    2022-12-24T06:00:33.513+00:00

    @55582465

    It looks like you are encountering an error when trying to install the Q# project templates for Visual Studio Code.

    To troubleshoot this issue, you can try the following steps:

    Make sure that you have the latest version of the .NET Core SDK installed on your machine. You can check the version by running the following command in a terminal:

    dotnet --version

    Check that the .NET Core CLI is correctly configured to use a package source that contains the Q# project templates. You can check the configured package sources by running the following command:

    dotnet nuget list source

    The Q# project templates should be available from the following package source:

    https://dotnet.myget.org/F/quantum-devkit/api/v3/index.json

    Installed Quantum Project Templates using VS Terminal

    dotnet new install Microsoft.Quantum.ProjectTemplates::0.27.244707

    After installation, run the following command in Terminal. Please refer the attached snapshot

    dotnet nuget list source

    If the issue persists, you can try resetting the package cache by running the following command:

    dotnet nuget locals all --clear

    This will delete all the packages that have been cached locally on your machine, which might resolve any issues with the package cache.

    If you are still encountering the error after trying these steps, you can try uninstalling and re-installing the Q# extension for Visual Studio Code. You can do this by going to the Extensions tab in Visual Studio Code, selecting the Q# extension, and clicking the "Uninstall" button. Then, you can install the Q# extension again by searching for "Q#" in the Extensions tab and clicking the "Install" button.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments