В visual studio 2019 нет c
If you haven't downloaded and installed Visual Studio and the Microsoft C/C++ tools yet, here's how to get started.
Visual Studio 2022 Installation
Welcome to Visual Studio 2022! In this version, it's easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact.
Want to know more about what else is new in this version? See the Visual Studio release notes.
Ready to install? We'll walk you through it, step-by-step.
Step 1 - Make sure your computer is ready for Visual Studio
Before you begin installing Visual Studio:
Check the system requirements. These requirements help you know whether your computer supports Visual Studio 2022.
Apply the latest Windows updates. These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio.
Reboot. The reboot ensures that any pending installs or updates don't hinder the Visual Studio install.
Free up space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app.
For questions about running previous versions of Visual Studio side by side with Visual Studio 2022, see the Visual Studio 2022 Platform Targeting and Compatibility page.
Step 2 - Download Visual Studio
Next, download the Visual Studio bootstrapper file. To do so, choose the following button to go to the Visual Studio download page. Select the edition of Visual Studio that you want and choose the Free trial or Free download button.
Step 3 - Install the Visual Studio installer
Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio.
From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:
- vs_community.exe for Visual Studio Community
- vs_professional.exe for Visual Studio Professional
- vs_enterprise.exe for Visual Studio Enterprise
If you receive a User Account Control notice, choose Yes to allow the bootstrapper to run.
We'll ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement. Choose Continue.
Step 4 - Choose workloads
After the installer is installed, you can use it to customize your installation by selecting the workloads, or feature sets, that you want. Here's how.
Find the workload you want in the Installing Visual Studio screen.
For core C and C++ support, choose the "Desktop development with C++" workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control.
Additional workloads support other kinds of development. For example, choose the "Universal Windows Platform development" workload to create apps that use the Windows Runtime for the Microsoft Store. Choose "Game development with C++" to create games that use DirectX, Unreal, and Cocos2d. Choose "Linux development with C++" to target Linux platforms, including IoT development.
The Installation details pane lists the included and optional components installed by each workload. You can select or deselect optional components in this list. For example, to support development by using the Visual Studio 2017 or 2015 compiler toolsets, choose the MSVC v141 or MSVC v140 optional components. You can add support for MFC, the experimental Modules language extension, IncrediBuild, and more.
After you choose the workload(s) and optional components you want, choose Install.
Next, status screens appear that show the progress of your Visual Studio installation.
At any time after installation, you can install workloads or components that you didn't install initially. If you have Visual Studio open, go to Tools > Get Tools and Features. which opens the Visual Studio Installer. Or, open Visual Studio Installer from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose Modify.
Step 5 - Choose individual components (Optional)
If you don't want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the Individual components tab. Choose what you want, and then follow the prompts.
Step 6 - Install language packs (Optional)
By default, the installer program tries to match the language of the operating system when it runs for the first time. To install Visual Studio in a language of your choosing, choose the Language packs tab from the Visual Studio Installer, and then follow the prompts.
Change the installer language from the command line
Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: vs_installer.exe --locale en-US . The installer will remember this setting when it's run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr.
Step 7 - Change the installation location (Optional)
You can reduce the installation footprint of Visual Studio on your system drive. You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest.
You can select a different drive only when you first install Visual Studio. If you've already installed it and want to change drives, you must uninstall Visual Studio and then reinstall it.
Step 8 - Start developing
After Visual Studio installation is complete, choose the Launch button to get started developing with Visual Studio.
On the start window, choose Create a new project.
In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workload(s) that you chose during installation. To see different templates, choose different workloads.
You can also filter your search for a specific programming language by using the Language drop-down list. You can filter by using the Platform list and the Project type list, too.
Visual Studio opens your new project, and you're ready to code!
Visual Studio 2019 Installation
Welcome to Visual Studio 2019! In this version, it's easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact.
Want to know more about what else is new in this version? See the Visual Studio release notes.
Ready to install? We'll walk you through it, step-by-step.
Step 1 - Make sure your computer is ready for Visual Studio
Before you begin installing Visual Studio:
Check the system requirements. These requirements help you know whether your computer supports Visual Studio 2019.
Apply the latest Windows updates. These updates ensure that your computer has both the latest security updates and the required system components for Visual Studio.
Reboot. The reboot ensures that any pending installs or updates don't hinder the Visual Studio install.
Free up space. Remove unneeded files and applications from your %SystemDrive% by, for example, running the Disk Cleanup app.
For questions about running previous versions of Visual Studio side by side with Visual Studio 2019, see the Visual Studio 2019 Platform Targeting and Compatibility page.
Step 2 - Download Visual Studio
Next, download the Visual Studio bootstrapper file. To do so, choose the following button to go to the Visual Studio download page. Choose the Download button, then you can select the edition of Visual Studio that you want.
Step 3 - Install the Visual Studio installer
Run the bootstrapper file you downloaded to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio.
From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:
- vs_community.exe for Visual Studio Community
- vs_professional.exe for Visual Studio Professional
- vs_enterprise.exe for Visual Studio Enterprise
If you receive a User Account Control notice, choose Yes to allow the bootstrapper to run.
We'll ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement. Choose Continue.
Step 4 - Choose workloads
After the installer is installed, you can use it to customize your installation by selecting the workloads, or feature sets, that you want. Here's how.
Find the workload you want in the Installing Visual Studio screen.
For core C and C++ support, choose the "Desktop development with C++" workload. It comes with the default core editor, which includes basic code editing support for over 20 languages, the ability to open and edit code from any folder without requiring a project, and integrated source code control.
Additional workloads support other kinds of development. For example, choose the "Universal Windows Platform development" workload to create apps that use the Windows Runtime for the Microsoft Store. Choose "Game development with C++" to create games that use DirectX, Unreal, and Cocos2d. Choose "Linux development with C++" to target Linux platforms, including IoT development.
The Installation details pane lists the included and optional components installed by each workload. You can select or deselect optional components in this list. For example, to support development by using the Visual Studio 2017 or 2015 compiler toolsets, choose the MSVC v141 or MSVC v140 optional components. You can add support for MFC, the experimental Modules language extension, IncrediBuild, and more.
After you choose the workload(s) and optional components you want, choose Install.
Next, status screens appear that show the progress of your Visual Studio installation.
At any time after installation, you can install workloads or components that you didn't install initially. If you have Visual Studio open, go to Tools > Get Tools and Features. which opens the Visual Studio Installer. Or, open Visual Studio Installer from the Start menu. From there, you can choose the workloads or components that you wish to install. Then, choose Modify.
Step 5 - Choose individual components (Optional)
If you don't want to use the Workloads feature to customize your Visual Studio installation, or you want to add more components than a workload installs, you can do so by installing or adding individual components from the Individual components tab. Choose what you want, and then follow the prompts.
Step 6 - Install language packs (Optional)
By default, the installer program tries to match the language of the operating system when it runs for the first time. To install Visual Studio in a language of your choosing, choose the Language packs tab from the Visual Studio Installer, and then follow the prompts.
Change the installer language from the command line
Another way that you can change the default language is by running the installer from the command line. For example, you can force the installer to run in English by using the following command: vs_installer.exe --locale en-US . The installer will remember this setting when it's run the next time. The installer supports the following language tokens: zh-cn, zh-tw, cs-cz, en-us, es-es, fr-fr, de-de, it-it, ja-jp, ko-kr, pl-pl, pt-br, ru-ru, and tr-tr.
Step 7 - Change the installation location (Optional)
You can reduce the installation footprint of Visual Studio on your system drive. You can choose to move the download cache, shared components, SDKs, and tools to different drives, and keep Visual Studio on the drive that runs it the fastest.
You can select a different drive only when you first install Visual Studio. If you've already installed it and want to change drives, you must uninstall Visual Studio and then reinstall it.
Step 8 - Start developing
After Visual Studio installation is complete, choose the Launch button to get started developing with Visual Studio.
On the start window, choose Create a new project.
In the search box, enter the type of app you want to create to see a list of available templates. The list of templates depends on the workload(s) that you chose during installation. To see different templates, choose different workloads.
You can also filter your search for a specific programming language by using the Language drop-down list. You can filter by using the Platform list and the Project type list, too.
Visual Studio opens your new project, and you're ready to code!
Visual Studio 2017 Installation
In Visual Studio 2017, it's easy to choose and install just the features you need. And because of its reduced minimum footprint, it installs quickly and with less system impact.
Prerequisites
A broadband internet connection. The Visual Studio installer can download several gigabytes of data.
A computer that runs Microsoft Windows 7 or later versions. We recommend the latest version of Windows for the best development experience. Make sure that the latest updates are applied to your system before you install Visual Studio.
Enough free disk space. Visual Studio requires at least 7 GB of disk space, and can take 50 GB or more if many common options are installed. We recommend you install it on your C: drive.
For details on the disk space and operating system requirements, see Visual Studio Product Family System Requirements. The installer reports how much disk space is required for the options you select.
Download and install
To download the latest Visual Studio 2017 installer for Windows, go to the Microsoft Visual Studio Older downloads page. Expand the 2017 section, and choose the Download button.
The Community edition is for individual developers, classroom learning, academic research, and open source development. For other uses, install Visual Studio 2017 Professional or Visual Studio 2017 Enterprise.
Find the installer file you downloaded and run it. The downloaded file may be displayed in your browser, or you may find it in your Downloads folder. The installer needs Administrator privileges to run. You may see a User Account Control dialog asking you to give permission to let the installer make changes to your system; choose Yes. If you're having trouble, find the downloaded file in File Explorer, right-click on the installer icon, and choose Run as Administrator from the context menu.
The installer presents you with a list of workloads, which are groups of related options for specific development areas. Support for C++ is now part of optional workloads that aren't installed by default.
For C and C++, select the Desktop development with C++ workload and then choose Install.
When the installation completes, choose the Launch button to start Visual Studio.
The first time you run Visual Studio, you're asked to sign in with a Microsoft Account. If you don't have one, you can create one for free. You must also choose a theme. Don't worry, you can change it later if you want to.
It may take Visual Studio several minutes to get ready for use the first time you run it. Here's what it looks like in a quick time-lapse:
Visual Studio starts much faster when you run it again.
When Visual Studio opens, check to see if the flag icon in the title bar is highlighted:
If it's highlighted, select it to open the Notifications window. If there are any updates available for Visual Studio, we recommend you install them now. Once the installation is complete, restart Visual Studio.
Visual Studio 2015 Installation
To install Visual Studio 2015, go to the Microsoft Visual Studio Older downloads page. Expand the 2015 section, and choose the Download button. Run the downloaded setup program and choose Custom installation and then choose the C++ component. To add C and C++ support to an existing Visual Studio 2015 installation, click on the Windows Start button and type Add Remove Programs. Open the program from the results list and then find your Visual Studio 2015 installation in the list of installed programs. Double-click it, then choose Modify and select the Visual C++ components to install.
In general, we highly recommend that you use the latest version of Visual Studio even if you need to compile your code using the Visual Studio 2015 compiler. For more information, see Use native multi-targeting in Visual Studio to build old projects.
When Visual Studio is running, you're ready to continue to the next step.
Эта документация для разработчиков применима к Visual Studio 2022. Чтобы ознакомиться с документацией по предпочтительной версии Visual Studio, используйте селектор Версия. Он находится в верхней части оглавления на этой странице.
Если вы ищете Распространяемый компонент Microsoft Visual C++, чтобы можно было запустить программу, ознакомьтесь с последними поддерживаемыми версиями Visual C++.
Эта документация для разработчиков применима к Visual Studio 2019. Чтобы ознакомиться с документацией по предпочтительной версии Visual Studio, используйте селектор Версия. Он находится в верхней части оглавления на этой странице.
Если вы ищете Распространяемый компонент Microsoft Visual C++, чтобы можно было запустить программу, ознакомьтесь с последними поддерживаемыми версиями Visual C++.
Эта документация для разработчиков применима к Visual Studio 2017. Чтобы ознакомиться с документацией по предпочтительной версии Visual Studio, используйте селектор Версия. Он находится в верхней части оглавления на этой странице.
Если вы ищете Распространяемый компонент Microsoft Visual C++, чтобы можно было запустить программу, ознакомьтесь с последними поддерживаемыми версиями Visual C++.
Эта документация для разработчиков применима к Visual Studio 2015. Чтобы ознакомиться с документацией по предпочтительной версии Visual Studio, используйте селектор Версия. Он находится в верхней части оглавления на этой странице.
Если вы ищете Распространяемый компонент Microsoft Visual C++, чтобы можно было запустить программу, ознакомьтесь с последними поддерживаемыми версиями Visual C++.
Visual Studio 2015, 2017, 2019 и 2022 можно установить параллельно. С помощью Visual Studio 2019 (набор средств компилятора версии 142) или Visual Studio 2017 (набор средств компилятора версии 141) можно редактировать и компилировать программы, используя набор средств из Visual Studio 2017 (версия 141) и Visual Studio 2015 (версия 140).
Новые возможности C++ в Visual Studio
Новые возможности C++ в версиях Visual Studio с 2003 по 2015
Новые возможности C++ для каждой версии Visual Studio с 2003 до 2015.
Улучшения соответствия C++ в Visual Studio
Сведения об улучшениях соответствия C++ в Visual Studio.
Соответствие стандартам языка Microsoft C/C++
Находите сведения о состоянии соответствия языка на уровне функций в компиляторе MSVC по версии Visual Studio.
Журнал изменений Microsoft C/C++ в версиях с 2003 по 2015
Ознакомьтесь с критическими изменениями в предыдущих версиях.
Установка Visual Studio С++ и обновление с более ранних версий
Установка поддержки С++ в Visual Studio
Скачайте Visual Studio и установите набор инструментов Microsoft C/C++.
Руководство по переносу и обновлению Microsoft C++
Руководство по переносу кода и обновлению проектов до Visual Studio 2015 или более поздней версии, чтобы воспользоваться преимуществами лучшего соответствия компилятора стандарту C++, а также ускоренной компиляцией и функциями безопасности, например устранение рисков Spectre.
Поддерживаемые платформы
Узнайте, какие платформы поддерживаются компилятором Microsoft C/C++.
Обучение работе с С++ с использованием Visual Studio
Возвращение к C++
Дополнительные сведения о современных методах программирования на C++ на основе C ++ 11 и более поздних версий для написания быстродействующего и безопасного кода и исключения многих типичных ошибок программирования в стиле C.
Стандартный C++
Дополнительные сведения о C++, обзор современного C++ и ссылки на книги, статьи, обсуждения и данные о событиях
Примеры кода Visual Studio C++
Сведения о примерах кода C++, предоставленных корпорацией Майкрософт.
Средства разработки Visual Studio C/C++
Общие сведения о разработке на C++ в Visual Studio
Использование интегрированной среды разработки Visual Studio для создания проектов, редактирования кода, создания ссылок на библиотеки, компиляции, отладки, создания модульных тестов, выполнения статического анализа, развертывания и многого другого.
Проекты и системы сборки
Как создать и настроить проекты Visual Studio C++, проекты CMake и другие типы проектов с помощью компилятора MSVC и параметров компоновщика.
Написание и рефакторинг кода C++
Как использовать функции производительности в редакторе C++ для рефакторинга, понимания и написания кода и перемещения по нему.
Отладка машинного кода
Сведения об использовании отладчика Visual Studio с проектами C++.
Общие сведения об анализе кода в C/C++
Используйте заметки SAL или средства проверки C++ Core Guidelines для выполнения статического анализа.
Написание модульных тестов для C/C++ в Visual Studio
Создание модульных тестов с помощью платформы модульного тестирования Майкрософт для C++, Google Test, Boost.Test или CTest.
Создание приложений C/C++ с использованием Visual Studio
Классические приложения (C++)
Сведения о создании классических приложений с машинным кодом на C++ для Windows.
Универсальные приложения Windows (C++)
Руководства и справочные материалы в Центре разработчика Windows. Сведения о разработке приложений UWP см. в разделах Введение в универсальную платформу Windows и Создание первого приложения UWP на C++.
Программирование для Linux
Интегрированная среда разработки Visual Studio позволяет написать код и развернуть его на удаленном компьютере с ОС Linux для компиляции с помощью GCC.
Создание библиотек DLL C/C++ в Visual Studio
Использование Win32, ATL и MFC для создания классических библиотек DLL для Windows, а также сведения о компиляции и регистрации библиотеки DLL.
Параллельное программирование
Использование библиотеки параллельных шаблонов, C++ AMP, OpenMP и других компонентов, связанных с многопоточностью в Windows.
Лучшие методики обеспечения безопасности
Защита приложений от вредоносного кода и несанкционированного использования.
Облачное и веб-программирование
В C++ имеются несколько параметров для соединения с веб-узлом и облаком.
Доступ к данным
Подключение к базам данных через ODBC и OLE DB.
Текст и строки
Подробнее о работе с другими форматами текста и строк и кодировках для локальных и международных разработок.
Справочник по языку C++
Справочник по языку C++
Справочное руководство по языку программирования C++ в реализации Майкрософт.
Справочник по языку C
Справочное руководство по языку программирования C в реализации Майкрософт.
Справочник по препроцессору в C/C++
Общий справочник по препроцессору, который используется для языков C и C++.
Справочник по языку C++/CX
Справочное руководство по расширениям Microsoft для языка C++ для создания приложений универсальной платформы Windows C++, компонентов среды выполнения Windows C++, которые могут использоваться приложениями Windows на основе JavaScript, а также игр Windows DirectX и приложений с интенсивным использованием графики.
Справочник по языку C++/CLI
Стандарт ECMA для языка программирования C++/CLI.
Внутренние объекты компилятора и язык ассемблера
Руководства по встроенным функциям компилятора, которые поддерживаются или реализованы в компиляторах Microsoft C/C++ для каждой платформы.
Библиотеки C/C++, доступные в Visual Studio
В следующих разделах приведены сведения о различных библиотеках C и C++, включенных в Visual Studio.
Справочник по библиотеке времени выполнения C
Включает альтернативы с улучшенной безопасностью для функций, которые, как известно, могут представлять угрозу безопасности.
Библиотеки Microsoft Foundation Class (MFC)
Поддержка создания классических приложений с традиционными пользовательскими интерфейсами или интерфейсами в стиле Office.
Библиотека параллельных шаблонов
Асинхронные и параллельные алгоритмы, выполняемые в ЦП.
Библиотека шаблонов среды выполнения Windows (WRL)
Приложения и компоненты универсальной платформы Windows (UWP).
Использование сторонних библиотек С++ с открытым кодом в Visual Studio
Кроссплатформенная программа командной строки vcpkg значительно упрощает обнаружение и установку более чем 900 библиотек C++ с открытым исходным кодом. Дополнительные сведения см. на странице о vcpkg.
Visual Studio С++ — отзывы и сообщество
Как сообщить о проблеме с набором инструментов Microsoft C/C++
Узнайте о создании эффективных отчетов об ошибках с использованием набора инструментов Microsoft C/C++ (компилятора, компоновщика или других средств) и информация о способах отправки отчета.
Блог группы разработчиков по C++ (Майкрософт)
Описание новых возможностей и актуальная информация от разработчиков инструментов C++ в Visual Studio.
Сообщество разработчиков Visual Studio (C++)
Получите помощь, сообщите об ошибках или оставьте предложения по использованию C++ в Visual Studio.
Support for C11 and C17 standards requires Visual Studio 2019 version 16.8 or later. To see the documentation for this version, set the Visual Studio Version selector control for this article to Visual Studio 2019. It's found at the top of the table of contents on this page.
Support for C11 and C17 standards is available in Visual Studio 2019 version 16.8 and later. Support requires an updated Universal C Runtime (UCRT) and Windows SDK version to work properly with the conforming preprocessor ( /Zc:preprocessor ).
Windows SDK releases correspond with Windows OS releases. C11 and C17 support requires Windows SDK 10.0.20348.0 (version 2104) or later. The Windows SDK is an installable option in the Individual Components tab in the Visual Studio Installer. You can follow these steps to set up the latest SDK and build C11 or C17 code in Visual Studio or at the command line.
Prerequisites
Visual Studio 2019 version 16.8 or later and Windows SDK 10.0.20348.0 (version 2104) or later installed and running on your computer. We recommend you use the latest version available for the best support.
If Visual Studio isn't installed yet, see Install C++ support in Visual Studio for installation instructions. In the install, include the Desktop development with C++ workload. Then, open the Individual Components tab. Select Windows 10 SDK (10.0.20348.0) or later, or the latest Windows 11 SDK.
If Visual Studio is already installed, but you don't have the required Windows SDK, open the Visual Studio Installer. Choose Modify next to your version of Visual Studio to install the selected components. Open the Individual Components tab. Select Windows 10 SDK (10.0.20348.0) or later, or the latest Windows 11 SDK. Choose Modify to install the selected components.
When installation completes, open Visual Studio.
Configure C11 or C17 mode in Visual Studio
In Visual Studio, open a new or existing C project, then open your project's Property Pages dialog.
Set the project to use the Windows SDK you just installed. On the Configuration Properties > General page, set the Windows SDK Version property either to 10.0 (latest installed version), or to the specific SDK version you installed.
You'll also see a C-specific option: C Language Standard. Set this property to ISO C11 Standard ( /std:c11 ) or ISO C17 (2018) Standard ( /std:c17 ).
The C++ Language Standard property is used when the language is C++. It's the default when the file extension is .cpp . The C Language Standard property version is used when the language is C. It's the default when the file extension is .c . To build using C11 or C17, put your source code in a .c file, or set the code to compile as C. You can set this property for your project on the Configuration Properties > C/C++ > Advanced page. Set the Compile As property to Compile as C code (/TC).
Congratulations, you've set up everything you need to build C11 and C17 code in Visual Studio!
Для разработки программ на языке c++ вы можете использовать среду разработки Visual Studio Code (VSCode).
Сегодня мы рассмотрим установку поддержки языка программирования с++ в этой IDE.
Выбор компилятора
Перед установкой расширения для поддержки с++ в VSCode нам нужно сначала определиться какой компилятор использовать.
Под Windows существует несколько возможностей:
- Вы можете использовать Windows Subsystem for Linux (WSL) и установив в виртуальной машине все необходимые пакеты компилировать программы с помощью специального расширения для VSCode.
- Вы можете установить MinGW или MSYS2 и использовать их компиляторы.
- Вы можете установить компилятор Microsoft C++ compiler (MSVC)
Сегодня мы рассмотрим самый простой способ – установку Microsoft C++ compiler (MSVC).
Установка Microsoft C++ compiler (MSVC)
Для начала скачаем установщик по ссылке:
Скачиваем файл, в моем случае он называется:
Запускаем, откроется окно:
Будет запущена консоль разработчика:
Компилятор успешно установлен и доступен.
Теперь пришло время установить расширение для поддержки с++ в VSCode.
Установка расширения для поддержки С++ в VSCode
Откроется панель Extensions: Marketplace – это каталог, из которого мы можем скачать все необходимые расширения и темы, достаточно знать их название.
Выберите указанный пункт и нажмите install
Будет начато скачивание дополнительных компонентов. После окончания загрузок расширение будет готово к использованию.
Настройка VSCode для использования компилятора MSVC
Для того, чтобы протестировать работу компилятора создадим тестовый проект.
Для нормального функционирования компилятора MSVC нужно установить несколько переменных окружения. Чтобы упростить задачу воспользуемся Visual Studio 2019 Developer Command Prompt.
Запустите его из меню Пуск введя слово developer, откроется консоль:
Создадим данную папку и перейдем в нее:
Создадим папку для проекта test
Запустим VSCode из этой папки
Откроется окно VSCode
Обратите внимание наша папка уже открыта.
Добавим новый файл для этого нажмите на кнопку:
Настройка компилятора для проекта
Теперь у нас есть программа, осталось её скомпилировать, давайте настроим задачу сборки для проекта.
Всем привет! Сегодня мы рассмотрим новую версию среды программирования от компании Microsoft — Visual Studio 2019. Вы узнаете, что нового появилось в этой версии, в каких редакциях она выпускается, какие системные требования необходимо выполнить для ее установки, где скачать Visual Studio, а также мы подробно разберем процесс установки Visual Studio 2019 в редакции Community на операционную систему Windows 10, и даже создадим и запустим свой первый тестовый проект.
Обзор Visual Studio 2019
Visual Studio – это интегрированная среда разработки (IDE) от компании Microsoft.
С помощью Visual Studio можно разрабатывать:
- Классические приложения для компьютера под управлением операционной системы Windows;
- Мобильные приложения (Windows, iOS, Android);
- Web-приложения;
- Облачные приложения;
- Различные расширения для Office, SharePoint, а также создание собственных расширений для Visual Studio;
- Игры;
- Базы данных SQL Server и SQL Azure.
Редакции Visual Studio 2019
Актуальной на текущий момент является версия Visual Studio 2019, выпускается она в следующих редакциях:
- Community – бесплатная версия среды разработки Visual Studio. Чтобы ее использовать, необходимо создать учетную запись Visual Studio, в противном случае она будет действовать 30 дней. Редакция имеет меньший функционал по сравнению с платными редакциями, однако она включает все необходимое для создания полноценных приложений. Походит для индивидуальных разработчиков и обучения;
- Professional – редакция содержит профессиональные инструменты для разработки приложений. Функционал в этой редакции все равно не полный, например, это заметно в части инструментов диагностики, отладки и тестирования. Подходит для небольших групп разработчиков;
- Enterprise – полнофункциональная версия Visual Studio. Комплексное решение для разработки приложений. Подходит для групп любого размера с высокими требованиями к качеству и масштабу.
Системные требования Visual Studio 2019
Среду Visual Studio 2019 можно установить и работать в ней на следующих операционных системах (перечислены официально поддерживаемые версии):
-
;
- Windows 8.1 (с обновлением 2919355); (1703 и выше);
- Windows Server 2012 R2 (с обновлением 2919355);
- Windows Server 2016 (Standard и Datacenter); (Standard и Datacenter).
Минимальные требования к оборудованию:
- Процессор с тактовой частотой не ниже 1,8 ГГц. Рекомендуется использовать как минимум двухъядерный процессор;
- 2 ГБ оперативной памяти, рекомендуется 8 ГБ (если устанавливать на виртуальную машину, то минимум 2.5 ГБ);
- Свободного места на жестком диске от 800 мегабайт до 210 гигабайт, в зависимости от установленных компонентов. В большинстве случаев выделяйте как минимум 30 гигабайт, например, я устанавливал всего несколько компонентов, и у меня заняло более 20 ГБ места на жестком диске. Также Microsoft рекомендует устанавливать Visual Studio на SSD диск, я как раз устанавливал на SSD (на своем ноутбуке), скорость работы Visual Studio меня, конечно, порадовала;
- Видеоадаптер с минимальным разрешением 1280 на 720 пикселей (для оптимальной работы Visual Studio рекомендуется разрешение 1366 на 768 пикселей и более высокое).
Дополнительные важные моменты:
Что нового в Visual Studio 2019?
Новых возможностей в среде Visual Studio 2019 появилось очень много, я перечислю только небольшую часть:
- Новый интерфейс создания проектов;
- Новые возможности установки обновлений – теперь можно выбрать способ установки обновлений Visual Studio и полностью контролировать его («Сервис -> Параметры»), а также обновления Visual Studio загружаются в фоновом режиме, только когда компьютер бездействует;
- Доступна совместная работа с другими пользователями с помощью среды Visual Studio Live Share, которая устанавливается по умолчанию;
- Переработан интерфейс среды, в частности увеличено вертикальное пространство для кода;
- Добавлен вид расширения: «Бесплатное», «Платное» и «Пробная версия» – теперь гораздо легче распознать версию расширения, также добавлены соответствующие теги, для более удобного поиска;
- Система управления версиями – теперь можно временно сохранить изменения, чтобы работать над другими задачами, это возможно благодаря поддержке временного хранилища Git средствами Git в Team Explorer;
- Очистка кода одним щелчком – теперь отреагировать на предупреждения и рекомендации среды можно одним нажатием кнопки;
- Усовершенствованный поиск – теперь поиск выдает более точные результаты (а также поиск стал возможен в окнах отладки);
- Индикатор хода выполнения сборки – теперь мы можем наблюдать более подробные сведения о ходе выполнения сборки, полезно, если проект крупный и на его сборку затрачивается много времени.
Более подробно посмотреть все нововведения можете на официальной странице – Заметки о выпуске Visual Studio 2019.
Где скачать Visual Studio 2019 Community?
С главной страницы официального сайта также возможно загрузить Visual Studio 2019 Community, только в этом случае необходимо выбрать нужную редакцию.
Платные редакции Professional и Enterprise Вы также можете скачать для тестирования, т.е. они имеют 90-дневную пробную версию.
В результате у Вас должна загрузиться программа установщик vs_Community.exe.
Установка Visual Studio 2019 Community на Windows 10
Перед тем как переходить к установке Visual Studio 2019, хотелось бы еще раз отметить, что для того чтобы установить хотя бы пару компонентов (рабочих нагрузок), потребуется достаточно много места на жестком диске (10-20 гигабайт), а если установить больше 2-3 компонентов, то объем может достигать и сотни гигабайт, у меня установка Visual Studio 2019 заняла более 20 ГБ места на жестком диске.
Хорошо, что установщик в 2019 версии Visual Studio (который появился в 2017 версии, но в 2019 он улучшен) позволяет выбрать только те компоненты, которые нужны нам для создания нашего приложения, например, если нам нужно разработать web-приложения, устанавливать рабочие нагрузки для создания классических приложений не требуется, тем самым мы можем экономить место на жестком диске.
Также в случае необходимости мы всегда можем удалить ненужные нам компоненты.
Шаг 1 – Запускаем установщик
Запускаем скаченный установщик, т.е. файл vs_Community.exe.
Сначала установщику необходимо выполнить подготовительные действия, нажимаем «Продолжить», тем самым мы также соглашаемся с условиями лицензионного соглашения.
После чего загрузятся и установятся необходимые файлы установщика.
Шаг 2 – Выбор компонентов, настройка установки
После того как установщик выполнит все необходимые предварительные мероприятия, он запустится. Теперь нам нужно выбрать «Рабочие нагрузки», т.е. что мы будем создавать с помощью Visual Studio 2019 Community, я выбрал разработку как классических приложений под компьютер, так и разработку Web-приложений.
В принципе после этого можно сразу нажимать «Установить», но в случае необходимости Вы можете более детально настроить установку, для этого есть дополнительные вкладки: «Отдельные компоненты», «Языковые пакеты» и «Расположения установки».
Вкладка «Отдельные компоненты» – если есть такая необходимость, Вы можете конкретизировать компоненты, которые необходимо установить, на этой вкладке.
Вкладка «Языковые пакеты» – по умолчанию установлен язык, соответствующий языку системы, но, если Вам нужен другой, Вы можете изменить его на данной вкладке.
Вкладка «Расположения установки» – здесь Вы можете изменить каталог, в который будет установлена среда Visual Studio.
Шаг 3 – Процесс установки и его завершение
После того как Вы нажали кнопку установить, начнется процесс загрузки и установки всех выбранных компонентов. В зависимости от объема компонентов, скорости интернета и характеристик ПК продолжительность данного процесса будет различаться, специально я не засекал, но мне кажется, он у меня длился минут 20-30.
Когда появится следующее окно, установка будет завершена, нажимаем «Перезагрузить».
Создание нового проекта в Visual Studio Community 2019, и запуск первой программы
Теперь я предлагаю запустить Visual Studio Community 2019, и посмотреть, как она выглядит, и для примера давайте даже создадим проект программы, и запустим его на выполнение.
При первом запуске нам предлагают войти в учетную запись, если она есть, то входите, если нет, Вы можете ее создать прямо сейчас, также возможно отложить создание учетной записи, для этого просто нажимайте кнопку «Не сейчас! Возможно, позже.»
Затем выбирайте цветовую схему оформления среды Visual Studio и нажимайте «Запуск Visual Studio».
Далее, так как никаких проектов у нас еще нет, мы можем создать новый проект, или продолжить без кода и создать проект позднее.
Для примера я сразу создам проект.
В качестве шаблона проекта я выберу «Мастер классических приложений Windows».
Затем указываем название проекта и расположение файлов этого проекта.
Потом выбираем тип приложения и дополнительные параметры, если требуется. Я выберу «Классическое приложение», параметры оставлю по умолчанию. Нажимаем «ОК».
В итоге будет создан шаблон программы, включая код, который, кстати, будет подробно прокомментирован на русском языке, и все необходимые ресурсы, т.е. по факту шаблонная программа уже будет создана, и чтобы запустить ее, можете сразу нажать на кнопку «Локальный отладчик Windows», на панели инструментов.
В результате запустится программа, в которой даже будет меню.
Таким образом, Visual Studio может за нас сделать огромную часть работы, а нам останется только разработать нужный нам функционал, и включить его в эту шаблонную программу (конечно же, если речь идет о простых программах).
Видео-инструкция по установке Visual Studio 2019 Community
На этом мой обзор среды Visual Studio 2019 Community закончен, надеюсь, материал был Вам полезен, пока!
Читайте также: