简体   繁体   English

Visual Studio 未将 WSL 列为平台工具集

[英]Visual Studio Doesn't List WSL as Platform Toolset

I'm following this tutorial .我正在关注本教程 Everything seems to be fine (linux subsystem is setup fine, I think), but WSL is not showing up as a platform toolset for compilation for C/C++ projects.一切似乎都很好(我认为 linux 子系统的设置很好),但是 WSL 并没有作为用于编译 C/C++ 项目的平台工具集出现。 在此处输入图像描述

Using visual studio 16.9.5使用视觉工作室 16.9.5

You can check these steps, which can make me find windows subsystem for linux in visual studio:您可以检查这些步骤,这可以让我在 Visual Studio 中找到 linux 的 windows 子系统:

Enable subsystem:启用子系统:

  1. Enable windows subsystem for windows为 windows 启用 windows 子系统

    • Run powershell as administrator以管理员身份运行 powershell
    • Run this command: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart运行此命令: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. Restart machine重启机器

  3. download and install linux app下载并安装 linux 应用程序

Configure linux environment:配置linux环境:

  1. sudo apt-get update
  2. sudo apt install g++ gdb make rsync zip
  3. sudo apt-get install openssh-client
  4. sudo apt-get install nano
  5. sudo service ssh restart

Configure visual studio:配置视觉工作室:

  1. Add connection in Tools/Options/Cross Manager在工具/选项/交叉管理器中添加连接
  2. The windows subsystem will auto display in platform toolset windows 子系统将自动显示在平台工具集中在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将Visual Studio 2005的平台工具集添加到较新IDE版本的“Platform Toolset”列表中? - How can I add the platform toolset of Visual Studio 2005 into the `Platform Toolset` list of the newer IDE versions? Visual Studio cmake 目标平台和平台工具集 - Visual Studio cmake target platform and platform toolset Visual Studio 希望使用错误的平台工具集进行构建 - Visual Studio wants to build with wrong platform toolset Visual Studio 平台工具集与 Windows SDK - Visual studio platform toolset vs Windows SDK Visual Studio Platform工具集和运行时库 - Visual Studio Platform toolset and Runtime Library 什么是 Visual Studio 项目中的“平台工具集”设置 - What is "Platform Toolset" setting in visual studio project 使用VS 2010平台工具集时,Visual Studio 2013无法找到头文件 - Visual Studio 2013 can't located header files when using the VS 2010 platform toolset 使用Visual Studio 2012并使用较旧的平台工具集进行编译? - Use Visual Studio 2012 and compile with older platform toolset? 找不到 Visual Studio Platform 2015 工具集 ='v141' - Visual Studio Platform 2015 Toolset ='v141' cannot be found Visual Studio _MSC_VER与平台工具集 - Visual Studio _MSC_VER versus Platform Toolset
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM