skip to Main Content

I have just installed the new version of Visual Studio Community Edition (version 17.6.2). Now, I have a project with a Console application project in NET7. Usually I can run this console application and it runs in a normal shell window.

After the upgrade, the Console Application requires WSL (Windows Subsystem for Linux). Why? Now, Visual Studio shows an error popup message:

enter image description here

Click on OK, it opens the Microsoft Store and I click on Debian.

enter image description here

After few seconds, in the PowerShell window I get this message

WslRegisterDistribution failed with error: 0x80370114

Error: 0x80370114 The operation could not be started because a required feature is not installed.

enter image description here

So, I open a new PowerShell window and I try to install manually a Linux distribution using

wsl --list
wsl --list --online
wsl --install Ubuntu-22.04

but again I get the same error.

enter image description here

This is the project properties

enter image description here

First question: why I can’t run the console application as usual? An then, why do I need WSL (that I have installed any way)? How can I fix the issue?

Update

If in the property of the project I select as target OS Windows, the application is still running in the Output window. Basically, Visual Studio doesn’t open a prompt window to run the application.

enter image description here

Options

The Terminal under Environment in the Options has as default Developer PowerShell.

enter image description here

2

Answers


  1. Hi the error message indicates that you didn’t install/enable wsl successfully.

    In order to fix the error WslRegisterDistribution failed with error: 0x80370114
    You need to turn on the windows feature "Virtual Machine Platform".

    Login or Signup to reply.
  2. Locate the file launchSettings.json that is placed under your project folder, in sub-folder "Properties".

    Then edit the file and remove the following bunch of lines:

    > "WSL": {
    >       "commandName": "WSL2",
    >       "distributionName": ""
    >     },
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search