Руководство по повышению производительности при работе в visual studioproductivity guide for visual studio

Содержание:

Скачать SSMSDownload SSMS

SSMS 18.7.1 является новейшей общедоступной (GA) версией SSMS.SSMS 18.7.1 is the latest general availability (GA) version of SSMS. Если у вас установлена предыдущая общедоступная версия SSMS 18, при установке SSMS 18.7.1 она будет обновлена.If you have a previous GA version of SSMS 18 installed, installing SSMS 18.7.1 upgrades it to 18.7.1.

Важно!

Начиная с версии SQL Server Management Studio (SSMS) 18.7, вместе с SSMS автоматически устанавливается Azure Data Studio.Beginning with SQL Server Management Studio (SSMS) 18.7, Azure Data Studio is automatically installed alongside SSMS. Средство Azure Data Studio теперь доступно пользователям SQL Server Management Studio со всеми его новыми возможностями и функциями.Users of SQL Server Management Studio are now able to benefit from the innovations and features in Azure Data Studio. Azure Data Studio — это кроссплатформенный инструмент с открытым кодом для настольных систем, предназначенный для работы в облачных, локальных или гибридных средах.Azure Data Studio is a cross-platform and open-source desktop tool for your environments, whether in the cloud, on-premises, or hybrid.

Дополнительные сведения см. в статьях Что такое Azure Data Studio? и Вопросы и ответы.To learn more about Azure Data Studio, check out What is Azure Data Studio or the FAQ.

  • Номер выпуска: 18.7.1Release number: 18.7.1
  • Номер сборки: 15.0.18358.0Build number: 15.0.18358.0
  • Дата выпуска: 27 октября 2020 г.Release date: October 27, 2020

Если у вас есть замечания и предложения или вы хотите сообщить о проблемах, обратитесь к команде разработчиков SSMS через пользовательские отзывы на SQL Server.If you have comments or suggestions, or you want to report issues, the best way to contact the SSMS team is at SQL Server user feedback.

При установке SSMS 18.x не обновляются и не заменяются версии SSMS 17.x или более ранние.The SSMS 18.x installation doesn’t upgrade or replace SSMS versions 17.x or earlier. Среда SSMS 18.x устанавливается параллельно с предыдущими версиями, поэтому обе версии остаются доступными для использования.SSMS 18.x installs side by side with previous versions, so both versions are available for use. Но если у вас установлена предварительная версия SSMS 18.x, перед установкой SSMS 18.7.1 ее необходимо удалить.However, if you have a preview version of SSMS 18.x installed, you must uninstall it before installing SSMS 18.7.1. Чтобы узнать, установлена ли у вас предварительная версия, перейдите в окно Справка > О программе .You can see if you have the preview version by going to the Help > About window.

Если на компьютере есть несколько параллельных установок SSMS, всегда проверяйте, правильную ли версию вы запускаете.If a computer contains side-by-side installations of SSMS, verify you start the correct version for your specific needs. Последняя версия называется Microsoft SQL Server Management Studio 18 .The latest version is labeled Microsoft SQL Server Management Studio 18

Примечание

Если вы открываете локализованную версию этой страницы и хотите просмотреть актуальные материалы, посетите эту страницу на версии сайта на языке US-English.If you are accessing this page from a non-English language version, and want to see the most up-to-date content, please visit the US-English version of the site. С версии сайта US-English вы можете скачать SSMS на других .You can download different languages from the US-English version site by selecting .

Шаг 3. Установка установщика Visual StudioStep 3 — Install the Visual Studio installer

Запустите файл начального загрузчика, чтобы установить Visual Studio Installer.Run the bootstrapper file to install the Visual Studio Installer. Новый установщик имеет меньший размер и включает все необходимое для установки и настройки Visual Studio.This new lightweight installer includes everything you need to both install and customize Visual Studio.

  1. В папке Загрузки дважды щелкните файл начального загрузчика, имя которого совпадает с именем одного из следующих файлов или похоже на них:From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:

    • vs_community.exe для Visual Studio Community.vs_community.exe for Visual Studio Community
    • vs_professional.exe для Visual Studio Professional;vs_professional.exe for Visual Studio Professional
    • vs_enterprise.exe для Visual Studio Enterprise;vs_enterprise.exe for Visual Studio Enterprise

    Если появляется оповещение системы контроля учетных записей, нажмите кнопку Да.If you receive a User Account Control notice, choose Yes.

  2. Мы попросим вас принять условия лицензии и заявление о конфиденциальности корпорации Майкрософт.We’ll ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement. Нажмите Продолжить.Choose Continue.

Список для однодневного похода

XamarinXamarin

  • Комплексный набор элементов управления xplatComprehensive set of xplat controls

    • Общедоступная версия AdaptiveTriggers/StateTriggers AdaptiveTriggers/StateTriggers GA
    • Карауселвиев Дж CarouselView GA
    • F100: добавление MediaElement F100: Add MediaElement
    • Общедоступная версия IndicatorView IndicatorView GA
    • RadioButton RadioButton
    • Свипевиев Дж SwipeView GA
  • Ускорение разработки для всех мобильных платформ с помощью Горячего перезапускаBuild on all mobile platforms faster with Hot Restart

    Горячая перезагрузка для приложений iOS в Visual Studio 2019Hot Restart for iOS applications in Visual Studio 2019

  • Использование последних версий пакетов SDK для Android по умолчаниюUse the latest Android SDKs by default

Веб-инструментыWeb Tools

  • Использование Visual Studio для создания и сборки приложений .NET Core и ASP. NET Core 5,0Use Visual Studio to create/build .NET Core/ASP.NET Core 5.0 apps

    • поставщик .NET в NPD .NET Provider in NPD
    • Обновления пакета & другие изменения, соответствующие NET 5,0 Package updates & other changes corresponding to Net 5.0
    • Принципы формирования шаблонов с помощью .NET Core 5,0 Scaffolding experience with .NET Core 5.0
  • Отладка проектов Blazor WebAssemblyDebug Blazor WebAssembly projects

    • Добавление вариантов проверки подлинности Blazor WebAssembly (с подготовкой) Add Blazor WebAssembly authentication options (with provisioning)
    • Включение поддержки автоматического обновления для Blazor WebAssembly Enable auto-refresh support for Blazor WebAssembly
    • Включение поддержки Visual Studio для отладки Blazor WebAssembly Introduce Visual Studio support for Blazor WebAssembly debugging

Step 4 — Choose workloads

After the installer is installed, you can use it to customize your installation by selecting the feature sets—or workloads—that you want. Here’s how.

  1. Find the workload you want in the Visual Studio Installer.

    For example, choose the «.NET desktop development» 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.

  2. After you choose the workload(s) you want, choose Install.

    Next, status screens appear that show the progress of your Visual Studio installation.

  1. Find the workload you want in the Visual Studio Installer.

    For example, choose the «ASP.NET and web development» 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.

  2. After you choose the workload(s) you want, choose Install.

    Next, status screens appear that show the progress of your Visual Studio installation.

Tip

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.

Use the command line to create a local cache

After you download a small bootstrapper, use the command line to create a local cache. Then, use the local cache to install Visual Studio. (This process replaces the ISO files that were available for previous versions.)

Here’s how.

Step 1 — Download the Visual Studio bootstrapper

You must have an internet connection to complete this step.

To get a bootstrapper for Visual Studio 2017, see the Visual Studio previous versions download page for details on how to do so.

Your setup executable—or to be more specific, the bootstrapper file—should match or be similar to one of the following.

Edition Filename
Visual Studio Community vs_community.exe
Visual Studio Professional vs_professional.exe
Visual Studio Enterprise vs_enterprise.exe
Visual Studio Build Tools vs_buildtools.exe

Start by downloading the Visual Studio bootstrapper for your chosen edition of Visual Studio. Your setup file—or bootstrapper—will match or be similar to one of the following.

Edition File
Visual Studio Community vs_community.exe
Visual Studio Professional vs_professional.exe
Visual Studio Enterprise vs_enterprise.exe
Visual Studio Build Tools vs_buildtools.exe

Tip

If you previously downloaded a bootstrapper file and want to verify its version, here’s how. In Windows, open File Explorer, right-click the bootstrapper file, choose Properties, choose the Details tab, and then view the Product version number. To match that number to a release of Visual Studio, see the Visual Studio build numbers and release dates page.

Step 2 — Create a local install cache

You must have an internet connection to complete this step.

Important

If you install Visual Studio Community, you must activate it within 30 days of installation. This requires an internet connection.

Open a command prompt and use one of the commands from the following examples. The examples that are listed here assume that you’re using the Community edition of Visual Studio; adjust the command as appropriate for your edition.

Tip

To prevent an error, make sure that your full installation path is less than 80 characters.

  • For .NET web and .NET desktop development, run:

  • For .NET desktop and Office development, run:

  • For C++ desktop development, run:

  • To create a complete local layout with all features (this will take a long time—we have lots of features!), run:

Note

A complete Visual Studio layout requires a minimum of 35 GB of disk space. For more information, see System requirements. And for information about how to create a layout with only the components you want to install, see Use command-line parameters to install Visual Studio.

Note

A complete Visual Studio layout requires a minimum of 35 GB of disk space. For more information, see System requirements. And for information about how to create a layout with only the components you want to install, see Use command-line parameters to install Visual Studio.

If you want to install a language other than English, change to a locale from the . Then, use the list of the components and workloads available to further customize your installation cache.

Step 3 — Install Visual Studio from the local cache

Tip

When you run from a local install cache, setup uses the local versions of each of these files. But if you select components during installation that aren’t in the cache, setup attempts to download them from the internet.

Important

For offline installations, if you get an error message that says «A product matching the following parameters cannot be found», make sure that you are using the switch with version 16.3.5 or later.

To make sure that you install only the files that you’ve previously downloaded, use the same command-line options that you used to create the layout cache. For example, if you created a layout cache with the following command:

Then use this command to run the installation:

For more examples of how to use command-line parameters, see the Command-line parameter examples for Visual Studio installation page.

Note

If you get an error that a signature is invalid, you must install updated certificates. Open the Certificates folder in your offline cache. Double-click each of the certificate files, and then click through the Certificate Manager wizard. If you’re asked for a password, leave it blank.

List of language locales

Language-locale Language
cs-CZ Czech
de-DE German
en-US English
es-ES Spanish
fr-FR French
it-IT Italian
ja-JP Japanese
ko-KR Korean
pl-PL Polish
pt-BR Portuguese — Brazil
ru-RU Russian
tr-TR Turkish
zh-CN Chinese — Simplified
zh-TW Chinese — Traditional

Step 3 — Install the Visual Studio installer

Run the bootstrapper file to install the Visual Studio Installer. This new lightweight installer includes everything you need to both install and customize Visual Studio.

  1. 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.

  2. We’ll ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement. Choose Continue.

Управление исходным кодом и совместная работаManage your source code and collaborate with others

Вы можете управлять исходным кодом в репозиториях Git, размещенных любым поставщиком, в том числе и GitHub.You can manage your source code in Git repos hosted by any provider, including GitHub. С помощью Azure DevOps Services можно управлять кодом, а также ошибками и рабочими элементами для всего проекта.Or use Azure DevOps Services to manage code alongside bugs and work items for your whole project. Дополнительные сведения об управлении репозиториями Git в Visual Studio с использованием Team Explorer см. в статье Приступая к работе с Git и Azure Repos.See Get started with Git and Azure Repos to learn more about managing Git repos in Visual Studio using Team Explorer. В Visual Studio также предусмотрены другие встроенные элементы управления исходным кодом.Visual Studio also has other built-in source control features. Дополнительные сведения о них см. в статье блога Новые возможности Git в Visual Studio.To learn more about them, see New Git features in Visual Studio (blog).

Служба Azure DevOps Services — это облачные службы для планирования, размещения, автоматизации и развертывания программного обеспечения, а также совместной работы в группах.Azure DevOps Services are cloud-based services to plan, host, automate, and deploy software and enable collaboration in teams. Службы Azure DevOps поддерживают репозитории Git (распределенное управление версиями) и систему управления версиями Team Foundation (централизованное управление версиями).Azure DevOps Services support both Git repos (distributed version control) and Team Foundation Version Control (centralized version control). Они поддерживают конвейеры непрерывной сборки и поставки (CI/CD) кода, хранящегося в системах управления версиями.They support pipelines for continuous build and release (CI/CD) of code stored in version control systems. Службы Azure DevOps Services также поддерживают методологии разработки программного обеспечения Agile, Scrum и CMMI.Azure DevOps Services also support Scrum, CMMI and Agile development methodologies.

Team Foundation Server (TFS) — это центр управления жизненным циклом приложений для Visual Studio.Team Foundation Server (TFS) is the application lifecycle management hub for Visual Studio. Он позволяет всем лицам, участвующим в процессе разработки, использовать единое решение.It enables everyone involved with the development process to participate using a single solution. TFS также полезен для управления разнородными командами и проектами.TFS is useful for managing heterogeneous teams and projects, too.

При наличии организации Azure DevOps или Team Foundation Server в сети к ним можно подключиться из окна Team Explorer в Visual Studio.If you have an Azure DevOps organization or a Team Foundation Server on your network, you connect to it through the Team Explorer window in Visual Studio. В этом окне можно извлекать и возвращать код в систему управления версиями, управлять рабочими элементами, запускать сборки и получать доступ к комнатам команд и рабочим областям.From this window you can check code into or out of source control, manage work items, start builds, and access team rooms and workspaces. Team Explorer можно открыть с помощью поля поиска или из главного меню Вид > Team Explorer или Команда > Управление подключениями.You can open Team Explorer from the search box, or on the main menu from View > Team Explorer or from Team > Manage Connections.

На изображении ниже показано окно Team Explorer для решения, размещенного в Azure DevOps Services.The following image shows the Team Explorer window for a solution that is hosted in Azure DevOps Services.

Вы также можете автоматизировать процедуру сборки, чтобы обеспечить сборку кода, который разработчики в вашей рабочей группе вернули в систему управления версиями.You can also automate your build process to build the code that the devs on your team have checked into version control. Например, можно создавать один или более проектов каждую ночь или всякий раз при возврате кода.For example, you can build one or more projects nightly or every time that code is checked in. Дополнительные сведения см. в описании Azure Pipelines.For more information, see Azure Pipelines.

Шаг 3. Установка установщика Visual StudioStep 3 — Install the Visual Studio installer

Запустите файл начального загрузчика, чтобы установить Visual Studio Installer.Run the bootstrapper file to install the Visual Studio Installer. Новый установщик имеет меньший размер и включает все необходимое для установки и настройки Visual Studio.This new lightweight installer includes everything you need to both install and customize Visual Studio.

  1. В папке Загрузки дважды щелкните файл начального загрузчика, имя которого совпадает с именем одного из следующих файлов или похоже на них:From your Downloads folder, double-click the bootstrapper that matches or is similar to one of the following files:

    • vs_community.exe для Visual Studio Community.vs_community.exe for Visual Studio Community
    • vs_professional.exe для Visual Studio Professional;vs_professional.exe for Visual Studio Professional
    • vs_enterprise.exe для Visual Studio Enterprise;vs_enterprise.exe for Visual Studio Enterprise

    Если появляется оповещение системы контроля учетных записей, нажмите кнопку Да.If you receive a User Account Control notice, choose Yes.

  2. Мы попросим вас принять условия лицензии и заявление о конфиденциальности корпорации Майкрософт.We’ll ask you to acknowledge the Microsoft License Terms and the Microsoft Privacy Statement. Нажмите Продолжить.Choose Continue.

Начало работыGet started

Вы можете значительно ускорить процесс работы с меню, выполнив быстрый поиск необходимых элементов, включая команды, настройки, документацию и параметры установки.Save time digging through menus by quickly searching for anything you need, including commands, settings, documentation, and install options. В результатах поиска в Visual Studio будут отображаться сочетания клавиш для команд, которые вы сможете запомнить и использовать в дальнейшей работе.See keyboard shortcuts for commands within your search results in Visual Studio so you can memorize them more easily.

  • Макетирование кода с использованием списка задач.Mock code using task list. Если вам не хватает требований для завершения фрагмента кода, воспользуйтесь окном «Список задач», которое позволяет отслеживать комментарии к коду, где используются маркеры, такие как и , или настраиваемые маркеры, а также управлять сочетаниями клавиш, с помощью которых можно перейти непосредственно к предварительно заданному месту в коде.If you don’t have enough requirements to complete a piece of code, use Task List to track code comments that use tokens such as and , or custom tokens, and to manage shortcuts that take you directly to a predefined location in code. Дополнительные сведения см. в статье Использование списка задач.For more information, see Use the Task List.

  • Использование сочетаний клавиш обозревателя решений.Use Solution Explorer shortcuts. Если вы только начинаете знакомство с Visual Studio, изучите полезные сочетания клавиш, которые позволят ускорить работу с новой базой кода.If you’re new to Visual Studio, these shortcuts will come in handy and save you time while you’re coming up to speed on a new codebase. Полный список сочетаний клавиш см. в статье .For the full list of shortcuts, see .

  • Определение и настройка сочетаний клавиш в Visual Studio .Identify and customize keyboard shortcuts in Visual Studio. Вы можете определить сочетания клавиш для команд Visual Studio, настроить эти сочетания клавиш и экспортировать их для других пользователей.You can identify keyboard shortcuts for Visual Studio commands, customize those shortcuts, and export them for others to use. Сочетания клавиш можно всегда найти и изменить в диалоговом окне «Параметры».You can always find and change a keyboard shortcut in the Options dialog box.

  • Использование специальных возможностей Visual Studio.Make Visual Studio more accessible. Visual Studio имеет встроенные специальные возможности, совместимые со средствами чтения с экрана и другими специальными возможностями.Visual Studio has built-in accessibility features that are compatible with screen readers and other assistive technologies. Полный список доступных возможностей см. в статье Советы и рекомендации по специальным возможностям для Visual Studio.See Accessibility tips and tricks for Visual Studio for the full list of available features.

  • Знакомство с жизненным циклом и обслуживанием продуктов Visual Studio.Check out the Visual Studio Product Lifecycle and Servicing. Дополнительные сведения о получении обновлений для Visual Studio, вариантах поддержки для пользователей версий Enterprise и Professional, поддержке прежних версий Visual Studio, а также компонентах, не включенных в программу обслуживания Visual Studio, см. в статье Жизненный цикл и обслуживание продуктов Visual Studio.For information on how to get updates for Visual Studio, support options for Enterprise and Professional customers, support for older versions of Visual Studio, and components not covered by Visual Studio servicing, see Visual Studio Product Lifecycle and Servicing.

  • Установка пакетов NuGet и управление ими в Visual Studio.Install and manage NuGet packages in Visual Studio. С помощью пользовательского интерфейса диспетчера пакетов NuGet в Visual Studio вы можете легко устанавливать, удалять и обновлять пакеты NuGet в проектах и решениях в ОС Windows.The NuGet Package Manager UI in Visual Studio on Windows allows you to easily install, uninstall, and update NuGet packages in projects and solutions. Дополнительные сведения см. в статье Установка пакетов в Visual Studio и управление ими с помощью диспетчера пакетов NuGet.For more information, see Install and manage packages in Visual Studio using the NuGet Package Manager.

What’s New in Visual Studio 2019 version 16.8

Visual Studio 2019 Archived Release Notes

  • Visual Studio 2019 version 16.7 Release Notes
  • Visual Studio 2019 version 16.6 Release Notes
  • Visual Studio 2019 version 16.5 Release Notes
  • Visual Studio 2019 version 16.4 Release Notes
  • Visual Studio 2019 version 16.3 Release Notes
  • Visual Studio 2019 version 16.2 Release Notes
  • Visual Studio 2019 version 16.1 Release Notes
  • Visual Studio 2019 version 16.0 Release Notes

Visual Studio 2019 Blog

The Visual Studio 2019 Blog is the official source of product insight from the Visual Studio Engineering Team. You can find in-depth information about the Visual Studio 2019 releases in the following posts:

  • Visual Studio 2019 v16.8 and v16.9 Preview Available Today
  • New Features in Visual Studio 2019 v16.8 Preview 3.1
  • Visual Studio 2019 v16.8 Preview 2 Releases New Features Today!
  • Visual Studio 2019 v16.7 and v16.8 Preview 1 Release Today!
  • Visual Studio 2019 v16.7 Preview 2 Available Today!
  • Exciting new updates to the Git experience in Visual Studio
  • Releasing Today! Visual Studio 2019 v16.6 & v16.7 Preview 1
  • Visual Studio 2019 version 16.6 Preview 2 Releases New Features Your Way
  • Visual Studio 2019 version 16.5 is now available!
  • ‘Tis the Season for Visual Studio 2019 v16.4 Release
  • Visual Studio 2019 v16.4 Preview 2, Fall Sports, and Pumpkin Spice
  • .NET Core Support and More in Visual Studio 2019 version 16.3 — Update Now!
  • Visual Studio 2019 version 16.3 Preview 2 and Visual Studio 2019 for Mac version 8.3 Preview 2 Released!
  • Visual Studio 2019 version 16.2 and 16.3 Preview 1 now available
  • Visual Studio 2019 version 16.2 Preview 2
  • Visual Studio 2019 version 16.1 and Preview 16.2 Preview
  • Visual Studio 2019: Code faster. Work smarter. Create the future.

Модульная установкаModular installation

Модульный установщик Visual Studio позволяет выбрать и установить рабочие нагрузки.Visual Studio’s modular installer enables you to choose and install workloads. Рабочие нагрузки — это группы функций, необходимых для языка программирования или платформы, которую вы предпочитаете.Workloads are groups of features needed for the programming language or platform you prefer. Этот подход обеспечивает меньший объем установки Visual Studio, а также более быструю установку и обновление среды.This strategy helps to keep the footprint of the Visual Studio installation smaller, which means it installs and updates faster too.

Установите Visual Studio бесплатно со страницы скачиваемых материалов Visual Studio, если еще не сделали этого.If you haven’t already installed Visual Studio, go to the Visual Studio downloads page to install it for free.

Установите Visual Studio бесплатно со страницы скачиваемых материалов Visual Studio, если еще не сделали этого.If you haven’t already installed Visual Studio, go to the Visual Studio downloads page to install it for free.

Дополнительные сведения о настройке Visual Studio в своей системе см. в статье Установка версии-кандидата Visual Studio.To learn more about setting up Visual Studio on your system, see Install Visual Studio.

Use refactoring and IntelliSense

Let’s look at a couple of the ways that refactoring and IntelliSense can help you code more efficiently.

First, let’s rename the variable:

  1. Double-click the variable to select it.

  2. Type in the new name for the variable, username.

    Notice that a gray box appears around the variable, and a light bulb appears in the margin.

  1. Select the light bulb icon to show the available Quick Actions. Select Rename ‘name’ to ‘username’.

    The variable is renamed across the project, which in our case is only two places.

  1. Select the light bulb icon to show the available Quick Actions. Select Rename ‘name’ to ‘username’.

    The variable is renamed across the project, which in our case is only two places.

  1. Now let’s take a look at IntelliSense. Below the line that says , type .

    A box displays the members of the DateTime class. In addition, the description of the currently selected member displays in a separate box.

  2. Select the member named Now, which is a property of the class, by double-clicking on it or pressing Tab. Complete the line of code by adding a semi-colon to the end.

  3. Below that, type in or paste the following lines of code:

    Tip

    Console.Write is a little different to Console.WriteLine in that it doesn’t add a line terminator after it prints. That means that the next piece of text that’s sent to the output will print on the same line. You can hover over each of these methods in your code to see their description.

  4. Next, we’ll use refactoring again to make the code a little more concise. Click on the variable in the line .

    Notice that a little screwdriver icon appears in the margin on that line.

  5. Click the screwdriver icon to see what suggestions Visual Studio has available. In this case, it’s showing the Inline temporary variable refactoring to remove a line of code without changing the overall behavior of the code:

  6. Click Inline temporary variable to refactor the code.

  1. Run the program again by pressing Ctrl+F5. The output looks something like this:

  1. Run the program again by pressing Ctrl+F5. The output looks something like this:

Создание кроссплатформенных приложений и игрBuild cross-platform apps and games

С помощью Visual Studio вы можете создавать приложения и игры для платформ macOS, Linux и Windows, а также для мобильных устройств Android, iOS и др.You can use Visual Studio to build apps and games for macOS, Linux, and Windows, as well as for Android, iOS, and other mobile devices.

  • Создавайте приложения .NET Core для использования на устройствах Windows, macOS и Linux.Build .NET Core apps that run on Windows, macOS, and Linux.

  • Создавайте мобильные приложения для устройств iOS, Android и Windows на C# и F# с помощью Xamarin.Build mobile apps for iOS, Android, and Windows in C# and F# by using Xamarin.

  • Используйте стандартные веб-технологии—HTML, CSS и JavaScript—, чтобы создавать мобильные приложения для устройств iOS, Android и Windows с помощью Apache Cordova.Use standard web technologies—HTML, CSS, and JavaScript—to build mobile apps for iOS, Android, and Windows by using Apache Cordova.

  • Создавайте игры в форматах 2D и 3D на C# с помощью средств Visual Studio для Unity.Build 2D and 3D games in C# by using Visual Studio Tools for Unity.

  • Создавайте собственные приложения C++ для устройств iOS, Android и Windows.Build native C++ apps for iOS, Android, and Windows devices. Предоставляйте доступ к общему коду в библиотеках, созданных для iOS, Android и Windows, с помощью C++ для кроссплатформенной разработки.Share common code in libraries built for iOS, Android, and Windows, by using C++ for cross-platform development.

  • Выполняйте развертывание, тестирование и отладку приложений Android с помощью эмулятора Android.Deploy, test, and debug Android apps with the Android emulator.

Создание приложенияCreate the application

Теперь можно приступить к разработке.It’s time to start developing. Мы добавим элемент управления »Кнопка», назначим кнопке действие и затем запустим приложение «Hello World», чтобы посмотреть, как оно выглядит.You’ll add a button control, add an action to the button, and then start the «Hello World» app to see what it looks like.

Добавление кнопки на холст конструктораAdd a button to the Design canvas

  1. В Обозревателе решений дважды щелкните на файле MainPage.xaml, чтобы открыть разделенное представление.In the Solution Explorer, double-click MainPage.xaml to open a split view.

    Откроется две панели: Конструктор XAML, содержащий холст конструктора, и редактор XAML, в котором можно добавлять и изменять код.There are two panes: The XAML Designer, which includes a design canvas, and the XAML Editor, where you can add or change code.

  2. Щелкните Панель элементов, чтобы открыть всплывающее окно «Панель элементов».Choose Toolbox to open the Toolbox fly-out window.

    (Если параметр Панель элементов отсутствует, его можно открыть в строке меню.(If you don’t see the Toolbox option, you can open it from the menu bar. Для этого выберите Вид > Панель инструментов.To do so, choose View > Toolbar. Либо нажмите клавиши CTRL+ALT+X.)Or, press Ctrl+Alt+X.)

  3. Щелкните значок Закрепить, чтобы закрепить окно «Панель элементов».Click the Pin icon to dock the Toolbox window.

  4. Щелкните элемент управления Кнопка и перетащите его на холст конструктора.Click the Button control and then drag it onto the design canvas.

    Если посмотреть на код в редакторе XAML, мы увидим, что кнопка была также добавлена туда:If you look at the code in the XAML Editor, you’ll see that the Button has been added there, too:

Добавление метки к кнопкеAdd a label to the button

В редакторе XAML измените значение параметра Content кнопки с «Button» на «Hello World!».In the XAML Editor, change Button Content value from «Button» to «Hello World!»

Обратите внимание, что кнопка в Конструкторе XAML также изменится.Notice that the button in the XAML Designer changes, too.

Добавление обработчика событийAdd an event handler

Название «обработчик событий» звучит как что-то сложное, но это всего лишь еще одно имя в коде, которое вызывается, когда происходит какое-то событие.An «event handler» sounds complicated, but it’s just another name for code that is called when an event happens. В нашем случае он добавляет действие к кнопке «Hello World!».In this case, it adds an action to the «Hello World!» .button.

  1. Дважды щелкните элемент управления «Кнопка» на холсте конструктора.Double-click the button control on the design canvas.

  2. Измените код обработчика событий в файле MainPage.xaml.cs, страница с выделенным кодом.Edit the event handler code in MainPage.xaml.cs, the code-behind page.

    Здесь начинается самое интересное.Here is where things get interesting. Обработчик события по умолчанию выглядит так:The default event handler looks like this:

    Давайте изменим его, чтобы он выглядел следующим образом:Let’s change it, so it looks like this:

    Ниже приведен код для копирования и вставки:Here’s the code to copy and paste:

Что же мы только что сделали?What did we just do?

Этот код использует некоторые функции API Windows для создания объекта синтеза речи и передает ему некоторый текст для озвучивания.The code uses some Windows APIs to create a speech synthesis object and then gives it some text to say. (Дополнительные сведения об использовании см. в статье System.Speech.Synthesis.)(For more information on using , see System.Speech.Synthesis.)

Как получить доступ к папке

Из-за чего могут пропасть SMS

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector