Visual Studio Blog: Recent Episodes

None

The official source of product insight from the Visual Studio Engineering Team

View Details

Copilot agent mode is the next evolution in AI-assisted development—and it’s now generally available in the Visual Studio June update.

Agent mode turns GitHub Copilot into an autonomous pair programmer capable of handling multi-step development tasks from end to end. It builds a plan, executes it, adapts along the way, and loops through tasks until completion.

Agent mode can analyze your codebase, propose and apply edits, run commands, respond to build or lint errors, and self-correct. You can integrate additional tools from MCP servers to expand the agent’s capabilities. Ask Mode, on the other hand works with you in a conversational way – you guide it with prompts, give it context, and steer the direction. Where Ask Mode helps you think through a problem, Agent Mode executes the goal.

To try agent mode out, open Copilot Chat, click the **Ask** button, and switch to **Agent**.

From Goals to Working CodeAgent mode is built for real-world scenarios. You can give it high-level tasks like:

  • “Add ‘buy now’ functionality to my product page.”
  • “Add a retry mechanism to this API call with exponential backoff and a unit test.”
  • “Create a new Blazor web app that does X”

Copilot will try to identify the right files, apply changes, run builds, and fix errors—all while keeping you in control with editable previews, undo, and a live action feed. The more context and detail you provide, the better the results. Agent mode works best when it understands your intent clearly. The more precise your instructions and context, the more effective the outcome.

Tool callingAt its core, agent mode uses tool calling to access a growing set of capabilities inside Visual Studio. When given a goal, it selects and executes the right tools step by step. You can explore the available tools via the tool’s dropdown (icon with two wrenches) in the Copilot Chat Window.

Want it to be more powerful? You can extend the agent by adding tools from an ecosystem of Model Context Protocol (MCP) extenders.

Agent mode + MCPModel Context Protocol (MCP) is a protocol designed to seamlessly connect AI agents with a variety of external tools and services, similar to how HTTP standardized web communication. The aim is to enable any client to integrate robust tool servers such as databases, code search, and deployment systems, without writing customer connections for each tool. With MCP, the agent can be configured to access rich, real-time context from across your development stack:

  • GitHub repositories
  • CI/CD pipelines
  • Monitoring and telemetry systems
  • And more

MCP is open source and extensible, so you can connect any compatible server. Common integrations include GitHub, Azure, and external providers like Perplexity. Check out the MCP official server repository to learn more.

Visual Studio uses the native mcp.json file for MCP server configuration, and also detects compatible configurations set up by other development environments, such as .vscode/mcp.json. Learn more here.

Once connected, the agent can take smarter actions. For example, if you add tools from the GitHub MCP server, your agent can retrieve and create issues on your behalf, check repo history, search GitHub, etc. A Figma MCP server provides the agent access to your design mockups.

This is what makes agent mode truly extensible: it plugs into your environment and acts with real understanding of your tools, systems, and workflows.

We’re incredibly excited about this new prompt-first experience, and how it empowers developers to move faster while staying in full control. We’re continuously evolving it, and your input plays a big role—please keep the feedback coming here. And make sure to include your logs. It helps us get to the root faster and fix the problem.

Beyond agent mode: more AI updates to try in the June releaseBut wait, we’re not done! The team included additional features in this release that are intended to improve your experience with Copilot in Visual Studio.

  • Reuse and Share Prompt Files Easily: Create reusable prompt files in your repository, allowing you and your team to share and run custom prompts with ease. A prompt file is a standalone markdown file containing a prompt that you can run directly in chat, reducing the number of requests you need to type.
  • Gemini 2.5 Pro and GPT-4.1 are now available: Developers love working with different models with chat and agent mode to get the desired results they are looking for. Now, Gemini 2.5 Pro and GPT-4.1 are available, offering improved reasoning and generation capabilities for your coding workflows.
  • Reference the Output Window as part of your chat context: Troubleshoot runtime behavior more effectively.
  • Monitor your usage of GitHub Copilot directly from Visual Studio.
  • General availability of the Agents Toolkit 17.14 with improvements for building Microsoft 365 apps and intelligent agents.

The post Agent mode is now generally available with MCP support appeared first on Visual Studio Blog.

View Details

GitHub Copilot code completions, or gray text, are specialized in autocompleting unfinished code or providing helpful template code. In reality, coding activities are more diverse than writing new code. What if Copilot could better assist your coding not only with code generation, but your code editing activities as well?

We are excited to announce next edit suggestions, or NES for short, is now available in Visual Studio 2022 17.14 to further improve your coding experience. NES leverages the previous edits made and predicts the next edit to come, whether it’s an insertion, deletion, or mix of both. Unlike Copilot completions which are limited to generating suggestions at your caret location, NES can support you anywhere in your file, where the next edit is most likely to occur.

Example usage scenariosNext edit suggestions can be helpful in a variety of scenarios, not only making obvious repetitive changes like renaming, but also more logical changes when you are adding/removing variables or changing the intention of a method. Here are some examples:

1. Refactoring a 2D Point class to 3D Point:https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2025/06/Point3-26-1.mp42. Update the code syntax to modern C++ using STL:Note that NES is not just making repetitive changes to updating all “printf() “ to “std::cout“, but also updating other syntax such as “fgets()“.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2025/06/Migration3-28-1.mp43. Make logical changes in response to a newly added variable:NES responds quickly to the new variable, which adds the maximum number of guesses a player can make in a game, and Copilot Completions also jumps in to help.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2025/06/AddingVariable3-28.mp4Getting started with next edit suggestionsEnable NES via Tools > Options > GitHub > Copilot > Copilot Completions > Enable Next Edit Suggestions.

Like completions, all you need to do to get NES is to start coding!

When there is an available edit suggestion, it could be presented in a diff view where the red diff indicates the original code you had, and the green indicates the new one suggested by Copilot to clearly shows any replacement or deletion of your original code.

If the edit is on a different line than the one you are on now, it will suggest you Tab to Navigate to the corresponding line first. The arrow in the hint bar indicates where the next edit is located. You won’t need to manually search for related edits anymore; NES will lead the way!

After you are on the same line as the edit, you can Tab to Accept the suggestion.

In addition to the hint bars, an arrow in the gutter also pops up to indicate that there is an edit suggestion available. You can click on the arrow to explore the edit suggestion menu. This menu allows you to interact with NES using a mouse, when you don’t want to press the Tab key.

See next edit suggestions explained step-by-step:

Please give NES a try today to let it assist you in your logical editing flow! If you have any feedback, our team would love to hear from you through Developer Community to help us keep iterating on and improving NES!

Check out the new Visual Studio HubStay connected with everything Visual Studio in one place! Visit the Visual Studio Hub for the latest release notes, YouTube videos, social updates, and community discussions.

Appreciation for your feedbackYour feedback helps us improve Visual Studio, making it an even more powerful tool for developers. We are immensely grateful for your contributions and look forward to your continued support. By sharing your thoughts, ideas, and any issues you encounter through Developer Community, you help us improve and shape the future of Visual Studio.

The post Next edit suggestions available in Visual Studio appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 version 17.14 comes with quality-of-life improvements to its C++ Build Insights integration that will make it easier for you to navigate large multi-project traces and handle long file names for your build inputs and artifacts.

What is C++ Build Insights?C++ Build Insights is a powerful tool that lets you visualize and optimize the build process of your C++ projects. It leverage MSVC’s trace capture technology and uses the Windows ETW framework to collect detailed information about every build event, such as compilation, linking, code analysis, and more. You can then view and analyze this data in many ways, such as a timeline, a flame graph, or a tree map. As of Visual Studio 2022 version 17.7, C++ Build Insights is integrated into Visual Studio.

C++ Build Insights can help you identify and fix bottlenecks, dependencies, and inefficiencies in your build system, resulting in faster and more reliable builds. You can also compare different builds and see how your changes affect the build performance over time. To learn more, read how Activision used Build Insights to cut Call of Duty’s Build Time by 50% on the Microsoft Game Dev Blog.

How to Filter C++ Build Insights by ProjectOne of the new features in Visual Studio 2022 is the ability to filter your C++ Build Insights results for Visual Studio solutions by project. This can be particularly useful if you have a large solution with multiple projects and you want to focus on one of them. To do this, simply run Build Insights on your solution by selecting Build > Run Build Insights on Solution and then either Build or Rebuild, depending on whether you want to measure the build from scratch. This will generate an ETL (event trace log) trace, which Visual Studio will automatically open to visualize the data collected. Select the project that you want to filter by selecting the funnel next to the Project column and narrowing down the set of projects for which you want to view the data.

How to Filter C++ Build Insights by File PathsIn addition to project filtering, Build Insights now also supports file path filtering, which gives you fine-grained control over which files are included in your analysis. This is especially helpful in large codebases where build data from third-party libraries or generated code can clutter your view. With the File Path Filter, you can use glob patterns to focus on specific directories or file types—helping you isolate and investigate the build performance of just the parts you care about. Whether you’re narrowing your focus during a regression investigation or simply trying to understand the build cost of a particular code change, file path filtering helps you get answers faster.

To do this, simply run Build Insights on your solution by selecting Build > Run Build Insights on Solution and then either Build or Rebuild, depending on whether you want to measure the build from scratch. This will generate an ETL (event trace log) trace, which Visual Studio will automatically open to visualize the data collected. Select the project that you want to filter by selecting the funnel next to the File Path column and typing in the glob pattern you want to focus on or ignore.

How to see the file names and paths of build inputs and artifactsAnother improvement in Visual Studio is the way Build Insights displays the file names and paths of your build inputs and artifacts, such as source files, object files, libraries, and executables. Instead of showing the full path, which can be quite long and hard to read, Build Insights now shows the relative path and the file name, separated by a backslash. This makes it easier to find your build artifacts, especially if you have a complex folder structure.

You can see the file names and paths of your build inputs and artifacts in any view that shows them, such as the Included Files view, which shows the files that are included by each source file during compilation. You can also hover over any build event to see more details, including the file name and path.

We hope you find these quality-of-life improvements useful and that they help you optimize your C++ build process. We are always working on making Visual Studio better for developers, and we appreciate your continuous feedback and suggestions. Please tell us what you think of these features and what else you want in Build Insights.

The post How to filter C++ Build Insights by project appeared first on Visual Studio Blog.

View Details

When we launched the Cloud Academy benefit for Visual Studio Professional and Enterprise subscribers back in March 2025, our goal was simple: give you the hands-on, practical learning experience you need to confidently master Azure and cloud technologies — without spending a dime beyond your subscription.

Why? Because in today’s fast-changing tech world, knowing theory isn’t enough. You need to do — to experiment, build, troubleshoot, and grow your skills in a real environment. That’s exactly what Cloud Academy delivers.

From Frustration to Confidence: Learning That Fits Your StyleIf you’re like many developers I’ve talked to, finding time to build new skills feels like a constant struggle. Between deadlines, meetings, and firefighting production issues, carving out space to learn something new is tough.

Cloud Academy understands that. Whether you’re the type who likes step-by-step guided labs, jumping straight into hands-on challenges, or tinkering freely in a safe sandbox, this platform adapts to how you learn best.

The result? Visual Studio subscribers are completing labs at a rate 10% higher than other learners on Cloud Academy. That means you’re not just skimming content — you’re gaining meaningful, practical skills that stick.

What’s New? Fresh Content Tailored for Today’s Cloud ChallengesCloud technology evolves rapidly, and staying ahead means keeping your skills sharp. We’ve added new lessons and labs to make sure you’re ready to tackle the latest Azure capabilities and security challenges, including:

  • Automate document processing with Azure AI Document Intelligence Studio — no coding needed, just real impact.
  • Strengthen endpoint security with Microsoft Entra ID’s automated password management — because security can’t be an afterthought.
  • Streamline device management with Intune device naming templates — save time and reduce errors.
  • Dive into Azure OpenAI Service’s prompt engineering — build AI apps that behave reliably.
  • …and much more that matches what companies are demanding now.

Hands-On Labs: Where Real Learning HappensReading about cloud services is one thing. Building and deploying containerized apps, automating workflows, or managing state in Azure Container Apps — that’s where the real transformation happens.

Cloud Academy’s labs let you roll up your sleeves in real Azure environments, so you:

  • Push container images and manage registries.
  • Automate file processing with Azure Functions.
  • Explore state management with Dapr in container apps.

This kind of hands-on experience turns concepts into capabilities, making you more valuable to your team and your company.

Certification Prep That WorksMany subscribers are also using Cloud Academy to prep for Microsoft certifications, which are a powerful way to validate your skills and open doors in your career. The top courses are aligned to:

  • AZ-900: Azure Fundamentals — perfect for getting started.
  • AZ-204: Developing Azure Solutions — for building real cloud apps.
  • AI-900 and AI-102 — tapping into the future of AI on Azure.
  • AZ-400: Azure DevOps Solutions — mastering modern cloud development workflows.

With lessons, labs, quizzes, and exams, Cloud Academy makes certification prep practical and effective — no more cramming or rote memorization.

Meet Ela: Your Personal AI-Powered Learning CoachLearning alone can be challenging. That’s why Cloud Academy includes Ela, an AI-powered Expert Learning Assistant who’s like having a tutor at your side 24/7.

Ela helps you by:

  • Summarizing complex lessons into bite-sized insights.
  • Testing your knowledge so you focus on what matters.
  • Explaining tricky concepts clearly.
  • Guiding you during hands-on labs to troubleshoot and stay on track.

With Ela’s support, you can accelerate your learning, overcome roadblocks, and gain confidence faster than ever before.

How to Activate Your Cloud Academy Access TodayGetting started is fast and easy:

  1. Log in to visualstudio.com with your Visual Studio subscription.
  2. Navigate to the Benefits section.
  3. Activate your Cloud Academy access — no credit card, no trials, just instant access.
  4. This exclusive benefit is available at no extra cost with select Visual Studio subscription levels.

To see if you’re Professional or Enterprise subscription is eligible, check out this document on MS Learn.

Your Next Step Toward Cloud Mastery

At Microsoft, we’re committed to empowering you with tools, training, and resources that truly move the needle. Based on the incredible feedback we’ve received, Cloud Academy is proving to be more than just another training platform — it’s a catalyst for career growth, innovation, and real-world impact.

Whether you want to build apps that scale, improve your security posture, or prepare for certification, Cloud Academy is here to help you every step of the way. Take advantage of this special benefit today and watch how your Azure skills—and your confidence—soar.

Stay Connected with Visual Studio

Don’t forget to visit the Visual Studio Hub for the latest updates, videos, and community discussions to keep your developer journey vibrant.

Got thoughts on Visual Studio benefits or Cloud Academy? I’d love to hear from you! Connect with me on LinkedIn.

The post Cloud Academy: Unlock Your Azure Skills and Accelerate Your Career appeared first on Visual Studio Blog.

View Details

The latest updates in Visual Studio 2022 introduced features specifically designed to improve how you manage extensions. These updates offer tools that help you automate processes, provide detailed controls for configuration, and enhance the user interface to streamline your development workflows.

Seamless auto updatesVisual Studio now automatically triggers updates whenever you open the Extension Manager window. This ensures you are consistently working with the latest features and fixes without needing to manually initiate updates.

Infobar notifications for applied updatesAn Infobar will now appear when updates are applied, reminding you to restart Visual Studio. This ensures the updates take effect without requiring additional steps on your part.

Auto update settings on the extension pageSettings for auto updates have been integrated directly into the extension page, making it easier to access and configure them. You can quickly adjust preferences without navigating through multiple menus.

Filter by pending changesA new “Pending” category has been added to highlight pending updates or modifications. This feature helps developers like you stay informed about changes that require attention..

Additional auto update settings in Tools > OptionsFor better accessibility, auto update settings are also available under Tools > Options. This provides an alternative way to manage your preferences in a centralized location.

Simplified settings interfaceThe user interface for managing settings has been redesigned to reduce complexity. With fewer clicks and clearer options, configuring your environment is now more intuitive.

Excluded extensions listAn excluded extensions list is now available, automatically populating with extensions you choose to exclude from automatic updates. This feature is especially useful for extensions critical to your workflow, where manual update control is preferred.

ConclusionThese enhancements in Visual Studio 2022 aim to make extension management more user-friendly and efficient. By automating frequent tasks and providing more granular control, these updates contribute to a streamlined development experience that increase your productivity!

We appreciate the feedback from our developer community, which plays a vital role in shaping these updates. Please continue to share your insights to help us improve Visual Studio with every release.

The post Extension Manager updates in Visual Studio appeared first on Visual Studio Blog.

View Details

As Visual Studio extension authors, our goal is to create tools that empower developers across diverse environments. A key part of this mission involves ensuring that your extension commands remain accessible and consistent across all Visual Studio locales. In your VSSDK extensions, by adding the CanonicalName property to your commands in the .vsct file, you can achieve greater resilience and user satisfaction for your extension.

And with a few simple tricks, you can make your command names a lot prettier as well.

Why add the CanonicalName property?When a Visual Studio extension supports multiple locales, the names of commands can vary based on localized resources. While this improves usability in specific languages, it can sometimes lead to inconsistencies or challenges in maintaining a stable reference to commands programmatically. For example, if a command’s name changes between locales, automation scripts, or even third-party integrations referencing that command may break.

The CanonicalName property solves this issue by providing a stable, locale-independent identifier for your commands. With this property:

  • Commands are more predictable: Developers referencing your extension programmatically can rely on a fixed name across all locales.
  • Better integration: Tools and integrations can seamlessly reference commands without needing locale-specific handling.
  • Enhanced user experience: End users benefit from consistent behavior and fewer issues caused by localization mismatches.

Step-by-step guide to adding CanonicalNameHere’s how you can add the CanonicalName property to your commands in the .vsct file of your Visual Studio extension:

  1. Locate Your .vsct FileThe .vsct (Visual Studio Command Table) file defines the commands for your extension. It’s usually found in the root folder of your Visual Studio extension project.

  2. Add the CanonicalName Attribute to CommandsWithin the .vsct file, commands are defined using the

<Button guid="guidMyExtensionCmdSet" id="cmdidMyCommand" priority="0x0100" type="Button"> <Parent guid="guidMyExtensionCmdSet" id="MyMenuGroup" /> <Icon guid="guidImages" id="bmpPic1" /> <Strings> <ButtonText>My Command</ButtonText> <CanonicalName>.MyExtension.MyCommandName</CanonicalName> </Strings></Button> 3. Ensure uniqueness of CanonicalNameThe value you assign to CanonicalName must be unique across all commands in your extension. Use meaningful and descriptive identifiers that reflect the command’s purpose.

Best practices for using CanonicalName Use PascalCase: Follow consistent naming conventions like PascalCase for the CanonicalName values. * Keep it descriptive: Make the names meaningful to help developers understand the purpose of the command without additional context. * Avoid localization: The CanonicalName should always remain in English and free from localization to ensure consistency. * Start with a period: This ensures that nothing is added in front of the command name. This is to avoid command names that look like OtherContextMenus.MyExtension.MyCommandName. The leading period is stripped automatically by VS, so it won’t show up. * Lead with the extension name*: This is to make it very clear that this command is provided by your extension. It also makes it easy for users to search for all commands provided by your extension.

We’ve updated the XML Schema fileTo reflect this best practice of providing the CanonicalName property with all commands, we’ve updated the schema file to provide in-editor warnings when it is missing. It’s just a warning and it doesn’t affect the VSCT Compiler which will continue to compile the command table as it always has. This is simply a change to make it easier for you to remember to add the property. It will be included in a future update to Visual Studio.

ConclusionAdding the CanonicalName property to your commands in the .vsct file is a small but impactful change that enhances the resilience and usability of your Visual Studio extensions. By ensuring consistent references across all locales, you’ll provide a smoother experience for developers and maintain a higher-quality extension.

Take a moment to review your extension’s .vsct file and implement this property where necessary. It’s a straightforward step toward making your tools even more powerful and user-friendly.

Happy coding!

The post Improve the commands in your extensions appeared first on Visual Studio Blog.

View Details

We continue to invest in the VisualStudio.Extensibility SDK to allow users like you to create extensions that run faster and smoother than ever before! VisualStudio.Extensibility helps you build extensions that run outside the main Visual Studio IDE process for improved performance, reliability, and installation without restarting Visual Studio. Additional benefits include a sleek and intuitive .NET 8-based API and comprehensive, well-maintained documentation to help you develop amazing extensions faster than ever before.

Get Started with VisualStudio.ExtensibilityFor the latest up-to-date docs and installation instructions, visit https://aka.ms/VisualStudio.Extensibility. We encourage you to report bugs and suggest features via the issue tracker on our GitHub repo, where you can also find extension samples to help you get started. We have also launched a new video series on Visual Studio Toolbox to provide a more detailed tour of our samples. Check out the series here!

What’s new for VisualStudio.Extensibility for 17.14?Our 17.14 release of VisualStudio.Extensibility includes the following features:

  • Text classification support
  • Updates to the ShowPromptAsync API

This release also includes a previously mentioned change regarding .NET runtime management requirements. VisualStudio.Extensibility extensions are executed on a separate .NET runtime host, unlike VSSDK extensions which run in the same process as devenv.exe, using the .NET Framework runtime. Since VisualStudio.Extensibility extensions operate on .NET, we must adhere to the runtime servicing lifetime of .NET. Consequently, the VisualStudio.Extensibility platform will be regularly updated to advance to newer versions of .NET LTS. For more information on how this affects you as an extension developer or consumer, please refer to our documentation here.

Color text in files with classification supportIn Visual Studio 17.13, we added support for taggers in the editor, allowing advanced functionalities such as custom code lens providers. This enhancement laid the groundwork for the text classification feature we are introducing in 17.14. Text classification facilitates custom text coloring within an opened file, commonly referred to as semantic and syntactic colorization. The following snippet demonstrates the creation of classification tags, which are fundamental to implementing editor classification. Please note that the example provided is a very simplistic approach and should not be used without further refinement. For a more comprehensive guide on writing a classification extension, please refer to our documentation and sample materials.

private async Task CreateTagsAsync(ITextDocumentSnapshot document){ List<TaggedTrackingTextRange<ClassificationTag>> tags = new(); foreach (var line in document.Lines) { var match = LineRegex.Match(line.Text.CopyToString()); if (match.Success) { foreach (Capture capture in match.Groups[FieldTextMatchName].Captures) { tags.Add(new(new(document, line.Text.Start + capture.Index, capture.Length, TextRangeTrackingMode.ExtendNone),new(ClassificationType.KnownValues.String))); } } } await this.UpdateTagsAsync( updatedRanges: [new(document, 0, document.Length)], tags, CancellationToken.None);} Display icons and prompt for input with an enhanced ShowPromptAsync APIWe routinely assess suggestion tickets that track requests for new APIs to be integrated into VisualStudio.Extensibility. Numerous factors influence our decision on which features to prioritize, including the complexity and cost of implementation. In version 17.14, we are pleased to announce that we have addressed a community-requested feature by introducing icon support in our ShowPromptAsync API. Furthermore, we have added the capability to provide user-input prompt. Below is a code snippet demonstrating how to configure a user prompt with custom icons, titles, messages, and options. For more detailed information, please refer to our documentation.

// Show a prompt that accepts string input from the user, with a default value, custom title and custom icon.string? feedback = await shell.ShowPromptAsync( $"Thank you for configuring {projectName}. Do you have any feedback?", new InputPromptOptions { DefaultText = feedbackPrompt, Icon = ImageMoniker.KnownValues.Feedback, Title = Title, }, cancellationToken);this.logger.TraceInformation($"Feedback received: {feedback}"); We want to hear from you!We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post VisualStudio.Extensibility: Editor classification and updates to user prompt appeared first on Visual Studio Blog.

View Details

The Visual Studio 2022 17.14 update is here, and it brings great quality-of-life improvements—especially around NuGet authentication. From context about the authentication needs of private NuGet feeds to a simplified account selection workflow, this update helps you stay focused on your code! If you haven’t already, download the latest Visual Studio update to take advantage of this and the rest of the improvements.

Streamlining the NuGet authentication experienceOver the past year, we’ve made significant strides to improve the identity and authentication experiences across Visual Studio 2022. For instance, we introduced Web Account Manager (WAM) support to unify and simplify the sign-in experience of Entra ID accounts & we recently followed that up by adding multi-account support for GitHub, making it easier than ever to manage your GitHub identities inside Visual Studio.

Today, we’re excited to share the next step in that journey: a more intuitive and reliable NuGet authentication experience. With the latest update, Visual Studio now proactively detects when authentication is needed during package restore and presents a new dialog that provides helpful context—such as which feed you’re attempting to access—and makes it easy to select the account best suited for the job. This small but impactful change simplifies the sign-in process, reduces authentication prompts, and helps you stay focused on your coding needs.

Here’s what you can expect:

  • Clearer sign-in guidance showing you the specific NuGet feed you are accessing.
  • Improved support for multi-factor authentication (MFA) allows you to efficiently manage accounts needed for NuGet restore operations, whether adding new accounts, selecting from existing ones, or re-entering credentials directly within the dialog.
  • A more predictable sign in experience, with fewer repeated prompts and less authentication guesswork.

Try It Out and Keep the Feedback ComingWe’ll continue investing in making the Visual Studio’s identity and authentication experiences more seamless, secure, and intuitive so please, keep the feedback coming— Every suggestion, upvote, and report helps us prioritize the areas that matter most to you. And while we’ve made great progress, we’re far from done!

The post Connecting to Private NuGet Feeds Just Got Easier appeared first on Visual Studio Blog.

View Details

Introducing GitHub Copilot app modernization – Upgrade for .NETYou probably don’t look forward to the process of modernizing your applications. It can be time consuming, risky, and full of manual toil. Today we’re changing that.

We’re thrilled to introduce the public preview of GitHub Copilot app modernization – Upgrade for .NET, an AI-powered experience that helps you bring your .NET applications to the latest version quicker and more confidently than ever before. Powered by GitHub Copilot and Agent Mode, it serves as an intelligent upgrade companion that understands your code, determines the right upgrade path, and applies changes step by step with minimal manual effort.

Read more about the public preview on our .NET blog.

Get Started with Faster .NET Upgrades Today!Getting started with GitHub Copilot app modernization – Upgrade for .NET is easy.

Step 1: Install the ExtensionHead to the Visual Studio Marketplace and download the GitHub Copilot app modernization – Upgrade for .NET extension. Once installed, you’re ready!

Step 2: Use Copilot Agent ModeTo unlock the full power of AI-assisted upgrades, install the latest version of Visual Studio 17.14 and sign-in to a GitHub account with an active Copilot subscription.

  1. Ensure you have agent mode enabled: In Visual Studio, go to Tools > Options > GitHub > Copilot > Copilot Chat and select “Enable agent mode in the chat pane.”
  2. Turn on Agent Mode: To get started, open the GitHub Copilot Chat window, click the “Ask” button, then click “Agent”. This turns on Copilot Agent Mode, which gives you a smarter, more natural way to do the upgrades.
  3. Select the Upgrade Tool: Once in Copilot Agent Mode, be sure to select the “Upgrade” tool from the Copilot Chat Tool Selector. Otherwise, Agent Mode won’t be able to use the specialized upgrade tools.

For more information on Agent Mode, check out our blog on the topic.

How to Run the UpgradeYou’ve got two options:

Right-click your project or solution in Solution Explorer and select “Upgrade with GitHub Copilot”

Or, just tell Copilot what you want to do in the chat: “Upgrade my solution to .NET 8”

That’s it. GitHub Copilot gets to work analyzing your code, preparing the upgrade, and guiding you through code changes.

What’s Included? Automated code transformations: Copilot automatically makes the changes required to get your applications running on modern .NET.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2025/05/GHCPUA-Update-Progress-Focus-1.mp4 Customizable workflows: You can tailor which projects to upgrade, whether to address packages with security vulnerabilities in your upgrade, and more.

Learning from your manual changes: When manual intervention is required, GitHub Copilot can learn from your manual changes and apply those learnings if it encounters a similar situation later on in your upgrade.

Git Integration: Git commits are automatically created on your behalf so that you can adopt and test changes incrementally.

Automatic test validation: It automatically runs your application’s unit tests to ensure correct behavior post-upgrade.

Agent Mode functionality: Take advantage of Copilot Agent Mode with the latest preview version of Visual Studio installed.

Please Share Your FeedbackStart your upgrade journey today with GitHub Copilot app modernization – Upgrade for .NET! Your feedback is crucial to us as we aim to improve the product during this public preview. To share feedback with the team, please utilize the “Leave Feedback” button in the upper right corner of the Upgrade Manager UX in Visual Studio.

We also welcome feedback via email to ghcpuacusteng@microsoft.com, as well as direct responses to our feedback survey.

Check out the new Visual Studio HubStay connected with everything Visual Studio in one place! Visit the Visual Studio Hub for the latest release notes, YouTube videos, social updates, and community discussions.

The post Faster .NET Upgrades Powered by GitHub Copilot appeared first on Visual Studio Blog.

View Details

Microsoft Build 2025 Is Here! — How to Make the Most of It VirtuallyIt’s that time again—Microsoft Build has started! Microsoft Build 2025 runs this week (May 19–22)—and now’s the perfect time to catch the sessions live or watch past sessions on-demand.

This year, Build is more accessible than ever. Every keynote, breakout session, demo theater, and even our hands-on labs are available to stream—live or on-demand—completely free. No travel. No ticket. Just you, your browser, and some of the best developer content of the year.

I’ve had the privilege of working alongside our Product Managers and Engineering teams to help bring these new experiences to life. And I can confidently say—this year’s lineup is comprehensive, with something for every Visual Studio user. From deep dives into .NET and GitHub Copilot in Visual Studio, to lightning-fast demo theaters and hands-on labs powered by the Microsoft Skillable platform, there’s truly something for everyone.

SCHEDULE BUILDERStep 1: Customize Your ScheduleIf you do just one thing today, head over to build.microsoft.com and use the free Schedule Builder. It’s the easiest way to:

  • Add Must Watch sessions from Satya Nadella, Kevin Scott, Amanda Silver, and Scott Guthrie and friends.
  • Pick breakouts tailored to your interests—Visual Studio, AI agents, .NET 9, GitHub Copilot, Azure, and more.
  • Queue up on-demand sessions you can catch later, even after the event ends.

And this year, keep an eye out for “AI Agents” and “Agentic” —a new way to think about how AI works with you, not just for you. Visual Studio is evolving, and the sessions hinting at this shift are worth flagging.

Step 2: Prioritize Live Viewing (and Must-Watch Sessions)Many sessions—especially keynotes—feature live Q&A and real-time demos you won’t want to miss. And with 133 sessions focused on Developer Tools and .NET, there’s truly something for everyone.

I encourage you to use the schedule builder and find the topics you’re interested in. Here are just a few I’ll be attending in person to help get you started:

Must Watch! Opening Keynote with Satya Nadella – Big-picture announcements across AI, Copilot, and developer platforms. * Unpacking the tech with Kevin Scott, Charles Lamanna, and Scott Guthrie – A deeper look at what’s next for developers using Microsoft tools. * Reimagining Software Development and DevOps with Agentic AI – Amanda Silver and Mario Rodriguez show how Agentic AI is being infused across the entire development lifecycle—from brainstorming to release. See how GitHub Copilot is evolving to help teams plan smarter, code faster, and stay in flow across Visual Studio and GitHub. * Epic Closing Demo with Mark Russinovich and Scott Hanselman* -A high-energy, code-first finale weaving together Build’s boldest tech—from Copilot PCs to frontier models, Visual Studio, and vibe coding—all live with Mark and Scott.

More to add to your watch list: Top GitHub Copilot Features You Missed in Visual Studio 2022 – Visual Studio now delivers its most AI-powered experience yet—with GitHub Copilot deeply integrated into your daily workflow. In this session, we’ll walk through the latest Copilot features lighting up in Visual Studio, including Agent Mode (Preview), which brings goal-driven, multi-step assistance right into the IDE. * The Future of .NET App Modernization Streamlined with AI – GitHub Copilot and Agents are transforming how developers modernize their applications and get them cloud ready. Come see how GitHub Copilot Upgrade for .NET helps you upgrade your .NET applications directly from Visual Studio. From project and dependency analysis, plan execution, automatic self-healing, detailed reporting, and more. Hear from industry experts who are transforming their .NET app modernization with GitHub Copilot. * Yet “Another Highly Technical Talk” with Hanselman and Toub – Following from their “Highly Technical Talk” at Build 2024, join Scott Hanselman and partner software engineer Stephen Toub for another talk that is 100% LIVE demo. Zero slides, just code. In this “highly technical talk” on the internals of .NET, they’ll look for performance issues and fix them live on stage. In this talk, you’ll learn debugging, performance, and optimization skills. If you are super advanced, level up, and let’s see how deep you can go! * Unleash Developer Potential with AI and Dev Box –* Microsoft Dev Box is reimagining the developer environment. See how this customizable, project-focused platform supports AI development with flexible compute, seamless integration with Visual Studio and VS Code, and team-specific setups that go beyond traditional VDI. Learn how Dev Box is enabling the next generation of productivity.

Demo Theaters and Labs:Demo Theaters and Labs give you two great ways to explore what’s new. Demos are quick, 15-minute lightning sessions—perfect for discovering new features and getting inspired fast. Labs go deeper with guided, hands-on experiences you can follow step-by-step, right in your browser. Whether you join live or watch later, both formats are available online and designed to fit your pace.

  • Lab: Hands-on with GitHub Copilot in Visual Studio – Want to go from curious to confident with Copilot in Visual Studio? This lab walks you through real scenarios that show just how integrated and helpful Copilot has become.Get guided, interactive practice using AI inside the IDE.
  • Demo: Build, Deploy & Use Your First Model Context Protocol (MCP) Server – Curious about what MCP really is? This lightning-fast session will walk you through building your very first Model Context Protocol server from scratch. You’ll create it in VS Code, test it live, and deploy it—learning why this matters for agent-based development along the way.

Can’t catch them all live? No worries—everything is available on-demand after Build so you can watch at your own pace.

Step 3: Stay ConnectedFollow the conversation on #MSBuild, #VisualStudio and #dotNET on X. Ask questions, share what you’re learning, and connect with other developers from around the world. You’ll find inspiration in the comments—and maybe even a new collaborator.

Use the Schedule Builder today.Start building your watchlist now at build.microsoft.com, and I’ll see you—virtually—next week.

Let’s code the future together.

….Jim


Check out the new Visual Studio HubStay connected with everything Visual Studio in one place! Visit the Visual Studio Hub for the latest release notes, YouTube videos, social updates, and community discussions.

Appreciation for your feedbackYour feedback helps us improve Visual Studio, making it an even more powerful tool for developers. We are immensely grateful for your contributions and look forward to your continued support. By sharing your thoughts, ideas, and any issues you encounter through Developer Community, you help us improve and shape the future of Visual Studio.

The post How to Watch Microsoft Build 2025 Online appeared first on Visual Studio Blog.

View Details

As Visual Studio transitions its core packages and services to an async loading/retrieval model, we’ve identified bugs in both the initial async implementation and the existing synchronous package loading mechanism.

While most of these bug fixes have been transparent to extenders, one requires attention due to changed constraints. This post highlights that change. Note that this is only applicable to VSSDK based extensions and does not apply to VisualStudio.Extensiblity. For more information on the differences between extensibility models in Visual Studio, please refer to this documentation: Choose the right Visual Studio extensibility model for you – Visual Studio (Windows) | Microsoft Learn

SummaryThe change prevents cyclical package load requests to avoid a race condition where service requests, which should never return null, may occasionally do so. Cyclical package loads were never recommended, and any previous success was due to design decisions made over 25 years ago when Visual Studio was primarily single-threaded, and package loads had to occur on the UI thread.

If you trigger a cyclical package load request it will fail with an HRESULT of 0x80049283 (VS_E_CYCLICPACKAGELOAD). For managed callers this would surface as a COMException with that HRESULT, for native callers the HRESULT would be returned directly.

The change occurred in 17.12 Preview 2 (version 17.12.35309.182) and is present in all subsequent previews and releases.

Background ContextService Discovery 101In Visual Studio, a service is tied to a package. When the service is requested, the package loads (if not already loaded) and registers a service factory (IServiceProvider) to retrieve the service instance.

Typically, service factories are registered in the package’s Initialize(Async) method (or SetSite for native packages).

The service retrieval path in Visual Studio works as follows:

  1. Caller A asks for Service B
  2. The service manager checks if a service factory for Service B is already registered. If so, it invokes the factory and returns the result.
  3. If no factory is registered, it checks if the package providing the service factory is loaded. If loaded, the request fails, as the service cannot be acquired.
  4. If the package is not loaded, it loads the package, expecting it to register the service factory, and checks again for registration.
  5. If no factory is registered, the request fails.
  6. If a factory is registered, it is invoked to retrieve the service instance.

The ProblemThe issue arises when a recursive package load is required.

So, for example, if Package A is currently loading and it calls GetService to get a service it itself provides. This creates a loop in the package load request chain as A is loading and has entered a code path, that to complete, must wait for A to finish loading.

Another example would be if Package A is currently loading and calls GetService on a service that comes from Package B. If Package B, during its load, calls GetService on a service that comes from package A we again have a loop in the package load request chain.

These loops can be arbitrarily long (i.e. Package A triggers Package B to load, which triggers package C to load, which triggers package D to load …. which triggers Package A to load).

If a service being requested during a package load from a package that is currently loading then:

  • If the package has registered the service factory before the request is made, the service manager invokes the factory and returns the service—this is the ideal path.
  • If the package has not registered the service factory before the request is made, a problem occurs. When the service manager checks if the package is loaded, it detects the package is still loading (not fully loaded). If it blocks waiting for the package to finish loading, a deadlock occurs, as the package load waits for the service return, but that requires the package load to complete. If it ignores the loading state, it returns null, since the service factory hasn’t been registered yet.

To make this work, the original design marked a package as “loaded” right before its Initialize/SetSite was called.

This was a reasonable compromise in the context of the time, as all package loads were synchronous and occurred on the UI thread, eliminating concerns about concurrent load requests. It also allowed cycles to “work” if the service-providing package registered all its services before attempting to retrieve any services that could lead to a cycle.

So Why the Change?The term “work” was used in quotes because, while it sometimes worked, it was unreliable. For it to work, all packages had to register their service factories before making requests that could introduce a cycle. This was unenforceable, error-prone, and led to issues where internal packages would re-query for services if the initial request returned null. It was also susceptible to failure from minor changes, like refactoring initialization code or altering the load order of packages, which could invert the request chain and break the cycle (or introduce another).

Additionally, this approach only worked in a single-threaded loading model, which Visual Studio no longer uses.

In a multi-threaded loading model, the likelihood of race conditions increases. If a package is marked as loaded before its SetSite/Initialize method is called, a request from another thread may consider the package already loaded and attempt to retrieve the service, racing with the original package’s service factory registration.

To prevent null services from being returned due to this race condition, we must ensure that all loads, except the original request, block until the package initialization completes (until Initialize(Async)/SetSite returns). However, blocking on in-progress loads should only occur if the calling thread is independent of the original thread that initiated the load; otherwise, it could deadlock the entire process.

The FixTo solve this problem, we rely on AsyncLazy to manage package loads. AsyncLazy uses AsyncLocal to detect re-entrant invocations. It can determine, from the context of any thread, if the caller is related to the original thread that invoked AsyncLazy’s value factory. If so, it throws an exception; if not, it blocks the caller until the original invocation completes.

This behavior is exactly what we need, but it means cyclic load requests will now throw an exception, causing a failure. While this is unavoidable (and actually desirable), it represents a change in behavior. This approach ensures a package isn’t considered loaded until its Initialize(Async)/SetSite completes, eliminating the registration race condition, and properly handles concurrent load requests—blocking if unrelated to the original load, or failing otherwise.

Call to ActionThis change is necessary to prevent a race condition, which arises from how Visual Studio services are discovered.

Ways to avoid cyclesSince cycles are no longer allowed, it’s important to avoid creating them. The good news is that changes made to address these issues will also work in older versions, as cycles were never a good idea. While race conditions still exist in older versions, these cannot be avoided without applying this fix more broadly, which would impact a larger user base.

The most common mistake we observed was developers being too eager in Initialize(Async)/SetSite, often leading to cycles. Specifically, people would:

  1. Eagerly create service instances, which often required fetching other services.
  2. Eagerly create tool windows, which also required fetching services.
  3. Eagerly fetch services to store in backing fields, even if they weren’t used in Initialize(Async)/SetSite.

Your Initialize(Async)/SetSite should do minimal work. You won’t know why your package was loaded, but if it was to retrieve a service or load a tool window, those actions will occur by a follow-up call after Initialize(Async)/SetSite completes.

To avoid cycles, services can be retrieved “just in time” using Lazy or AsyncLazy outside of Initialize(Async)/SetSite. Similarly, while service factories should be registered eagerly, the actual service creation (which can involve fetching other services) happens only after the package is fully loaded, eliminating the cycle risk.

Tool windows should also be created outside Initialize(Async)/SetSite, and any required services can be fetched at that point. An example of this pattern can be seen here: Upgrading to Visual Studio 2022 17.12.1 displays error Exception from HRESULT: 0x80049283 – Developer Community In this case the extension is eagerly creating its toolwindow inside its InitializeAsync, this is unnecessary. A separate call will be made by the environment when your toolwindow is needed.

Customer ValueThis change was made to reduce instances of services returning null when they should never do so. Such failures are problematic because if the caller doesn’t null-check the result, it could crash Visual Studio. If they do check for null, they must handle the missing service appropriately. Most users opted to disable functionality that depended on the missing service, leading to inconsistent behavior—where Visual Studio sometimes appeared to lack features that worked in previous sessions, even though the code hadn’t changed.

For extenders, this change adds some extra work, but it also eliminates the uncertainty around services occasionally returning null. They can now consistently treat null as either a fatal error or an indication that a feature is unavailable, rather than a strange, self-correcting issue that might resolve with a retry.

Conclusion + ThanksWe understand that changes to “working” code are generally undesirable. Initially, we didn’t expect many people to be affected, but after issues were reported by two internal teams and one external team, we realized a fix we anticipated would be non-disruptive was, in fact, impacting extenders.

This post was directly motivated by user feedback, which alerted us to the issue, rather than users silently adjusting their code without fully understanding the cause, for that we are grateful.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post New restrictions on package loading appeared first on Visual Studio Blog.

View Details

We are pleased to announce the release of Visual Studio 2022 v17.14 Preview 1, marking the initial preview of our next update to Visual Studio. This update prioritizes delivering exceptional developer experiences, with an emphasis on stability and security, as well as AI enhancements. Download the preview and see the full list of enhancements in the release notes.

Stability & securityIn this release, we’re focusing on bug fixes that help make Visual Studio more stable and secure. This is something we do from time to time. Our goal is to ensure that developers can work in a reliable and secure environment without disruptions. By addressing critical issues and enhancing overall performance, we aim to provide a seamless development experience. Our commitment to stability and security means rigorous testing and quality assurance processes are in place, ensuring that every aspect of the IDE functions optimally.

AI improvementsVisual Studio 2022 v17.14 includes AI features that aim to improve developer productivity by automating routine tasks, providing code suggestions, and enhancing coding efficiency. The platform offers AI-assisted code completion, refactoring tools, and personalized insights, allowing developers to write more efficient code and focus on complex aspects of their projects, potentially speeding up development cycles.

Download Visual Studio PreviewWe hope you enjoy this preview of Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

You can download the preview from our website or update it from within the IDE. Please note that you should not use this preview in production environments, and some extensions or workloads may not be compatible with it.

Thank you for using Visual Studio and happy coding!

The post First preview of Visual Studio 2022 v17.14 appeared first on Visual Studio Blog.

View Details

We are excited to announce the availability of Visual Studio 2022 v17.13. This update focuses on stability and security, along with continuous improvements for all developers using Visual Studio.

Based on your feature requests, several new tools and enhancements have been added to this release. This update includes improvements for developers, such as advanced debugging capabilities, efficient code management, and enhanced security features. These additions aim to simplify workflows and boost productivity.

Download Visual Studio 2022 v17.13For detailed information on each new feature, check out the release notes. If you’re pressed for time, here are the key highlights.

Productivity Customize file encoding: Specify the default encoding for saving files in Visual Studio. * Reimagine the horizontal scrollbar: The horizontal scrollbar in the editor now repositions itself to always be accessible, even when space is limited. * Choose whether to indent word wrap: You can now specify whether lines that wrap in the editor should be indented. * Navigate to recent files in Code Search: In Code Search, you can now easily jump between your recent files. * Enhanced line & column navigation*: Visual Studio now supports advanced line and column navigation in Code Search.

GitHub Copilot Meet GitHub Copilot Free: GitHub Copilot Free is now available, gives you 2,000 code completions and 50 chat requests per month at no cost—all seamlessly integrated into Visual Studio. * AI-enhanced Feature Search: You can now ask GitHub Copilot to get detailed responses for your queries. * Use GitHub Copilot Edits across files: Iterate across multiple files more efficiently. * GitHub Copilot shortcuts: New keyboard shortcuts for threads in GitHub Copilot Chat. * Slash command expansions*: Enhance slash commands by expanding into natural language.

Debugging & diagnostics Highlight syntax with IEnumerable Visualizer: Enhanced editable expression with syntax highlighting is now available. * Craft complex LINQ queries: Enhanced editable expression with GitHub Copilot Inline Chat directly in the IEnumerable Visualizer. * Streamline debugging for native code: The Visual Studio profiler’s instrumentation tool now supports targeted instrumentation for native code. * Thread summaries in Parallel Stacks: Enhance the debugging process with AI thread summaries in Parallel Stacks. * Display unified async stacks in profiler: The Visual Studio profiler unifies async stacks for streamlined .NET profiling. * Use color-coded swim lanes for CPU profiling*: The Visual Studio profiler enables multiprocess CPU analysis with color-coded graphs and filtering.

Git tooling Add comments on pull requests: Review pull requests in Visual Studio by adding new comments to the files on the checked-out branch. * Catch issues at commit time: Get GitHub Copilot-powered suggestions for your code changes to help you catch potential issues early and improve your code quality. * View and manage Git tags*: Navigate and push Git tags seamlessly from Visual Studio.

IDE Preserve font preferences across themes: Changing themes will now preserve your font and font size preferences. * Onboard a GitHub account: Add GitHub accounts from the first launch wizard or the Visual Studio shell. * Manage multiple GitHub accounts: Add multiple GitHub accounts and set an active account to drive GitHub features like GitHub Copilot and version control. * Add a new markdown file: Adding a new markdown file just got easier with the new template available in the Add New Item dialog. * Check out the new features in the Teams Toolkit*: Learn about the Teams Toolkit improvements in the new release.

Cloud Leverage .NET Aspire and Azure Functions: Azure Functions can now use .NET Aspire to integrate serverless technology into .NET Aspire. * Launch a new Docker configuration: Enable depends_on support with the DependencyAwareStart launch configuration option. * Add scale to Docker Compose*: The scale property in Docker Compose is now supported.

Web Extract HTML to Razor component: Use a code action to easily extract HTML to a Razor component in Visual Studio. * Disable format on paste for Razor files*: You can now disable the format on paste feature for Razor in Visual Studio.

Data Use SDK-style SQL projects in SSDT*: You can now use the SDK-style project file format in your SQL Server Data Tools projects with enhanced SQL debugging and schema comparison capabilities.

Stay in touchAs you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Visual Studio 2022 v17.13 is Now Available! appeared first on Visual Studio Blog.

View Details

We continue to invest in the VisualStudio.Extensibility SDK to allow developers like you to create extensions that run faster and smoother than ever before! VisualStudio.Extensibility helps you build extensions that run outside the main Visual Studio IDE process for improved performance and reliability, and that can be installed without the need to restart Visual Studio. Additional benefits include a sleek and intuitive .NET 8-based API and comprehensive, well-maintained documentation to help you develop amazing extensions faster than ever before.

Get Started with VisualStudio.ExtensibilityIn the recent releases of Visual Studio, we’ve focused on documenting features that are polished for GA, so we haven’t blogged often about features available only in the preview channel. However, some features are worthy of early announcement to gather feedback so we can iterate earlier and make the experience better. Today, we’re writing about one such feature – managing the .NET runtime versions, which is available for you to try out in 17.14 Preview 1.

A key benefit of VisualStudio.Extensibility is that extensions can run out of process on .NET 8, giving you access to a modern, more performant runtime. However, .NET has some fundamental differences from .NET Framework (netfx): each version of the runtime can run side by side and each version of the runtime goes out of support faster than netfx. A new version of .NET comes out every year, with odd number releases receiving 18 months of support, and even number releases receiving 36 months (see here for the official .NET support policy). Thus, for extensions running out of process on VisualStudio.Extensibility, we must roll forward our version of .NET every so often, even after Visual Studio 2022 is past active development and goes into servicing. To get more details on Visual Studio’s support policy, please see here.

In 17.14 preview 1, we are introducing the experience that extension developers and consumers can expect when .NET runtime versions roll forward. The following diagram provides a sample timeline of what you can expect for VisualStudio.Extensibility extensions in VS 2022 in the coming years with respect to .NET runtime versions:

Extension consumers should not expect major or intrusive changes to their workflow when .NET runtime versions are rolled forward. Visual Studio will continue to load their VisualStudio.Extensibility extensions, even if these extensions do not specify that they target the latest supported version of .NET. Let’s wind back time and suppose VisualStudio.Extensibility extensions started running on the .NET 6 runtime. With .NET 6 having just reached its end of life, Visual Studio will now load VisualStudio.Extensibility extensions on .NET 8 runtime, even if the extension did not specify that it supports .NET 8. The following screenshot displays the information (icon) displayed when Visual Studio loads an extension that does not specify it supports the installed .NET runtime. When .NET 8 reaches end-of-life, users can expect a similar transition from .NET 8 to .NET 10.

For extension developers, you will have an opportunity to try loading your extensions in the new runtime version before the current runtime goes out of support. The following screenshot displays the new F5 debug experience when a new .NET runtime version is available.

For more information on how to configure your extension to run against different runtimes, please see our official documentation on the subject here.

We understand that this model of updating the runtime even when Visual Studio 2022 goes out of active development deviates from how extensions are typically maintained in the in-proc, VSSDK model. For developers familiar with .NET, each version brings about breaking changes, although they are often scoped and announced well in advance. As with most .NET applications, the majority of extensions do not need to be rewritten or updated to target the latest .NET runtime version. If you as extension developers do not want to take on the additional burden of considering .NET runtime version compatibility, you can also choose to run their VisualStudio.Extensibility extension in the main devenv.exe process against the .NET Framework runtime. However, in doing so you would lose the ability to install your extensions without restarting Visual Studio, since the extensions are no longer run in isolation.

This is a big shift, so we anticipate a lot of questions around this. We urge you to use our GitHub repo to file issues or sound off your concerns in this Developer Community feedback ticket if you have questions or concerns regarding this change.

We want to hear from you!The time and effort you’ve spent reporting issues and sharing suggestions so far has been instrumental in shaping VisualStudio.Extensibility. We need your help as we continue to develop VisualStudio.Extensibility! Please try out the features and APIs announced and let us know what you think. Check out the docs, browse the code samples, and build your first extension. You can send feedback and report issues through our issue tracker.

To request features, look at Developer Community to see if someone else made a similar request first. Create a new one if you can’t find a similar request. By checking for similar requests and upvoting and commenting on them, you help us better prioritize requests. Give VisualStudio.Extensibility a try today and share your thoughts with us!

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post VisualStudio.Extensibility: Managing .NET runtime versions appeared first on Visual Studio Blog.

View Details

Many users have requested adding support for Request Variables in HTTP files in Visual Studio. With Request Variables, you can send an HTTP request and then use data from the response, or request, in any subsequent request that is sent from the HTTP file. We have also added support for a shared environment, $shared, which enables you to share variables across different environments. In this post we will outline the new support which has been added for Request Variables and more. All the features listed in this post are included in Visual Studio 2022 17.12+.

Request VariablesWhen working with APIs it’s common to get a value from an endpoint and then use that value in a subsequent request. This can be achieved by using Request Variables. We have docs for Request Variables, but we will go over everything here as well. One of the more common scenarios for using Request Variables is when you call into an endpoint to authenticate to the APIs and get a token back which can be used for future requests. The sample request below is for David Fowler’s TodoApi sample. The API has an endpoint where you can create a new user by supplying the username and password. This is the endpoint that we are making a request to.

@username = bloguser# login and save the response as "login"# @name loginPOST {{TodoApi_HostAddress}}/users/tokenContent-Type: application/json{ "username": "{{username}}", "password": "{{password}}"}### In this case the username is defined in the HTTP file, but the password is stored securely using HTTP Environments. The request below is to the /users/token endpoint, and we pass in the username and password as a part of the body of the HTTP request. The special sauce that makes this a Request Variable, sometimes referred to as Named Request, is the line immediately above the comment.

```

@name login

``` After sending this request in Visual Studio you can then get values from the response, or the request. In snippet below, you can see how we use the login Request Variable to access the token which was returned as a part of the response when it was submitted. The login response body contained a single value, token. Now that we have logged in, we can create a TODO item with the request below.

```

Create a TODO item# @name todo1POST {{TodoApi_HostAddress}}/todosAuthorization: Bearer {{login.response.body.$.token}}Content-Type: application/json{ "title": "Write blog post"}

``` In this request we extract the token value and use it to specify the value for the Authorization header. The syntax {{login.response.body.$.token}}. Let’s take a closer look at the syntax.

{{login.response.body.$.token}} Below is a table summarizing the syntax for using values from Request Variables.

| Element | Description | | requestVarName (login in this case) | Request Variable which is being referenced. | | response|request | Whether the value will be extracted from the response or the request. | | body|headers | Whether the value will be extracted from the headers or body of the request or response (as specified in response|request). | | |JSONPath|XPath|Header | The expression that will be evaluated to extract the result.For a request returning a JSON body, use a JSONPath expression.For a request returning an XML body, use XPath. will return the entire result.* cannot be used when extracting from headers. |

For the sample request above, we are extracting the token from the response and passing it in as a header for the request to the /todos endpoint. After we send this request, the result that is returned is shown below.

{ "id": 36, "title": "Write blog post", "isComplete": false} Now that we have created a TODO item, we can update that item with the request below. If you noticed the request above has declared a Request Variable named todo1, so we can refer to values from the response, or request, using that. Let’s update the title to add “ today” at the end of the current title. The request below will update the TODO item. We will use PUT since this is an update to an existing item.

PUT {{TodoApi_HostAddress}}/todos/{{todo1.response.body.$.id}}Authorization: Bearer {{login.response.body.$.token}}Content-Type: application/json{ "id": {{todo1.response.body.$.id}}, "title": "{{todo1.response.body.$.title}} today", "isComplete": {{todo1.response.body.$.isComplete}}}### In this request we use data from the original todo1 request to populate the body of the PUT request. Notice that the title property appends “ today” to the end of the existing title. After sending this request, the result was.

{ "id": 36, "title": "Write blog post today", "isComplete": false} Here you can see that the title of the blog post was successfully updated. In these examples I have shown working with “flat” JSON results, but you can use any JSONPath expression to extract the data from the response, or request, body. If your endpoints are returning XML, use an XPath expression instead of JSONPath. Let’s move on to discuss the support for $shared.

$shared EnvironmentWhen working with HTTP environments you can define multiple different environments for your HTTP requests. For example, you may create a dev environment which refers to your API which is running locally and a test environment when you want to send request to a remote test environment. In these cases, you may want to declare a variable which is made available to all environments. This is exactly what the new $shared environment is for. HTTP environments are defined in a file named http-client.env.json, also http-client.env.json.user. If you create an environment named $shared, the variables will be made available in any environment. If a variable is declared in both $shared and standard environments, the value defined in the standard environment will win. Below is an example HTTP environment file containing a $shared environment and two standard environments.

{ "$shared": { "message": "Default msg from Shared", "username": "httpfile-user", "hosturl": "http://example.com/api/sample" }, "dev": { "hosturl": "http://localhost:5000/api/sample" }, "prod": { "message": "Message from prod environment" }} This is a very basic HTTP environment file where we have a dev and prod environment defined in addition to the $shared. In the dev environment the value for hosturl has been customized to point to localhost and the prod environment has customized the message value. To show how this works we will use a third-party open-source website httpbin.org. httpbin.org is a great tool for API developers. We will create an HTTP file that makes request to httpbin.org and have it return the values which were provided. We will use the /headers endpoint so that httpbin will echo the headers that we send to it. Below is the request that we will send.

GET https://httpbin.org/headersX-Message: {{message}}X-User: {{username}}X-Hosturl: {{hosturl}}### This request will use the variables defined in the HTTP environment in the request sent to httpbin.org. Reminder that you can select the environment in the dropdown in the top right of HTTP file editor. I’ve set the environment to dev, and the result from httpbin.org is shown below.

{ "headers": { "X-Hosturl": "http://localhost:5000/api/sample", "X-Message": "Default msg from Shared", "X-User": "httpfile-user" }} In the response I removed some irrelevant headers. We can see that the values are being populated as expected. The value for hosturl is localhost as specified in the dev environment and the other values come from the $shared. When we switch the environment to prod and send the same request the response is as follows.

{ "headers": { "X-Hosturl": "http://example.com/api/sample", "X-Message": "Message from prod environment", "X-User": "httpfile-user" }} The values for both hosturl and message have changed. The value for hosturl and username are coming from the $shared and message is coming from the value provided in the prod environment. If you send a request without an environment selected, values from $shared will be available. Now we have covered the new support for $shared, we will close out the blog post now.

ClosingIn this post we have covered two new features for HTTP files, Request Variables and $shared in HTTP environments. With Request Variable support you can now create “chained” requests which take values from previous requests. This should enable you to exercise your APIs more in realistic ways than before. In addition, with $shared you can now share variables across environments making it easier for you to work with HTTP environments. If you are new to HTTP files take a look at the docs for more info.

The updates in this post were inspired by feedback from users like yourself. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

The post HTTP File updates for Request Variables and more appeared first on Visual Studio Blog.

View Details

Do you find yourself adjusting your font settings every time you change themes in Visual Studio, We’ve made some changes that we think will help.

The latest update in Visual Studio 2022 allows theme switching without affecting font settings. This feature maintains the selected font face and size regardless of the chosen theme, while font colors continue to adapt to the theme.

Seamless integration for a better user experienceThis improvement is automatically enabled for all users, facilitating a consistent appearance in your coding environment. If you prefer the prior behavior, you can revert it easily. Just navigate to Tools > Manage Preview Features and locate the option Separate font settings from color theme selection. Unchecking this box will once again tie your font directly to the theme.

Why this feature mattersFont choices can be deeply personal, and we know that preserving the right font settings enhances productivity and allows you to focus more on just coding. This feature supports individual preferences for readability, accessibility, and aesthetics, making the development environment both comfortable and efficient.

Thank you for your feedbackThis improvement comes from our invaluable developer feedback community. Your suggestions make Visual Studio better with each update. Keep sharing your thoughts to help us enhance your coding experience.

The post Your fonts are now preserved when changing theme appeared first on Visual Studio Blog.

View Details

When it comes to collaborative software development, clear and effective communication is key. One area that often gets overlooked is the Git commit message. Poorly crafted commit messages can lead to confusion and inefficiencies within a team. That’s why we’ve built on the suggestions and feedback for the AI-generated commit messages, and now you can add custom prompt instructions!

This new capability enables you to tailor commit messages to fit your workflow and team’s standards seamlessly.

This means you have control over the number of lines, the length of the lines, and even the style of the commit message. By specifying these details, you ensure that each commit message is meaningful and consistent with your team’s guidelines. Copilot understands terms like “subject,” “body,” and “footer.” Try out these examples as well:

  • Use all lowercase
  • Limit subject to 50 characters
  • Limit body to 2 sentences
  • Add a footer with three hash marks
  • Follow Conventional Commits standard
  • Use gitmoji

To make use of this feature, simply navigate to Tools > Options > Copilot and input your desired parameters. This customization can significantly enhance your workflow by making commit messages more informative and standardized, ultimately leading to better collaboration and less confusion.

We value your feedbackWe continuously strive to improve our tools based on your feedback. Your insights are invaluable in making Visual Studio an even better platform for developers around the world. We appreciate your ongoing support and encourage you to keep sharing your thoughts with us. Let us know what you think of this feature in this suggestion ticket.

The post Customize your AI-generated git commit messages appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 introduces new options for customizing the collapsed text indicator, which helps in distinguishing between different sections of collapsed text in the editor. This aims to make the coding environment more intuitive and easier to use by providing additional customization for visual cues.

Customizing your coding environmentYou can now personalize the color and background of the editor’s collapsed text indicator independently by setting custom colors for both the collapsed and expanded text indicators. This feature can be accessed via the Tools > Options > Environment > Fonts and Colors menu.

The two new entries in the Test Editor settings list that control the color of the collapsed text indicator are:

  • Collapsed Text Indicator (Collapsed)
  • Collapsed Text Indicator (Expanded)

In addition to customizing the collapsed and expanded colors separately, both the foreground and background colors for these indicators can be set independently from one another.

ConclusionThis new customization feature in Visual Studio 2022 enhances the coding environment by providing clear visual distinctions between different sections of code, making it easier to navigate and manage.

The post Customizing collapsed text Indicators appeared first on Visual Studio Blog.

View Details

GitHub Copilot Edits in Visual Studio 2022 combines the conversational flow of chat and an inline review experience to help you iterate across your codebase with more control and efficiency.

Here’s how Copilot Edits helps with iterating across multiple files:

  • Preview with clarity: Review a clear summary that highlights affected files and proposed changes.
  • Review with flow: View code diffs inline, directly in your editor. Either the TAB key to accept and Alt+Del keys to reject individual changes, or apply/dismiss all at once.
  • Iterate with confidence: Use checkpoints to revisit earlier iterations of a code file or try an alternative approach anytime for novel ideas.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2025/01/edits-final-_-jan-16-_-captions.mp4Available in Visual Studio 2022 17.13, released February 11th. Copilot Edits is available in versions 17.13 and later of Visual Studio 2022, released February 11th, 2025. * To use Copilot Edits, sign in to Visual Studio 2022 with a GitHub account that has access to Copilot, now available to all users with Copilot Free.

Get Visual Studio 2022 17.13*Preview versions of this feature were released in 17.13 Preview, released December 18th, 2024.

Get started with GitHub Copilot Edits in Visual Studio1. Start an Edits thread: In the Copilot Chat window, click the Edits thread button (a “+” symbol with a pencil icon). 2. Describe your changes: Use natural language to describe your edits, just as you would in Copilot Chat. 3. Specify context or let Copilot discover: Copilot Edits will automatically consider your current file, open files, or search for related files across your codebase. You can also specify context using # commands like #errors, #file, #solution.

For more details on how to use Copilot Edits, visit our documentation.

Watch Copilot Edits in ActionWant to see Copilot Edits in action? Check out our deep-dive walkthrough where we demonstrate how to:

  • Use Copilot Edits to make simple and complex edits with the power of natural language.
  • Use Copilot Edits to check your work and fix an issue.

We appreciate your feedbackYour feedback is invaluable for helping us improve Copilot Edits – please share with us on the Developer Community ticket for Copilot Edits or the Send Feedback button in Visual Studio.

The post Iterate across multiple files more efficiently with GitHub Copilot Edits appeared first on Visual Studio Blog.

View Details

We’re excited to announce an all new free plan for GitHub Copilot, available for everyone today in Visual Studio. All you need is a GitHub account. No trial. No subscription. No credit card.

Enable GitHub Copilot Free With GitHub Copilot Free, you’ll receive:* 2,000 code completions per month * 50 chat messages per month * Access to the latest AI models with Anthropic Claude 3.5 Sonnet and Open AI’s GPT-4o.

GitHub Copilot’s Features in Visual StudioGitHub Copilot transforms your Visual Studio experience with powerful features designed to save you time and supercharge your productivity:

Copilot Edits: Multi-File EditingCopilot Edits helps you quickly make changes to multiple files with just one prompt. Edits combines the conversational flow of chat and an inline review experience to help you write code faster and better.

  • Preview with clarity: Know exactly what’s being modified with a summary of the affected files and the proposed changes.
  • Review with flow: View code diffs inline, directly in your editor. Use the TAB key to accept or the Alt+Del key to reject individual changes or apply/dismiss all at once.
  • Iterate with confidence: Use checkpoints to revisit earlier iterations of a code file or try an alternative approach anytime for novel ideas.

Chat with @workspace and @vsCopilot Chat is deeply integrated into your workflow. It understands your entire solution and your Visual Studio environment. Just use commands like @workspace or @vs to get context-specific responses. will intuitively take in your related files and knowledge about the traits your solution to always give you the most relevant responses.

Never write a commit message again Copilot will automatically review staged changes and suggest a commit message for you. You can even customize the prompt to make the generated message sound like you or follow your team’s conventions.

Use Copilot to fix your errors Resolve code errors effortlessly with GitHub Copilot’s file awareness. Now integrated into the lightbulb and error list, Copilot offers fixes and explanations for C# and C++ issues.

Set your breakpoints automaticallyUse Copilot to help you quickly find where to apply breakpoints without manually crafting complex expressions, speed up the debugging process and make it easier to pinpoint and resolve issues in your code.

GitHub Copilot is Everywhere in Visual StudioDiscover the amazing features GitHub Copilot brings to Visual Studio! From boosting productivity to simplifying your coding journey, there’s so much to explore. Check out this video for a deeper dive into all the features and tips to get started.

Enable GitHub Copilot FreeWant to stay in the loop on the newest and most exciting updates for Visual Studio? Follow us on Twitter and LinkedIn, and keep an eye on our blogs for the latest announcements!

The post Announcing a free GitHub Copilot for Visual Studio appeared first on Visual Studio Blog.

View Details

Are you struggling with performance bottlenecks in your applications? Look no further! Visual Studio 2022 introduces the Meter Histogram feature in its performance profiling suite, providing you with the tools to analyze and visualize histogram data like never before.

The Meter Histogram is a key enhancement to Visual Studio’s performance profiling suite. This feature enables you to capture and analyze histogram data generated by various performance instruments, offering clear insights into the distribution of your application’s data. By visualizing this data, you can easily identify patterns and anomalies that may be causing performance bottlenecks.

Understanding histogram data visualizationWhen recording data from histogram instruments, the Meter Histogram feature visualizes the histogram results, providing a clear and intuitive representation of data distribution over time. This visualization helps developers quickly find patterns and anomalies that may be affecting application performance.

Additionally, the swim lane graph offers a detailed, segmented view of performance metrics. This feature enhances your ability to pinpoint and address performance issues by breaking down data into easily digestible segments, making it easier to understand the root cause of any bottlenecks.

In the fast-paced world of software development, optimizing performance is crucial. The Meter Histogram feature in Visual Studio 2022 empowers developers to gain deeper insights into their applications, leading to more efficient and high-performing software. This tool is a must-have for anyone looking to take their performance profiling to the next level.

Continuous improvement, thanks to youWe value your feedback as it helps us make Visual Studio better. If you have any ideas or issues regarding the Meter Histogram feature or anything else, please use the Report a Problem tool in Visual Studio.

Stay connected with the Visual Studio team through Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.

Thank you for choosing Visual Studio!

The post Unlocking insights with Meter Histogram in the profiler appeared first on Visual Studio Blog.

View Details

Ever felt frustrated with the search window cluttering your workspace? The latest feature in Visual Studio 2022 gives you more control over the behavior of the Code and Feature Search window, making your search experience smoother and more efficient.

Some users have shared that the search window feels intrusive, interrupting your work by appearing mid-screen or on the wrong screen and taking up precious screen real estate. You now have the option to turn the search window into a tool window and dock it where you’d like.

Choose how you want your search windowVisual Studio now allows you to dock the search window and perform various tool window actions, like Solution Explorer and other tool windows. The window will continue to pop up by default, but you can now dock, pop out, or auto-hide the search window as a tool window.

After launching Code Search (Ctrl+T or Ctrl+,) or Feature Search (Ctrl+Q), click the box icon with an arrow at the top right of the window. This icon transforms the search window into a versatile tool window, which you can then dock anywhere in your interface and organize your workspace as you like.

If you try it out and decide this feature isn’t for you, you can go back to the popup version of the window by clicking on the box icon with a rectangle.

Streamlined previewing experienceWe’ve also simplified the previewing experience within the search window. The interface has been simplified and cleaned up, providing a more user-friendly experience. A single button, marked with an eye icon, allows you to toggle the preview panel on and off.

Moreover, the preview panel’s position will now automatically adjust based on the dimensions of the search window, ensuring a seamless and adaptable viewing experience.

We appreciate your feedbackWe are deeply grateful for the continuous feedback from our dedicated users, which plays a crucial role in making Visual Studio better with each update. Your input helps us refine and enhance the features that matter most to you.

Thank you for being an integral part of the Visual Studio community. We can’t wait for you to experience the improved search window control in Visual Studio 2022!

The post Dock the Code Search window in Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

Finding the exact line of code where an issue is occurring can be like searching for a needle in a haystack. Whether you are debugging an error on line 43 of a file or diving into a specific section of code, you can efficiently jump to the right places with this newest addition to Code Search.

In Code Search, you can now jump to a specific line in the current file or another file, making it faster and easier to move around your codebase.

Navigate to a line in the current documentNo need to scroll endlessly to find a specific line. With the updated Code Search, you can swiftly jump to any line in the current document by simply typing colon + line number. For example, typing :39 instantly takes you to line 39 in the active file.

Navigate to a line in a different documentBut that’s not all! You can also navigate to a specific line in a certain document by appending the file name with a colon and the line number. For instance, entering Order:43 will direct you to line 43 in the Order.cs file. If you don’t specify the exact file name, the search will try to find the best match for you.

We appreciate your feedbackYour feedback is invaluable to us. It helps us make Visual Studio better with each update. We are excited to see how this new feature will enhance your coding workflow.

From feedback we received during Previews, we’ve already got work lined up to support another format for line navigation. See more at Support Filename(line,column) format in Code Search – Developer Community (visualstudio.com).

We look forward to hearing about your experiences and suggestions.

The post Go to line anywhere with Code Search for Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

Visual Studio 2022’s Connected Services features are being updated to help you start secure. In the past, for example with Azure Storage, we’d inject the entire connection string into your configuration. With this update, we’ve removed the secrets from the UX – and from what we save to configuration – altogether. This means your code has fewer secrets in it, so you won’t push those into your source control repository inadvertently.

Integrated authentication, by defaultPrior to this update, Connected Services would inject secret-inclusive connection strings for resources like Azure Storage into your secrets. If you were using secrets.json for local storage, this would result in your secrets being stored in files on disk.

After this update, your secrets.json will contain no actual secrets, but rather the Azure Storage endpoints for your service instance. Using the latest Azure SDKs, your code connects to your Azure resources using your Visual Studio or Azure CLI login. Locally, your logged-in credential does the magic; in Azure, the app service’s managed identity takes over!

Benefits with this updateEnhanced security: Fewer secrets on disk means your development process is automatically more secure, since you mitigate the potential for these secrets to be inadvertently committed to source control.

Simplified development and deployment: Focus on what you do best – coding – while Connected Services handles the tedious parts, more securely than ever.

Automated configuration: During publishing, your app is seamlessly configured with the necessary identity and roles needed to access resources, making the process smoother than ever.

Thank You for Your FeedbackYour invaluable feedback drives our continuous improvement. We’re thrilled to bring you these enhancements and can’t wait to hear about your experiences with the new Connected Services feature. Happy coding!

The post Connect securely to your Azure resources appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 introduces a new feature to improve the security of publishing applications to Azure App Service. This feature is designed to disable Basic Authentication and enable integrated security for a more secure publishing process.

Basic Authentication has been identified as a less secure method for managing app deployments. Visual Studio 2022 addresses this issue by offering you an option to disable Basic Authentication, which enhances security by using integrated authentication.

The problem with Basic AuthenticationBasic Authentication involves sending user credentials in a format that is not highly secure, making it vulnerable to interception. This poses a risk to the integrity of applications.

Secure publishing with integrated authenticationThe new feature in Visual Studio 2022 disables Basic Authentication and enables integrated security for publishing to Azure App Service. This ensures that publishing credentials is handled securely, reducing the risks associated with Basic Authentication.

When publishing to an Azure App Service that has Basic Authentication enabled (which is not recommended), users will see the Turn on Basic Authentication option, and it will be unchecked by default. Customers who need to retain Basic Authentication can check the box, but given the recommendation is to disable Basic Authentication it’s unchecked by default, so you start secure if this is the first time you’re publishing or, you get secure once you go through the publishing process after you update Visual Studio.

If you’ve created the Web App recently via the portal or this or any future version of Visual Studio, Basic Authentication will be disabled by default. For any Web App that’s already got Basic Authentication disabled, we circumvent inadvertently making the Web App less secure by disabling the checkbox altogether, so you stay secure.

This feature improves the overall security of the publishing process, ensuring that sensitive credentials are not exposed. It also simplifies the process by defaulting to a more secure option, reducing the need for manual security configurations. If, at any point, you need to re-enable Basic Authentication, this is always possible in the Azure Portal.

ConclusionWe deeply appreciate your invaluable feedback, which plays a crucial role in enhancing Visual Studio. Thank you for being a vital part of our community.

The post Security updates to Azure publishing from Visual Studio appeared first on Visual Studio Blog.

View Details

If you haven’t already heard, GitHub just announced Copilot Free! And great news: you can already start using Copilot Free right now in Visual Studio. It’s available now, and we’re putting the finishing touches on a more streamlined experience in January.

We’re excited to bring these benefits to the entire Visual Studio family. With Copilot Free, you’ll have AI-powered tools right at your fingertips—smarter debugging, AI generated commit messages, AI-breakpoint placement, and of course, direct access to Completions, Chat, and much more. Developers have seen a 25% speed increase with Copilot—and now you can experience that boost firsthand in Visual Studio.

Ready to give it a try? Sign up for GitHub Copilot FreeA couple of recommendations1. Try it now: Don’t wait to experience the benefits. Give GitHub Copilot Free a spin in Visual Studio today. Just note that for now, you won’t be notified when you hit your usage limit, but we’ve got you covered with updates coming in January. 2. Stay Updated: Keep your Visual Studio installation current and subscribe to the preview channels. By staying on the cutting edge, you’ll be among the first to enjoy the latest updates, ensuring you get the most out of Copilot Free as we roll out new features.

Looking ahead to JanuaryCopilot Free will be even easier to use in Visual Studio. You’ll see clear indicators when you hit your usage limits—no more guesswork. And if you find yourself needing more, upgrading to a no-limits plan will be smooth and seamless, so you can keep your ideas flowing.

Keep an eye on the latest previews for these updates, and don’t forget to share your feedback through Developer Community!

The post GitHub Copilot Free is here in Visual Studio appeared first on Visual Studio Blog.

View Details

Are you tired of having to repeatedly launch the Find window in Visual Studio to update your search results? Whether you’ve just refactored some code or pulled recent changes, having to redo a search to get updated results is no longer necessary. With the new refresh option, you can now update your Find results without the hassle of starting over.

The Refresh search results button in Visual Studio 2022 will save you time and effort when searching through your code.

Refresh your previous FindNo more friction when updating your earlier Find results! After completing a Find, you can click the clockwise arrow icon to refresh the results instantly. This ensures all changes you’ve made since the last Find are reflected without having to reopen the Find window.

Modify Find to refine search parametersTo avoid confusion, we’ve also relabeled the former Repeat Find to Modify Find, now represented with a pencil icon.

Clicking Modify Find reopens Find in Files with your prior search criteria for that set of results, making it easier to refine your searches and get the results you need.

ConclusionWe are thrilled to bring you these improvements in Visual Studio 2022, aimed at making your development process more efficient and less cumbersome. Your continuous feedback helps us make Visual Studio even better, and we appreciate your ongoing support.

Thank you for being a valued user of Visual Studio. We look forward to hearing more about your experiences with the Refresh functionality in Find Results and are always open to your suggestions for further enhancements.

The post Refresh your Find results appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 now includes support for creating internal repositories for GitHub organizations. This feature allows developers to work within their GitHub organization’s guidelines within the Visual Studio environment more effectively.

Managing repositories involves configuring varying levels of visibility and permissions. Visual Studio 2022’s new feature aims to smooth this process by providing support for internal repositories, ensuring that developers can be aligned with their organization’s polices when they create new repositories.

How it worksIn the Create a Git repository dialog, the visibility of your new repository now includes the new internal option if you’ve selected an account where internal repositories are available. Additionally, Visual Studio now offers detailed guidance for each type of repository. This guidance clarifies the visibility settings of new projects based on the account being used, helping developers ensure the correct setup of their repositories from the outset. If you try to create a repository with the wrong visibility, the action will fail, so that you don’t share your sourcecode with anyone you didn’t mean to.

This functionality reduces the need for leaving Visual Studio to create internal repositories from GitHub – an unfamiliar flow, allowing developers to focus more on coding and less on managing repository settings.

Continuous improvement with your feedbackThe feedback from Visual Studio users has been instrumental in developing these features. This continuous input helps enhance the functionality of Visual Studio, making it a more efficient tool for developers. Leave your thoughts on this feature here.

Thank you for your ongoing feedback, which continues to improve Visual Studio with every update.

The post Create internal GitHub repos for your team appeared first on Visual Studio Blog.

View Details

Have you ever renamed a file in Solution Explorer and wondered if Git is tracking your changes correctly? You’re not alone. Many developers have found this process confusing and worry whether their changes are being properly staged in Git. But worry no more – there’s a solution!

When you rename files in Solution Explorer, Visual Studio 2022 will now remind you to stage your changes to see the renamed files in Git. This small but mighty notification ensures that Git is recognizing your file change.

Why This MattersThere is often confusion on how Git works when you rename files, especially since there’s a specific git mv command that is used when you want to move or rename a file or directory. But don’t be deceived, Git never stores any information to track renames. Even when you run a git mv operation, it’s just a short cut for doing a git rm, and then git add on the file. That’s because Git only looks at code change additions (git add) and removals (git rm) over time. In some views Git runs rename detection as it’s navigating history and may display a set of an addition and removal as a rename, but under the hood it uses a heuristic based on the similarity of the two files to call it a rename instead – and sometimes it gets it wrong!

This shows up in Visual Studio when you rename a file from Solution Explorer and look at your changed files list. In all cases, it is shown as an addition and a removal. Understandably, this can be disconcerting if you’re expecting Git to detect and track the rename and fear you might be losing history information. However, since Git is not tracking renames at all, you won’t be at risk! Your file changes are still in the Git history and can be retrieved. To gain some additional piece of mind, once you stage your files, Git runs the rename detection, and you can see how it resolves the addition and removal into a rename under the staged section. That’s where this new notification comes in.

Tip: If you want to ensure that Git can always identify your file renames when navigating history, you can keep your file naming changes in a separate commit to file content changes. That way, there’s a perfect match between the file that Git sees as removed and the one that Git sees as added, so it’ll correctly detect the rename. This isn’t required and can be inconvenient if it doesn’t match up to your flow but can be helpful when looking through your history later.

User Feedback Driven UpdatesThis feature was developed in response to feedback from the Developer Community. We listened to your concerns and collaborated with you to create a solution that makes your workflow more efficient and stress-free. Your input is invaluable, and we are committed to continuously improving Visual Studio based on your feedback.

We want to extend our heartfelt thanks to our users. Your continuous feedback helps us make Visual Studio better with each release. Keep sharing your thoughts and experiences with us!

The post Boost your Git confidence with the new file rename notification appeared first on Visual Studio Blog.

View Details

Struggling with complex deployment processes for your serverless applications? Visual Studio 2022 introduces a seamless solution with the new Azure Functions Flex Consumption hosting plan, now generally available.

Imagine a world where deploying your serverless applications to a hosting plan that supports fast scaling and VNet is as simple as a right-click. With the Azure Functions Flex Consumption hosting plan, this is now a reality. This feature allows you to right-click publish to Flex directly from Visual Studio 2022, streamlining your workflow and saving valuable time.

One of the standout features of the Flex Consumption plan is its Virtual Network integration at no extra cost. This ensures that your apps can communicate securely with other resources in your Azure infrastructure without incurring additional expenses.

Fast and predictable scalingFlex Consumption offers fast and predictable scaling with instance size choice and per instance concurrency control. This means you can tailor the performance of your applications to meet the specific demands of your users, ensuring a smooth and responsive experience.

Enjoy the benefits of a true serverless environment with scale to zero capabilities. You only pay for instances while they are active, allowing for cost-effective management of your resources. Additionally, the optional Always Ready instances feature mitigates cold starts, providing a more efficient and user-friendly experience.

Try it out todayThe Azure Functions Flex Consumption hosting plan is currently in Preview. Learn more about this feature in our announcement blog post and documentation. Try out one of our samples to see how easy it is to integrate this new functionality into your projects.

Your continuous feedback is invaluable, and it helps us make Visual Studio better with every update. We appreciate your support and look forward to hearing your thoughts on this new feature.

The post Effortless publishing with Azure Functions Flex Consumption appeared first on Visual Studio Blog.

View Details

Get ready for an exciting Microsoft Ignite breakout session where we’re unveiling the latest advancements in GitHub Copilot in Visual Studio! Join Dalia Abo Sheasha, Jessie Houghton, and Scott Hanselman as they dive into how GitHub Copilot is evolving to help developers work smarter, collaborate better, and achieve more.

Register for Ignite now!Here’s a little preview of what we’ll be discussing:

Enhanced AI-Powered Coding ExperienceWe’ll be sharing some powerful new tools that make prompt crafting and code completion smoother than ever. Discover how GitHub Copilot’s conversational abilities are growing to bring even more clarity and productivity to your coding sessions.

Customization and CollaborationOur team is pushing the boundaries on how GitHub Copilot can be tailored to meet your unique workflow and team needs. Learn about new options for customizing Copilot’s responses, from individual preferences to organization-level customizations that make collaboration easier.

Advanced Search and NavigationImagine navigating your codebase faster, with GitHub Copilot offering deeper insights right when you need them. We’ll highlight some exciting features designed to make finding, referencing, and editing code even more seamless.

Intelligent Assistance for Debugging and ReviewEver wish your AI assistant could help you pinpoint issues or suggest improvements? We’re teasing features that aim to do just that — turning GitHub Copilot into a smarter, more interactive debugging and review partner.

The Future of GitHub CopilotFinally, Scott will wrap up with a look at what’s next for GitHub Copilot, including some steps toward a more integrated, intelligent development experience.

Don’t Miss Out! Session DetailsDate: Wednesday, November 20Time: 1:45 PM – 2:30 PM Pacific Standard Time

Watch the breakout session here to see how GitHub Copilot is transforming from an assistive tool into an essential, dynamic coding companion. We can’t wait to share these updates with you!

The post Join Us at Microsoft Ignite: Unlock GitHub Copilot’s New Potential in Visual Studio appeared first on Visual Studio Blog.

View Details

Looking to resolve code issues quickly? The new GitHub Copilot feature integrated into the lightbulb and error list in Visual Studio 2022 offers a valuable solution for developers. Whether you’re working in C# or C++, this feature will help you understand and address problems in your codebase more efficiently.

The integration of GitHub Copilot into Visual Studio 2022 provides quick fixes and insightful explanations right at your fingertips. Say goodbye to sifting through documentation or conducting endless online searches to debug your code. The lightbulb and error list now offers direct access to GitHub Copilot’s AI capabilities, streamlining your development process.

Quick Fixes at Your FingertipsTo get started, simply invoke the lightbulb and select Fix with Copilot. This launches an inline chat with GitHub Copilot, offering you an available fix. This seamless interaction allows you to address issues at once, keeping your workflow uninterrupted.

Insightful explanations for code issuesUnderstanding errors in your code can be challenging, but with GitHub Copilot, clarity is just a click away. Select the GitHub Copilot icon from the error list to open the chat panel, where you’ll find detailed explanations and solutions for the error at hand.

Elevate your coding experienceBy integrating GitHub Copilot, Visual Studio 2022 enhances your coding experience, making it easier to tackle complex problems and improve code quality. We encourage you to explore this feature and see how GitHub Copilot can transform your coding experience.

We deeply appreciate the continuous feedback from our users, which drives us to improve and innovate. Your input is invaluable in making Visual Studio better with each update. Happy coding!

The post Fix code with GitHub Copilot appeared first on Visual Studio Blog.

View Details

We’re excited to announce the availability of Visual Studio 2022 v17.13 Preview 1 – the first preview of our next update to Visual Studio. This update focuses on providing fantastic developer experiences across the board, with a focus on stability & security, and AI & productivity. Download the preview and see the full list of enhancements in the release notes.

Quality & security Ensuring the highest standards of quality and security is paramount. Visual Studio 2022 v17.13 incorporates robust quality and security enhancements designed to provide a seamless and secure development environment. With improved diagnostics and debugging tools, developers can now identify and resolve issues more efficiently, leading to more reliable and stable applications. Furthermore, enhanced security features offer protection against potential threats, safeguarding your code and data. These improvements not only streamline your workflow but also bolster your confidence in delivering high-quality, secure software solutions.

AI & productivity Visual Studio 2022 v17.13 integrates advanced AI to boost developer productivity by automating routine tasks, offering intelligent code suggestions, and enhancing coding efficiency. With AI-assisted code completion, refactoring tools, and personalized insights, developers can write cleaner, more efficient code and focus on complex, creative aspects of their projects, ultimately accelerating development cycles. This new release also brings general productivity improvements across the IDE, making it a robust tool for developers at every level.

Download Visual Studio PreviewWe hope you enjoy this preview of Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

You can download the preview from our website or update it from within the IDE. Please note that you should not use this preview in production environments, and some extensions or workloads may not be compatible with it.

Thank you for using Visual Studio and happy coding!

The post First preview of Visual Studio 2022 v17.13 appeared first on Visual Studio Blog.

View Details

We are thrilled to announce the General Availability (GA) of Visual Studio 2022 version 17.12. This update focuses on providing fantastic developer experiences for working with .NET 9 projects and new AI productivity features, along with continuous improvements for all developers.

Thanks to your continuous feature requests, we’ve incorporated many of them in this release. There’s something new for every developer. We have added several new tools and enhancements that simplify your workflow and improve productivity. Whether you’re looking for advanced debugging capabilities, more efficient code management, or enhanced security features, this update has it all.

Download Visual Studio 2022 v17.12For detailed information on each new feature, check out the release notes. If you’re pressed for time, here are the key highlights.

Productivity Copy from the Error List: Copying an error from the Error List now copies just the description instead of the entire row to the clipboard. * Go to line anywhere in Code Search: In Code Search, you can now navigate to a specific line in the current document or other specified document. * Dock the Code Search window: You can now freely position the Code Search window with capabilities like docking and auto-hiding. * Customize collapsed text indicator: Set custom colors for the collapsed text indicator in the Visual Studio editor. * Refresh your Find results: You can now refresh the results to a previous Find to get up-to-date search matches. * More space for horizontal scrollbar: You can now control the visibility of the file level indicators in CodeLens. * Non-blocking Code Cleanup on save*: When Code Cleanup is run on Save, it now operates in a non-blocking manner, for a smoother coding experience.

GitHub Copilot AI smart variable inspection: Optimize your debugging workflow with Integrated AI variable inspection. * AI-powered IEnumerable visualizer: AI-powered LINQ Editable Expressions in the IEnumerable visualizer. * Fix code with GitHub Copilot: GitHub Copilot assists you in resolving code issues. * Better AI completions for C#: GitHub Copilot brings in additional context from relevant source files to improve completions for C#. * Debug tests with GitHub Copilot*: Get help with debugging failed tests by using Debug Tests with GitHub Copilot.

Debugging & diagnostics Shows method return values when debugging: The debugger now displays inline return values for enhanced debugging efficiency. * Export breakpoint groups with ease: Effortless import and export of breakpoint groups. * Blazor WebAssembly debugging: An improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later. * Meter Histogram in Profiler Counter Tool: Enhanced performance insights using Meter Histogram in Profiler Counter Tool. * Analyze memory use over time*: Select and compare multiple memory snapshots using the Diagnostics Tool window.

Git tooling Manage file renaming with Git: Get peace of mind when renaming files with a new notification. * Pull requests using drafts and templates: Create pull request drafts and start your descriptions with templates in Visual Studio. * Create internal GitHub repos: Visual Studio now supports creating internal repos and includes guidance for each type of repository to give you more confidence when starting a new project. * Copy Git link: You can get a GitHub or Azure DevOps link to a specific line of code to make it easy to share with your colleagues. * Customize your AI Git commit message: You can add additional instructions to the prompt for generating your Git commit message with GitHub Copilot. * Multi-repo for GitHub and Azure DevOps*: You can now create pull requests and link work items in multi-repo scenarios.

IDE Preserve font across theme changes: Changing themes will now remember your font and font size preferences. * Multi-Project Launch Configuration: Streamline debugging by setting up and saving launch profiles for specific projects within multi-project solutions. Share configurations effortlessly with your team. * Copy files between instances: You can now copy files and folders from Solution Explorer in one instance of Visual Studio to another. * Multiple GitHub accounts: You can now add multiple GitHub accounts and set an active account to drive GitHub features like GitHub Copilot and Version Control. * Certificate Revocation Checks: Visual Studio now alerts you if it detects digital certificate problems during network calls. * MotW security warnings: Mark of the web (MotW) security warnings are now integrated into the overall trust functionality. * Teams Toolkit new AI templates*: The Teams Toolkit onboards new AI Teams app templates.

Cloud Azure App Service publish security updates: Publishing to Azure App Service securely using integrated security updates. * Azure WebJobs Linux support: Publishing to Azure WebJobs on Linux is now supported by right-click publish in Visual Studio. * Azure Functions Flex Consumption: Publish to Azure Flex Consumption hosting plan, currently in Preview. * Connected Services security update*: Making your apps and development experienced more secure.

Desktop Enhanced WinUI components search*: Enhance WinUI project setup with improved Visual Studio Installer search, simplifying component location for developers.

Web Request variables in HTTP files: HTTP files now support request variables. That is where you can send a request and then use data from the response, or request, in future requests. * HTTP files shared environment: In HTTP environment files we have added support to share variables across environments. * Vitest support in JavaScript and TypeScript: When using JavaScript and TypeScript projects you can now author test cases with Vitest. * Inlay Hints support for more languages*: Inlay Hint support has been added to JavaScript, TypeScript, Python and Razor as well as a setting to control its behavior.

Data SDK-style SQL projects in SSDT*: You can now use the SDK-style project file format in your SQL Server Data Tools projects.

.NET Achieve more with .NET 9: .NET 9 elevates cloud-native and intelligent app development, focusing on productivity enhancements, streamlined deployments, and accelerated AI integration. * NuGet audits transitive packages*: NuGet is changing default audit settings to include transitive packages.

C++ Set C++ Command Line Arguments: A new way to set your command line arguments right from the toolbar. * Build Insights view explanations: Learn how to use each tab of Build Insights via a newly added link to documentation. * Build Insights path adjustments: Get a clearer view of your file in Build Insights, see full path on hover. * Open Folder for Unreal Engine uproject: A new way of opening your uproject. * Change signature improved*: You can now effectively change signatures with our improved feature for C++.

SHARE YOUR FEEDBACK AND STAY CONNECTEDAs you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Visual Studio 2022 v17.12 with .NET 9 appeared first on Visual Studio Blog.

View Details

We’re excited to announce a significant enhancement to GitHub Copilot that elevates your C# coding experience. Introducing the new update: GitHub Copilot code completions now provide more accurate and relevant autocomplete suggestions by incorporating additional C# context.

Previously, GitHub Copilot generated suggestions based on the content of your currently active file and any other open files in your editor. While this approach was helpful, we have discovered that including more relevant context can greatly improve the quality of these suggestions.

With this latest update, GitHub Copilot now automatically considers semantically relevant files for additional context, even if these files are not open in your editor. This enhancement helps reduce hallucinations and ensures that you receive more pertinent and precise code completions.

Before: Semantically relevant files are not considered as context for GitHub Copilot Completions

without-related-files.mp4″ width=”560″ height=”315″ allowfullscreen=”allowfullscreen”>After: Semantically relevant files are considered as context for GitHub Copilot Completions

without-related-files.mp4″ width=”560″ height=”315″ allowfullscreen=”allowfullscreen”>To dive deeper into how this new feature works and how it can improve your coding productivity, check out our detailed blog post Improving GitHub Copilot Completions in Visual Studio for C# Developers on the .NET blog.

Stay tuned for more updates and thank you for being a part of our developer community.

The post Better GitHub Copilot Completions for C# appeared first on Visual Studio Blog.

View Details

In the fast-evolving world of software development, intuitive AI-driven interactions are becoming essential to unlocking new levels of productivity. Today, we’re excited to share our latest innovation – a guided chat experience within GitHub Copilot that reshapes how developers interact with AI. This guided chat experience is available in Visual Studio 2022 17.12 Preview 3 and above.

This guided way to chat was created with one clear goal in mind: to make interactions between developers and AI more natural, effective, and aligned with everyday workflows. It is our deep belief that conversational AI is the future of development, and we’re committed to leading that transformation.

Making Copilot Conversations Smarter and SimplerAs we’ve refined GitHub Copilot, one thing has become clear: while users appreciate the potential of AI-driven tools, there’s a learning curve. Developers have shared that crafting the right prompt can sometimes feel like a challenge—understanding how to phrase a question, knowing what context to include, and making the most of Copilot’s capabilities. In some cases, the experience left users feeling like they were getting too much or too little from their interactions.

Customer feedback highlights the challenge:

  • “The chat experience is helpful, but I wish it felt more like an assistant—something that could help guide me and give me only what I need without extra noise.”
  • “I love how Copilot just starts generating, but it sometimes feels like I have to sift through a lot to get to what I actually wanted.”

These insights inspired us to rethink how AI should work for developers. Rather than relying only on intent-based commands or predefined prompts, this chat allows for a more fluid, conversational experience—one that adapts to the user’s context and needs.

How does this work? Our guided chat experience takes Copilot beyond simple input-output exchanges, turning it into a collaborative assistant. When the context is clear, Copilot provides direct and relevant answers. When it isn’t, Copilot guides you by asking follow-up questions to ensure clarity and precision.

The implications are significant:

  • More Engagement: Developers spend less time figuring out how to phrase their prompts and more time focused on the task at hand.
  • Less Complexity: Copilot’s ability to guide and clarify reduces the need for developers to navigate complex intent systems.
  • Increased Productivity: With less back-and-forth and more focused responses, developers can move faster through their workflows.

In our early trials, we’ve seen encouraging signs that Guided Chat makes a real difference. So we are excited for you all to try it out.

As we continue refining this guided way to chat, user feedback and engagement will be at the center of our improvements, ensuring that it delivers the intelligent and seamless experience developers need.

Thank you for your continuous feedbackWe owe much of our progress to our users’ invaluable feedback. Your insights and suggestions have been instrumental in making Visual Studio better with each update. We appreciate your continuous support and look forward to bringing you more innovative features.

The post Introducing a new, more conversational way to chat with GitHub Copilot appeared first on Visual Studio Blog.

View Details

What if you could create a robust, versatile client-server application in under 45 minutes? With Visual Studio and GitHub Copilot, this is not only possible but also efficient and enjoyable. This Season of AI, we show you how to use developer tools like GitHub Copilot to create apps from scratch. This season of AI occurs from October 1 through December 30, 2024, and the first 150 speakers with confirmed events will receive a special swag gift pack!

You will experience firsthand how to:

– Develop both server-side and client-side code using .NET, Blazor, and Minimal APIs.

– Run and test your application locally with the Azurite storage emulator.

– Deploy your application to Azure using an automated CI/CD pipeline with GitHub actions.

Whether you’re enhancing the number of users of your app, making your app more reliable, or striving to iterate quicker, dive in and leverage the capabilities of Visual Studio and GitHub Copilot to transform your development workflow.

Learn how to use Copilot in Visual StudioLearn how to use the commands in Visual Studio for Copilot, inline suggestions, and Copilot Chat. Understand the difference between them and use them to quickly create our Blazor frontend and our ASP.NET API Backend, plus create connections for our application to be deployed on Azure using Azure Table storage and WebApp services, lastly adding CI/CD to our project using GitHub Actions.

For this exciting session, we will also guide you through building a simple yet complete Car Database application. This application will retrieve the Car database from Azure Tables and display the data in a user-friendly Web App for everyone to view.

Follow the GitHub tutorial guideLearn how to do this and more in our guide to our Season of AI! There are also more talks ready to be given in the main repository, where you can everything about Copilots and AI. Check them all and organize an event with this content at aka.ms/RegisterSeasonOfAI and enjoy this Season of AI!

The post Learn how to create a Client-Server Application in under 45 Minutes in the new Season of AI appeared first on Visual Studio Blog.

View Details

A lesson about the software forensics process involved in developing the Bring Back Plus/Minus extension, which brings back the plus/minus symbols to the editor outlining feature in Visual Studio 2022.

While I did have the advantage of being able to look at the Visual Studio source code, I could have figured this out just as well without it, and that’s the focus of this article.

The investigation of how to bring back the plus/minus symbols started with this important clue from a comment on the Developer Community feedback ticket for this issue:

However, Visual Studio has a very rich extensibility model, and if users have strong feelings about the visuals in their IDE, I encourage people to try writing an extension to change the icon used here. The class that controls the expansion is this one: OutliningMarginHeaderControl

A quick internet search for the class name led me to this reference article for OutliningMarginHeaderControl Class where the definition contains the following valuable information:

  • Namespace: Microsoft.VisualStudio.Text.Editor
  • Assembly: Microsoft.VisualStudio.Text.UI.Wpf.dll
  • Package: Microsoft.VisualStudio.Text.UI.Wpf v17.9.187

Now that we know where to find this class, it’s time to examine the assembly. For that we will use the excellent ILSpy tool, which you can install from the Microsoft Store: ILSpy Fresh

Once you’ve installed ILSpy, launch it and load the assembly Microsoft.VisualStudio.Text.UI.Wpf.dll. You can find this assembly in the Visual Studio installation folder, usually in the following path:

<VSInstallDir>\Common7\IDE\CommonExtensions\Microsoft\Editor\Microsoft.VisualStudio.Text.UI.Wpf.dll

After the assembly is loaded, search for the class OutliningMarginHeaderControl in the Microsoft.VisualStudio.Text.Editor namespace and you will find the following code for the static constructor:

This is where the default style key for the control is being set. The next step is to find the XAML Style for the control. For that we open the Resources node where we find themes/generic.baml, which includes the entire style for the OutliningMarginHeaderControl:

```

`` This is the style for the new chevron symbols. Here we find interesting things like the geometry for the expand/collapse symbols, the colors, and the trigger that changes the symbol when the control is expanded. The next step is to find the originalStylefor the plus/minus symbols. For that we can either use an older VS installation or we can take advantage of the reference information above, which states that this control is included in theMicrosoft.VisualStudio.Text.UI.Wpf v17.9.187` NuGet package. Now we know that the symbols changed in 17.9, so we will look for a version before that. For example, the last one before that is 17.8.222.

We can download the package, change its extension from .nupkg to .zip, and extract the assembly from the lib\net472 folder. Once we have the assembly, we can load it in ILSpy and look for the original style for the control just like we did before:

```

`` Since the new style no longer uses dynamic resources foroutlining.square, we must assume that these resources are no longer available in the new version of VS. This means that we needed to replace these resources with other colors. For the foregroundoutlining.chevron.foregroundmade sense. The background was a little bit harder becauseoutlining.chevron.backgrounddidn’t do anything. With a little experimenting I had settled onoutlining.collapsehintadornment.background` for the first version of the extension. Both were not ideal or what they used to be – the chevron foreground is quite a bit darker and the background for the plus symbol is a lot lighter than before, but this combination worked in both light and dark themes, and any other existing color resources would look wrong in one theme or another.

How to build a VSIX extension to override the styleTo override the style, I started by creating a new VSIX project with an async package:

Then I added a new ResourceDictionary file Style.xaml to the project and copied the style from the old assembly, pasted it into the ResourceDictionary, and updated it with the new color resource value. Make sure that the Build Action for this Style.xaml is set to Page. I also gave this style a key x:Key="OriginalOutliningMarginHeaderControlStyle", so that I can easily look it up later:

<ResourceDictionaryxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:textUiWpf="clr-namespace:Microsoft.VisualStudio.Text.Editor;assembly=Microsoft.VisualStudio.Text.UI.Wpf"><Style x:Key="OriginalOutliningMarginHeaderControlStyle" TargetType="textUiWpf:OutliningMarginHeaderControl">... The last thing that needed to be done was to override the style in the InitializeAsync method of the package. The following code loads the resource dictionary, looks up the style by its key, and places it in the current application’s resources using the implicit style key typeof(OutliningMarginHeaderControl), so that Visual Studio will find this Style first:

protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) { // When initialized asynchronously, the current thread may be a background thread at this point. // Do any initialization that requires the UI thread after switching to the UI thread. await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); var resourceDictionary = new ResourceDictionary(); resourceDictionary.Source = new Uri("pack://application:,,,/BringBackPlusMinus;component/Style.xaml"); var style = resourceDictionary["OriginalOutliningMarginHeaderControlStyle"]; Application.Current.Resources[typeof(OutliningMarginHeaderControl)] = style; } Building and running the project launched the experimental instance of Visual Studio and voila – the plus/minus symbols were back!

Now all that was left to do was to update the vsixmanifest, build the extension in Release mode, and upload it to the Visual Studio Marketplace following this Walkthrough: Publish a Visual Studio extension.

Adding support for color customizationWhen I started using the preview builds of Visual Studio 2022 17.12, I noticed that the rendering of the plus/minus symbols was broken because the chevron symbol color definition had changed. I decided to introduce a dedicated color definition for the plus/minus symbols to avoid such problems going forward:

[Export(typeof(EditorFormatDefinition))] [Name(OutliningExpanderIdentifier)] [UserVisible(true)] internal sealed class OutliningExpanderFormatDefinition : EditorFormatDefinition { public const string OutliningExpanderIdentifier = "outlining.plusminus"; public OutliningExpanderFormatDefinition() { this.ForegroundColor = Color.FromRgb(0x55, 0x55, 0x55); this.BackgroundColor = Color.FromRgb(0xE2, 0xE2, 0xE2); this.DisplayName = Strings.OutliningMarginPlusMinus; } } As an added benefit the colors are now consistent with the original plus/minus symbols, and they can be customized in Tools -> Options -> Environment -> Fonts and Colors:

To make sure that the colors look correct in the dark theme as well, I added a ThemeColors.xml file to the project with the following content:

<Themes> <Theme Name="Dark" GUID="{1ded0138-47ce-435e-84ef-9ec1f439b749}"> <Category Name="BringBackPlusMinus" GUID="{063E9575-C1A8-4729-BB15-AAA2EFB44FC0}"> <Color Name="outlining.plusminus"> <Background Type="CT_RAW" Source="FF000000" /> <Foreground Type="CT_RAW" Source="FFE2E2E2" /> </Color> </Category> </Theme> </Themes> It needs to be converted to a .pkgdef file using the VsixColorCompiler first, which is then included in the extension’s .vsixmanifest.

ConclusionIn summary, with a little bit of detective work we were able to locate the style for the outlining symbols, build a VSIX extension, and override the style with the original style that brings back the original plus/minus outlining buttons.

The source code for the extension is available on GitHub.

The post The making of Bring Back Plus/Minus appeared first on Visual Studio Blog.

View Details

In Visual Studio 2022 version 17.11, we’ve added a new Unreal Engine toolbar to Visual Studio.

The Unreal Engine toolbar is a new feature that provides quick access to common Unreal Engine tasks. You can find the toolbar at the top of your code window when you have an Unreal Engine project loaded. The toolbar includes the following actions:

Attach to Unreal Engine process: Lets you easily debug your game or editor by attaching to the running Unreal Engine process. You can choose which process to attach to from a drop-down menu.

Rescan Blueprints Cache: Refreshes the cache of Blueprint symbols in Visual Studio, which can help you resolve errors or warnings related to Blueprints.

Unreal Engine Log: Opens the Unreal Engine log window in Visual Studio, where you can view the output of your game or editor. The window captures log messages from running Unreal processes and makes it possible to see the output live while working on the game. You can also filter the log messages by severity or category using the built-in tools in Visual Studio.

Access Unreal Engine Configuration Page: pens the Unreal Engine configuration page in Visual Studio, where you can customize various settings for your Unreal Engine development. For example, you can enable or disable IntelliSense for Unreal Engine types, change the formatting style of your code, or set up additional paths for your project.

The Unreal Engine toolbar is designed to reduce the need to switch between different applications or windows. You can also customize the toolbar by adding or removing actions or moving it to a different location in Visual Studio.

Try it outWe hope you enjoy using the Unreal Engine toolbar in Visual Studio and we would love to hear your feedback. Please let us know what you think by leaving a comment below, or by using the Report a Problem tool in Visual Studio. Your input helps us make Visual Studio better for you and other Unreal Engine developers.

The post Unreal Engine Toolbar in Visual Studio appeared first on Visual Studio Blog.

View Details

Unreal Engine modules help keep your code organized and modular. However, creating modules can be a tedious and error-prone process that involves manually editing configuration files and adding boilerplate code.

Visual Studio 2022 version 17.11 comes with a new dialog to help with this process. With the new Add Module dialog, you can quickly add new modules to your project without leaving Visual Studio or manually editing configurations.

How to use the Add Unreal Engine Module dialogTo use the Add Unreal Engine Module dialog, you need to have an Unreal Engine project open in Visual Studio. You can do this by opening the .sln file generated by the Unreal Editor from your project folder, or by opening the Unreal Engine project directly by opening the folder containing the *.uproject file through File->Open->Folder….

Once you have your project open, right click on the project in Solution Explorer and select Add > Unreal Engine Item. This will open the Add New Item dialog, where you can select Empty Unreal Engine Module to launch the Add Unreal Engine Module dialog. This dialog lets you specify the name, type, loading phase, and path of your new module.

After you click OK, Visual Studio will create the module folder and files for you and update the project settings accordingly. Visual Studio also updates the .uproject file, registering the module there and makes sure that the module builds. You can then start writing your module code right away or use the Add Unreal Engine Class* dialog to add new classes to your module.

Why use Unreal Engine modulesUnreal Engine modules are a way of organizing your code into self-contained units that can be loaded and unloaded at runtime. Modules can contain C++ code, assets, shaders, blueprints, and other resources that are related to a specific functionality or feature.

Using modules has several benefits, such as:

  • Improving code readability and maintainability by separating concerns and reducing coupling.
  • Enhancing performance and memory usage by loading only the modules needed for a given context.
  • Enabling code reuse and sharing by creating libraries of common or generic modules that can be used across different projects or platforms.

Simplifying packaging and deployment by bundling modules together into plugins or DLCs.

To learn more about Unreal Engine modules, check out the official documentation.

Give us your feedbackWe hope you enjoy using the new Add Module dialog and find it useful for your Unreal Engine development. We’d love to hear your feedback and suggestions on how we can improve this feature and make Visual Studio even better for you.

Thank you for your continuous support and feedback, which helps us make Visual Studio the best tool for your development needs.

The post Create Unreal Engine modules faster appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 v17.11 introduces a new Add Unreal Engine Class dialog that lets you easily add common Unreal Engine classes to your project. You can also choose to which module to add your class, so you can keep your code organized and modular.

To use this feature, you need to have an Unreal Engine project open in Visual Studio. Right click on the project in Solution Explorer and select Add > Unreal Engine Item. In the Add New Item dialog, select Unreal Engine Common Classes to open the Add Unreal Engine Class dialog. This dialog shows you a list of common Unreal Engine classes that you can use as a base for your new class. Once you select a base class, you can enter the name of your new class. You can also specify the module to which Visual Studio should add your class.

When you click OK, Visual Studio will generate the header and source files for your new class and add them to your project. You can then open the files and start writing your code.

Benefits of using the Add Unreal Engine Class dialogThe Add Unreal Engine Class dialog has several benefits over the previous way of adding Unreal Engine classes to your project. Some of the these benefits are:

You can choose from an expanded list of base classes by simply selecting one from the Base class list.

You can specify the module name for your class, which helps you organize your code into logical units. Modules are Unreal Engine plugins or projects that contain related classes and assets. By creating separate modules for your classes, you can improve the modularity, reusability, and maintainability of your code.

You can avoid naming conflicts and errors when adding classes to your project. The Add Unreal Engine Class dialog checks the validity of your class name and path and warns you if they conflict with an existing class or file. It also ensures that your class inherits from the correct base class and includes the necessary headers and macros.

Try it outWe hope you enjoy using the Add Unreal Engine Class dialog in Visual Studio. This feature is part of our ongoing effort to improve the C++ development experience for game developers. We would love to hear your feedback and suggestions on how we can make it even better. Please share your thoughts with us on Developer Community or Twitter.

We also want to thank you for your continuous feedback and support, which helps us make Visual Studio the best tool for developing games with Unreal Engine. Stay tuned for more updates and features coming soon.

The post Easily add Unreal Engine classes to your C++ project appeared first on Visual Studio Blog.

View Details

Each release of .NET introduces a host of new features and bug fixes that enhance both performance and security. To leverage these benefits both service and desktop application developers must upgrade their applications to the latest .NET versions. Just like other developers wanting to take advantage of the latest .NET enhancements, we are updating our design-time support policy. This update will enhance the safety of the Visual Studio WinForms design-time experience and motivate WinForms developers to update their applications for improved security. However, updating this policy will mean we will no longer support designing Forms in projects targeting older, unsupported .NET versions. This means developers too will need to update their projects to supported .NET runtimes in order to design their forms in Visual Studio.

It is Time to Upgrade!Upgrading the WinForms Designer and your applications to newer .NET versions not only enhances security but also improves design-time reliability and performance by leveraging the enhancements available in those .NET versions and referenced NuGet packages. We strongly recommend keeping your applications updated with the latest .NET versions.

Beginning with the VS 17.12 Preview 3 release, the WinForms Designer will automatically check your project’s target .NET version. If it falls below the minimum supported .NET or .NET LTS version, you will receive a notification displayed prominently in an InfoBar. This feature will keep you informed about your project’s compatibility, allowing easy access to a list of .NET versions and their support status.

Future Support for WinForms Designer with respect to .NET RuntimesEach time a .NET LTS release reaches its end of support, Visual Studio will update the WinForms Out-of-Process Designer minimum supported version to that LTS release. For example, when .NET 6 LTS goes out of support in November 2024, the following Visual Studio release, 17.13, will update the designer to have .NET 6 as the minimum supported version. Consequently, projects targeting .NET versions below 6, such as .NET Core 3.1 and .NET 5, will no longer load in the Designer. Hence, we highly recommend upgrading your application to the latest .NET release to remain compatible with Visual Studio 17.13 or newer versions. You can use Designer in Visual Studio 17.12 to migrate. For more information refer to VS Product Life Cycle and Servicing wiki.

Under this policy, each time .NET ships a new LTS release, the WinForms Designer will update our minimum .NET version supported to the previous .NET LTS. Why the previous LTS? We recognize that enterprises may have some delay in getting upgrades completed, and we don’t want to break them. We will, however, continue to present the InfoBar to developers informing them that they are targeting an out of support .NET release. When developers try to load a project targeting below the WinForms Designer minimum supported version, users will be presented with an error message informing them that the WinForms Designer requires a newer version of .NET.

The following table outlines the WinForms Designer support policy going forward. While it currently focuses on .NET 6 and .NET 8, the same pattern will apply to future .NET LTS releases.

| .NET LTS Release | End of support (E) | WinForms Designer support policy for next VS release after (E) | | 6.0 | Nov 2024 | – Designer will support projects targeting .NET 6.0 and newer versions.– Versions below 6.0 will not be supported. | | 8.0 | Nov 2026 | – Projects targeting .NET 8.0 and newer versions will be supported.– Versions below 8.0 will not be supported. |

As .NET 8 reaches end-of-support, we will promptly upgrade the Designer process to require at least .NET 8 in the subsequent Visual Studio release. This proactive approach ensures that you stay current with your projects while maintaining compatibility with the WinForms Designer in newer Visual Studio versions. You can learn more about the .NET release lifecycle in this wiki.

Important Note: These changes will only impact the design-time experience of the WinForms Designer. At runtime, all .NET versions will continue to function as they do now.

Conclusion and call for feedbackIn today’s rapidly evolving landscape, prioritizing security in software development is essential, and it requires the commitment of all developers. The WinForms Designer team is dedicated to improving security, but we need your collaboration to ensure that projects remain updated with the latest .NET versions. While this may feel like a significant change, it is a necessary step toward enhancing the security of the WinForms Designer and your applications.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Upgrade Your Windows Forms .NET Projects to the Latest .NET Version for Enhanced Security appeared first on Visual Studio Blog.

View Details

Have you ever wondered what’s happening under the hood of your .NET application? Do you want to quickly and easily identify and fix performance bottlenecks? If so, Visual Studio has the perfect tool for you: the profiler.

The profiler allows you to analyze your code’s performance, pinpoint hot paths, detect memory leaks, address thread contention, and more. It helps you measure CPU usage, memory consumption, and file activity, and lets you drill down into specific methods and lines of code.

But what if the code you need to profile isn’t yours? What if it’s a third-party library, a NuGet package, or a framework component without source code access? How can you uncover what’s happening inside those black boxes?

That’s where the new auto-decompilation feature comes in handy.

With Visual Studio 2022, the profiler can automatically decompile the .NET code that you don’t have the source code for and show you the decompiled C# or Visual Basic code in the source view. This way, you can gain insights into the code’s structure and performance issues, even without loaded symbols or exact file locations.

This feature is particularly helpful when dealing with non-user external code, empowering you to analyze and optimize your application’s performance effectively, thus enhancing your development workflow.

How to Use Auto-Decompilation in Visual Studio ProfilerTo use this feature, you need to enable the option Automatically decompile code during source lookup in the Tools > Options > Debugging > General settings. Then, you can launch the profiler from the Debug > Performance Profiler menu, or by pressing Alt+F2.

Once the profiler is running, you can select the type of analysis you want to perform, such as CPU Sampling, Memory Usage, or .NET Object Allocation Tracking. The profiler will collect the data and display it in various views, such as Call Tree, Functions, Modules, or Caller/Callee. You can also use filters, search, and grouping options to narrow down the results.

To view the source code of a function, simply double-click on it in any of the views, or right-click and select “Go To Source.” If the source code is available, the profiler will open it in the editor. If not, the profiler will attempt to decompile the code and display it in a read-only window. This allows you to inspect the code, view line numbers, and navigate to the callers and callees.

Additionally, you can compare snapshots of the same function taken at different times to see how the code has changed. This helps you identify performance regressions or improvements and understand the impact of your code changes.

Keep in mind that decompiled code may not be identical to the original, as some information can be lost during compilation. However, the decompiled code should be close enough to provide a good understanding of what the code does and how it impacts your app’s performance

We Want to Hear from YouWe hope you find this feature useful in improving the performance of your .NET applications. We are committed to enhancing Visual Studio and greatly value your feedback. Please share your thoughts on this feature and any suggestions or issues by using the Help > Send Feedback > Report a Problem or Provide a Suggestion options in Visual Studio, or by leaving a comment below. Thank you for your continuous support!

Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.

The post Discover Hidden Insights with Profiler’s External Code Decompilation appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 continues to be faster with each version. In this blog post we will highlight a couple of the more significant enhancements you’ll experience in 17.11, such as a more efficient C# language service, faster conditional breakpoints and symbol searches in C++.

Reduced CPU usage by C# language serviceCode IndexingIn 17.10 we revamped the code indexing system in the C# language service (Roslyn). It used to be both aggressive and highly intermittent. This would lead to high spikes of CPU usage, taking resources away from the operations users were performing, especially during times like solution load. After opening a solution, users who wanted to wait for VS to settle would have to wait up to minutes watching a progress bar titled “Running low priority background processes”.

Now, we no longer preemptively run all the indexers. Instead, individual ones are run on demand. In 17.11, these indexers were further streamlined, and made much more incremental, allowing them to consume far less resources when absorbing any change into the index. In addition, there were memory allocation optimizations throughout the editor and managed language services. The net effect of this is a more responsive VS that is ready to go at a much sooner time, with much lower CPU consumption.

Source GeneratorsAs part of our continued work to break VS into isolated, high performance, services, Roslyn’s Source Generator execution host was moved out of the main VS process to a high-performance .NET 8 host. This helps make VS more resilient to bugs in source generators and allows them to execute much more efficiently. As part of this work, we also changed the execution model for source generators to no longer run automatically, due to the heavy impact that some generators can still have on the system. Instead, by default, generators will now run when a document is saved, or a project is built, greatly cutting down on the impact of all generators (especially very expensive ones). This behavior can be controlled here:

Tools > Options > Text Editor > C# > Advanced > Source Generators

With the above changes in place, our data shows improved metrics in 17.11. CPU usage is down by 16% percent or more in sessions that had heaviest CPU usage. The C# completion list now appears sooner; looking at the slowest sessions the number of times the list takes longer than 0.5 seconds to appear has been cut by about 40%.

Improved conditional breakpoint performanceIn 17.11 we made several changes to improve the performance of conditional breakpoints in C++. The improvements were primarily in two categories:

  • Avoiding expensive Windows debugging API calls. Windows calls to get and set information about the debugged process can be expensive, so the data was cached to reduce the number of calls to these APIs. Additionally, some of the information was already available through other sources, allowing some calls to be eliminated entirely.
  • Reducing data fetched from the debugged process. When a breakpoint is hit, the debugger must fetch a lot of information about the state of the debugged process. This is needed to populate things such as the locals tool window, the Diagnostics Tools window etc. However, to evaluate whether a conditional breakpoint’s conditions have been met, we need only a subset of that information. Now we fetch only the necessary pieces of information.

With these optimizations in place, we measured up to ~67% reduction in debugger overhead in a test application compared to 17.10.

Optimized Symbol Search for C++ language serviceIn 17.11 we reimplemented the text indexing system for C++ symbols. Before this change, C++ language service processed the symbol text directly to answer All-in-one-Search (AIOS) queries. We would load all the text into memory and traverse it to find matching candidates. This approach was relatively fast, but not optimal; not to mention having to keep the text cached in memory. In 17.11 we started using SQLite’s FTS5 search extension. The index is computed when the solution is parsed after it is opened, and then the language service can perform Symbol Search without any additional loading of text into memory. All the results are available faster and with less memory usage: we’ve seen the slower AIOS symbol searches up to 65% faster in 17.11. We hope you’re experiencing this improvement in your larger codebases.

Share your feedback and stay connected with Visual Studio!We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the entire Visual Studio team, thanks for reading and Happy Coding!

The post Visual Studio 2022 – Recent performance enhancements appeared first on Visual Studio Blog.

View Details

Ever wished to assess your code’s performance without repeatedly choosing the target process or executable for each instrumentation profiling session? If so, you’re among many developers who find this task cumbersome and prone to errors, especially when profiling the same target repeatedly.

We understand your frustration and have a solution: Visual Studio 2022 introduces a new feature that addresses this issue. The instrumentation tool now remembers your target selection across runs, providing a seamless experience and enhancing the continuity of your profiling sessions.

With this improvement, you can maintain your specified target across multiple instrumentation runs, eliminating the need for repetitive selection tasks. This means you can focus more on analyzing the performance data and optimizing your code, rather than wasting time and effort on setting up the profiling session.

How does it work?To use this feature, you need to have Visual Studio installed and the Performance Profiler (ALT+F2) enabled. Then, follow these simple steps:

  1. Launch the Performance Profiler and select Instrumentation as the profiling method.
  2. Click the Target button and choose the process or executable you want to profile.
  3. Click Start to begin the profiling session. Visual Studio will collect and display the performance data in the Diagnostic Tools window.
  4. When you’re done, click Stop to end the profiling session. Visual Studio will show you a summary of the results and allow you to drill down into the details.
  5. Click cancel in the dialog box to reset the persisted selection.

If you want to run another instrumentation profiling session on the same target, you don’t need to select it again. Just click Start and Visual Studio will remember your last choice and use it as the default target. When you add a new method, class, or project, these new targets are automatically selected based on whether their parent was previously selected. This proactive approach ensures that no new additions are missed and helps maintain comprehensive profiling coverage.You can still change the target if you want to, but you don’t have to.

Enjoy the convenience and efficiency of persistent target selection!

Why should you use it?This feature is designed to help you streamline your workflow and improve your productivity when using the instrumentation tool. By persisting the target selection between runs, you can:

Save time and avoid frustration by reducing the number of clicks and interactions needed to set up a profiling session.

Minimize the risk of selecting the wrong target or forgetting to select one, which could lead to inaccurate or missing performance data.

Maintain consistency and comparability of the performance data across multiple profiling sessions on the same target.

Focus more on the performance analysis and optimization of your code, rather than the configuration and management of the profiling session.

Concluding thoughtsWe hope you find this feature valuable for your development journey. Your feedback and suggestions are invaluable to us as we strive to enhance it further. Please share your thoughts through the Visual Studio Developer Community or the Report a Problem tool in Visual Studio.

Thank you for choosing Visual Studio and for your continuous feedback that helps us make it better every day.

Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.

The post Effortless Instrumentation profiling with Persistent Target Selection appeared first on Visual Studio Blog.

View Details

In this tutorial we will create a React front-end, with JavaScript, of a TODO web app using a Visual Studio 2022. To get started install Visual Studio with the Node.js development workload. This will include the JavaScript/TypeScript (JSTS) projects and the associated support. The code for this app can be found at sayedihashimi/todojswebapp (github.com). Create a new React project using the New Project Dialog in Visual Studio 2022. Use File > New > Project … to open that dialog. For this tutorial select the React App JavaScript template which is shown below.

After clicking Next, give the project the name TodoWebApp and click Create. This will create the JavaScript project using the vite command line tool. Now create a new component to encapsulate the todo list functionality. First create a new folder named components under the src folder. This is the folder where all components will go. It’s a common convention to place components in a components folder, but this is not required. Right click on this new folder and select Add > React JSX Component File, give it the name TodoList as shown in the following image.

This will create a new jsx file in the components folder. For now, replace the Hello World content with the h2 as shown in the snippet below.

function TodoList() { return ( TODO app contents );} This component displays a header for now. We will replace this soon. Let’s wire up this component in the app and then later replace the contents with the desired functionality. Let’s add this component to the app and remove the boilerplate content that is no longer needed.

Open the App.jsx file. This is the main component that is loaded which represents the todo application. This is used in the main.jsx file. For this tutorial we will not need to modify the main.jsx file. In App.jsx, remove all the imports from the top and clear out the contents of the return statement. The file should look like the snippet below.

function App() { const [count, setCount] = useState(0) return ( )}export default App To add the TodoList component, place your cursor inside the fragment and then type

Now let’s clear out the CSS files so that we can start with a fresh start. Open the App.css file and delete all the contents. In the Index.css file remove all contents except the styles for :root. The Index.css file should look like the following.

:root { font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; color-scheme: light dark; color: rgba(255, 255, 255, 0.87); background-color: #242424;} Now run the app to ensure that everything is working as expected. You can use the Start Debugging button from the toolbar or the F5 keyboard shortcut. After that a browser window should open with the following content.

This would be a good time to create a commit in case you need to roll back to a good state later. Now that you’ve started the app you can leave it running, as you make changes the app will automatically refresh with the latest content using the Hot Module Replacement support. Some actions like adding folders or renaming files will require that you stop debugging and then restart it but in general you can leave it running in the background as you develop your app. Open the TodoList.jsx component so that we can start to define that.

In TodoList.jsx first add the UI needed to show and manage todo entries and then hook it up to store the values after that. Update TodoList.jsx to have the following content.

``` function TodoList() { return ( TODO Add existing tasks will be shown here

 );}export default TodoList;

``` We have added an input box for the todo item as well as a button to submit that. The existing tasks will be displayed under the input and button, but we will get to that soon. Now that we have the input field to get a new task added, we will wire up the Add button. We will use the useState React hook to add two state variables, one for the task which is getting added and another to store the existing tasks. For this tutorial the tasks will be stored in memory we will not add a database for persistent storage. Add the following import statement to TodoList.jsx to import useState.

import { useState } from 'react'

Now we can use that hook to create the state variables. Add the following code in the TodoList function above the return statement.

const [tasks, setTasks] = useState([ "Drink some coffee", "Create a TODO app", "Drink some more coffee"]);const [newTaskText, setNewTaskText] = useState(""); This will setup two variables, tasks and newTaskText, for the data and two functions that you can call to update those variables, setTasks and setNewTasks. When a value for a state variable is changed React will automatically re-render the component. We are almost ready to update TodoList.jsx to show the todo items as a list, but there is an important React concept that we must explain before doing so.

In React when you display a list of items you will need to add a key to uniquely identify each item in the list. This is explained in depth in the React docs at Rendering Lists, but we will cover what is needed for this tutorial. We have a list of todo items that we want to display, and we need to associate a unique key for each item, the key for each item should not change. Since the key for each item should not change, we cannot use the index of the item in the array as the key. We need an id which will not change through out the lifetime of those values. We will use randomUUID() to create a unique id for each todo item.

Now let’s create TodoList.jsx using a uuid as the key for each todo item. Update TodoList.jsx to contain the following code.

import React, { useState } from 'react';import './Todo.css';import TodoItem from './TodoItem';const initialTasks = [ { id: self.crypto.randomUUID(), text: 'Drink some coffee' }, { id: self.crypto.randomUUID(), text: 'Create a TODO app' }, { id: self.crypto.randomUUID(), text: 'Drink some more coffee' }];function TodoList() { const [tasks, setTasks] = useState(initialTasks); const [newTaskText, setNewTaskText] = useState(""); function handleInputChange(event) { setNewTaskText(event.target.value); } return ( TODO Add {tasks.map((task, index) => 2. {task.text} )} );}export default TodoList; Since the id values are assigned outside the TodoList function, we can be sure the values will not change if the page is rerendered. When you try the app in this state, you will notice that you cannot type into the todo input element. This is because the input element is bound to newTaskText which has been initialized to a blank string. To allow users to add new tasks, we will need to handle the onChange event on that control. We also need to implement the Add button support. Add the functions immediately above the return statement in the TodoList function.

function handleInputChange(event) { setNewTaskText(event.target.value);}function addTask() { if (newTaskText.trim() !== "") { setTasks(t => [...t, { id: self.crypto.randomUUID(), text: newTaskText }]); setNewTaskText(""); }} In the handleInputChanged function, the new value from the input field is passed in via event.target.value and that is used to update the value for the newTaskText variable with setNewTaskText. In the addTask function we add the new task to the list of existing tasks using setTasks and we set the id of the item as a new uuid value. Update the input element to include onChange={handleInputChange} and update the Add button to include onClick={addTask}. This will wire up the event to the function that handles that event. Following this you should be able to add a new task to the task list. New tasks are added to the bottom of the list. To make this app more useful, we need to add support to delete tasks and to move a task up or down. Let’s get started on that.

We will add the functions to support delete, move up and move down and then update the markup to show a button for each action. Add the following in the TodoList function above the return statement.

function deleteTask(id) { const updatedTasks = tasks.filter(task => task.id != id); setTasks(updatedTasks);}function moveTaskUp(index) { if (index > 0) { const updatedTasks = [...tasks]; [updatedTasks[index], updatedTasks[index - 1]] = [updatedTasks[index - 1], updatedTasks[index]]; setTasks(updatedTasks); }}function moveTaskDown(index) { if (index < tasks.length) { const updatedTasks = [...tasks]; [updatedTasks[index], updatedTasks[index + 1]] = [updatedTasks[index + 1], updatedTasks[index]]; setTasks(updatedTasks); }} The delete function takes in the task id and deletes that one from the list and uses the Array filter() method to create a new array excluding the selected item and then calls setTasks(). The other two functions take in the index of the item since this is specific to the item ordering. Both moveTaskUp() and moveTaskDown() use array destructuring assignment to swap the selected task with its neighbor. Now we will update the view to include these buttons. Update the return statement to contain the following.

return ( TODO TODO Add {tasks.map((task, index) => 2. {task.text} deleteTask(task.id)}> moveTaskUp(index)}> ⇧ moveTaskDown(index)}> ⇩ )} ); We have added the buttons needed to perform the tasks we discussed above. We are using Unicode characters as icons on the buttons. In the markup there are some attributes added for when we add some CSS later. You will also notice the use of aria attributes to improve accessibility, the are optional but highly recommended. If you run the app it should look like the image below.

You should now be able to perform the following in the TODO web app.

  • Add task
  • Delete task
  • Move task up
  • Move task down

This is working well, but we can refactor this so that we have a reusable component to display the todo items. The markup for the todo item will go into a new component, TodoItem. Since the management of the list will stay in the Todo component, we will pass callbacks to the delete and move buttons. To get started, right click the components folder in the Solution Explorer and select Add > New Item. In the dialog that opens select the React JSX Component File. Give it the name TodoItem and click Add. We will pass in the task and callbacks as props to this new component. The TodoItem should contain the following code.

import PropTypes from 'prop-types';function TodoItem({ task, deleteTaskCallback, moveTaskUpCallback, moveTaskDownCallback }) { return ( - {task} deleteTaskCallback()}> moveTaskUpCallback()}> ⇧ moveTaskDownCallback()}> ⇩ );}TodoItem.propTypes = { task: PropTypes.string.isRequired, deleteTaskCallback: PropTypes.func.isRequired, moveTaskUpCallback: PropTypes.func.isRequired, moveTaskDownCallback: PropTypes.func.isRequired,};export default TodoItem; The code above contains the markup from the Todo component and at the bottom we declare the propTypes. Props are used to pass data from a parent component to child components. For more info on props the docs are available at Passing Props to a Component – React. Since the delete and move functions are being passed in as callbacks, the onClick handler will need to be updated to call into those callbacks. The full code for TodoList is below that uses the TodoItem component.

import React, { useState } from 'react'import './Todo.css'import TodoItem from './TodoItem'const initialTasks = [ { id: self.crypto.randomUUID(), text: 'Drink some coffee' }, { id: self.crypto.randomUUID(), text: 'Create a TODO app' }, { id: self.crypto.randomUUID(), text: 'Drink some more coffee' }];function TodoList() { const [tasks, setTasks] = = useState(initialTasks); const [newTaskText, setNewTaskText] = useState(""); function handleInputChange(event) { setNewTaskText(event.target.value); } function addTask() { if (newTaskText.trim() !== "") { setTasks(t => [...t, { id: self.crypto.randomUUID(), text: newTaskText }]); setNewTaskText(""); } event.preventDefault(); } function deleteTask(id) { const updatedTasks = tasks.filter(task => task.id !== id); setTasks(updatedTasks); } function moveTaskUp(index) { if (index > 0) { const updatedTasks = [...tasks]; [updatedTasks[index], updatedTasks[index - 1]] = [updatedTasks[index - 1], updatedTasks[index]]; setTasks(updatedTasks); } } function moveTaskDown(index) { if (index < tasks.length) { const updatedTasks = [...tasks]; [updatedTasks[index], updatedTasks[index + 1]] = [updatedTasks[index + 1], updatedTasks[index]]; setTasks(updatedTasks); } } return ( TODO Add {tasks.map((task, index) => deleteTask(task.id)} moveTaskUpCallback={() => moveTaskUp(index)} moveTaskDownCallback={() => moveTaskDown(index)} /> )} );}export default Todo; Now the TodoItem component is used to render each todo item. Notice that we set the key to task.id which contains the uuid value for that task. When you run the app, you shouldn’t see any changes to the look or behavior of the app since we refactored it to use TodoItem. Let’s move on to styling.

Now that we have all the basic functions supported, it’s time to start adding some styling to this to make it look nice. Now would be a good time to create a commit to save your progress. Let’s first start by adding a link in the Index.html for a font family, Inter, that we will use for this app. In the Index.html there are some other items that need to be cleaned up. Specifically, the title should be updated and vite.svg file is still being used as the icon. Update the Index.html file to have the following content.

TODO app In addition to these changes the file checkmark-square.svg was added to the public folder. This is an SVG from the FluentUI checkmark square image which I downloaded directly. There is a package that you can use for a more integrated experience but that’s outside the scope of this post.

Now let’s update the styles of the TodoList component. Add the following to TodoList.css.

.todo-list { background-color: #1e1e1e; padding: 1.25rem; border-radius: 0.5rem; box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.3); width: 100%; max-width: 25rem;}.todo-list h1 { text-align: center; color: #e0e0e0;}.todo-input { display: flex; justify-content: space-between; margin-bottom: 1.25rem;}.todo-input input { flex: 1; padding: 0.625rem; border: 0.0625rem solid #333; border-radius: 0.25rem; margin-right: 0.625rem; background-color: #2c2c2c; color: #e0e0e0;}.todo-input .add-button { padding: 0.625rem 1.25rem; background-color: #007bff; color: #fff; border: none; border-radius: 0.25rem; cursor: pointer;}.todo-input .add-button:hover { background-color: #0056b3;}.todo-list ol { list-style-type: none; padding: 0;}.todo-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.625rem; border-bottom: 0.0625rem solid #333;}.todo-list li:last-child { border-bottom: none;}.todo-list .text { flex: 1;}.todo-list li button { background: none; border: none; cursor: pointer; font-size: 1rem; margin-left: 0.625rem; color: #e0e0e0;}.todo-list li button:hover { color: #007bff;}.todo-list li button.delete-button { color: #ff4d4d;}.todo-list li button.up-button,.todo-list li button.down-button { color: #4caf50;} This should improve the styling of the app. The app should look like the following screenshot.

Now you have built a working Todo app which stores the todo items in memory. From here you could update the app to store the todo items in localStorage/IndexedDb, or integrate this with a server-side database, or other backend, for more permanent storage.

RecapIn this tutorial you have created a new React app using Visual Studio 2022. The app consists of a todo list, which includes support to add tasks, delete tasks and to reorder them. You created two new React components and used those throughout this tutorial.

ResourcesBelow are some links to related resources.

  • Code for this sample sayedihashimi/todojswebapp (github.com)
  • Visual Studio JavaScript and TypeScript projects

FeedbackYou can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones. You can also leave a comment here or reach out to Sayed on Twitter at @SayedIHashimi.

The post Creating a React TODO app in Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

Do you feel overwhelmed by the sheer number of breakpoints in your Visual Studio project? Wish you could categorize and toggle them on and off with ease? The new breakpoint group feature in Visual Studio 2022 is here to transform your debugging experience.

Breakpoint groups allow you to create custom collections of breakpoints and apply various actions to them. For example, you can enable or disable all breakpoints in a group or set conditions and actions for them or even make the whole group dependent on other breakpoints.

But that’s not all. You can also mark the selected breakpoint group as the default, ensuring all newly added breakpoints are automatically included in that group. This enhancement simplifies the management and organization of breakpoints, providing seamless debugging when investigating multiple issues.

Recap: Breakpoint groupsTo create a breakpoint group, right-click on any breakpoint in the Breakpoints window and select Add to Group > New Group. You can name the group and add a description if you want.

To add more breakpoints to the group, simply drag and drop them from the Breakpoints window or use the right-click menu. To remove breakpoints from the group, drag and drop them outside the group or use the right-click menu. You can also delete the group, which will remove all the breakpoints in the group from your project.

Default Breakpoint GroupTo set a breakpoint group as the default, simply right-click on the group and choose “Set as Default Group.” The default group will be distinctly labeled in bold, making it easy to identify. When you have a default breakpoint group, any new breakpoints you add to your code will automatically be added to that group. This ensures that your breakpoints are organized consistently, without the need to manually sort them each time you add new ones.

If your needs change, you can easily move breakpoints to a different group at any time. This flexibility allows you to adapt your breakpoint organization as your project evolves. You can change the default group at any time or clear it altogether.

You can access all the breakpoint group actions from the right-click menu or the toolbar in the Breakpoints window.

Try it out todayWe hope you find the breakpoint group feature useful and productive. It’s one of the many improvements we’ve made to the debugging experience in Visual Studio 2022, thanks to your feedback and suggestions.

Please download the latest version of Visual Studio and try it out. Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.

Report any issues or suggestions via Help > Send Feedback.

Learn more about other Copilot assisted features in Visual Studio by checking out additional resources Debug with GitHub Copilot – Visual Studio (Windows) | Microsoft Learn

Thank you for using Visual Studio and happy coding!

The post Organize Your Breakpoints like a pro appeared first on Visual Studio Blog.

View Details

We’re excited to share the latest changes in Visual Studio’s code coverage components. If you haven’t already, be sure to check out our previous blog posts: What’s New in Our Code Coverage Tooling? and Code coverage features in Visual Studio Enterprise.

C++ Code CoverageTired of instable native code coverage that doesn’t support ARM64? Now, you can collect native code coverage for all your methods, including those on ARM64. We have completely overhauled the C++ code coverage support to improve reliability, performance, and security. The new implementation, powered by MSVC compiler tooling, now supports x86, x64, and ARM64 architectures. To enable the new experience, you need to enable the /PROFILE linker option for all C++ projects, including both testing and production.

For detailed examples, visit:

  • Scenario 06: C++ Code Coverage in Visual Studio
  • Scenario 07: C++ Code Coverage in Visual Studio ARM64

This feature is available only for the MSVC compiler.

Introducing Microsoft.CodeCoverage.ConsoleYou can use the new Microsoft.CodeCoverage.Console tool to collect code coverage for console applications, merge coverage reports, and instrument binaries. It can also capture code coverage for each test separately, making it an ideal choice for use in CI pipelines.

Available in Visual Studio Enterprise through Developer PowerShell, this command-line tool extends the capabilities of the well-known dotnet-coverage tool, adding support for C++ code coverage and enhanced security features.

For an example of how to use the Microsoft.CodeCoverage.Console tool, visit Scenario 09: C++ Code Coverage for Console Apps in Developer PowerShell for Visual Studio Enterprise. Visit What’s New in Our Code Coverage Tooling? to find even more examples.

To learn more, check out the Microsoft.CodeCoverage.Console documentation.

Enhanced Security FeaturesYou can collect code coverage for web applications running in IIS for both .NET and C++ using Microsoft.CodeCoverage.Console, which allows for the instrumentation of both C++ and .NET binaries. Additionally, Visual Studio code coverage components now include enhanced security features, such as controlling access to data passed through named pipes and shared memory. This security improvement also supports running web applications in IIS under different user accounts, allowing you to specify which users can access the coverage data.

For a full example, visit Scenario 08: Static Code Coverage for ASP.NET Core Web Apps (Razor Pages) in IIS.

SummaryIn this update, we’ve enhanced the code coverage experience in Visual Studio with a complete rewrite of C++ code coverage support, introduced the new Microsoft.CodeCoverage.Console tool, and added new security measures for managing access to shared data. These changes provide a faster, more reliable, and secure way to measure code coverage in your applications, especially when working with C++ projects.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Next-Gen Code Coverage in Visual Studio: Enhanced C++ Support and Security appeared first on Visual Studio Blog.

View Details

One of our main goals is to help you and your team collaborate more effectively and efficiently on your software projects. That’s why we are constantly improving our Version Control features, especially the ones related to the pull request workflow. Starting in Visual Studio version 17.11, you can enjoy a smoother and smarter pull request experience, from creating to reviewing to merging. You can link your Azure DevOps work items, and in both Azure DevOps and GitHub you can create draft PRs and use default templates. You can even get AI assistance to write your pull request descriptions. Plus, you can view and respond to your pull request comments right in the editor, without leaving Visual Studio. Sounds awesome, right? Download the latest Visual Studio release and see for yourself!

Download Visual Studio 17.11Create all your pull requests in Visual StudioWe were so excited by the enthusiastic reception to the new Create a Pull Request flow and the subsequent updates. This feature had hundreds of survey responses, and we read every single comment. We’ve delivered on the top concerns, enabling Azure DevOps work item linking, default Pull Request templates, and draft PRs.

  • The Azure DevOps “New Pull Request” window now has a section where you can add your linked work items. These items are reflected in the web as being linked – avoiding the context switch to the web and fulfilling many branch policies that require a linked ticket.
  • Default pull request templates will auto-populate in the description box if there’s one available. Learn more about how to add default templates in your repository in the GitHub documentation and Azure DevOps documentation.
  • Create your pull request as a draft using the drop down menu on the “Create” button. This lets your colleagues know it’s a work in progress.
  • Learn more about the GitHub Copilot generated pull request descriptions in our previous blog.

View your pull request comments in the editorMapping between your code editor and your browser to view pull request comments can be a hassle. We’ve added your GitHub and Azure DevOps pull request comments directly in your working file. You can now stay in your context, make necessary code changes, and interact with your colleagues’ suggestions without switching contexts to the browser.

Enable the feature flag, “Pull Request Comments”, then checkout any branch with an active pull request branch and click on “Show comments in file”. You can also click on the “PR #” entry point from the Git Changes window or from the Git top level menu with Git > GitHub or Azure DevOps > Show comments in File.

You can navigate between files in the pull request and comments in the files using the toolbar. Leverage the following keyboard shortcuts:

| Go to the previous file in the pull request | Ctrl+Shift+Alt+F6 | | Go to the next file in the pull request | Ctrl+Alt+F6 | | Go to the previous comment | Ctrl+Shift+Alt+F8 | | Go to the next comment | Ctrl+Alt+F8 | | Move focus back to the code from a comment | Esc |

In the last preview we included better support for @ mentions and work item references for your comments. We also improved the UI with the addition of avatars, other visual tweaks to improve accessibility, and we enabled better syncing with the server.

Contribute to what’s nextA smoother pull request experience helps your collaborations thrive! Be sure to try out the latest features in Visual Studio 17.11 GA and share your feedback in the following surveys:

  • Create a Pull Request Improvements
  • View Pull Request Comments

We plan to continue improving the pull request experience based on your feedback, so let us know what’s missing and what you’re looking forward to! We’ve got a lot of functionality on the roadmap, including adding new pull request comments and seeing the comments in the diff view between your source and target.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Level up your collaborations with the pull request experience in Visual Studio appeared first on Visual Studio Blog.

View Details

Are you tired of the hassle of manually configuring your development environment every time you want to launch multiple projects? We’ve heard your feedback and are thrilled to announce a feature in Visual Studio that simplifies your workflow.

The Multi-Project Launch Configuration feature in Visual Studio allows developers to set up and save profiles for launching specific projects within a multi-project solution in predefined states for debugging. This simplifies the process of working with complex solutions, improves debugging efficiency, and enables easy sharing of configurations among team members.

Enabling Multi Launch Profile:The Multi-Project Launch Configuration is available in version 17.11. Enable the feature flag with the instructions below to start using it.

In Visual Studio, navigate to Tools > Options > Preview Features and toggle the checkbox for “Enable Multi Launch Profiles” to activate the feature.

Creating Multi Launch Profile:* Open your Visual Studio solution that contains multiple projects. * Go to the “Solution Explorer” on the right side of the Visual Studio window. * Right-click on your solution (the top-level item in the Solution Explorer) and select “Configure Startup Projects…”.

  • In the Solution Property Pages, click on the “Common Properties” tab, and select “Configure Startup Projects”.

  • In the “Configure Startup Projects” section, choose the “Multiple startup projects” radio button.

  • Below the radio button, you’ll see a list of all the projects in your solution.
  • Set the action for each project to either “Start,” “Start without debugging,” or “None,” and select debug target depending on your requirements.

  • Enabling the “Share Profile” checkbox allows you to share the profile with the team by checking it into the config file in the Source Control repo.

  • Launch profiles are saved to a JSON file in the same directory as the solution. The “Share Profile” checkbox determines whether the profile is saved to a user-specific file (unchecked) or to a file intended for source control tracking, such as in Git (checked).

  • Once you’ve configured the startup action for each project, click the “OK” or “Apply” button to save the profile.

  • The created launch profile appears in the toolbar dropdown list, allowing you to select the profile you want to debug.

Engage with us!We would love to get your feedback on Multi Project Config, so please give it a try and let us know what you think! You can share any feedback via Developer Community to help us make Visual Studio better for you!

The post Multi-Project Launch Configuration appeared first on Visual Studio Blog.

View Details

Are you developing .NET applications for Arm-based processors? Do you want to take advantage of the performance and power efficiency of running your apps natively on Arm64 devices? If so, you’ll be happy to hear that Visual Studio 2022 17.11 has a new feature that makes it easier than ever to do just that.

Visual Studio 2022 natively supports building and debugging Arm64 apps on Arm-based processors. However, if you build your app with the AnyCPU setting, which is the default for most .NET projects, your app will run on an Arm64 device using x64 emulation. While this may seem counterintuitive, this approach allowed many apps with x64 dependencies to work reliably under emulation without requiring additional build or dependency changes.

Unfortunately, under these conditions, it means your app won’t benefit from the native capabilities of the Arm64 CPU and may suffer from reduced performance and increased battery consumption.

To solve this problem, the Windows 24H2 update introduces a new setting for your app manifest files. This setting allows you to specify a list of supported architectures (currently amd64 or arm64) for your app, indicating that it should run natively on those platforms. For example, if you include arm64 in the list, your app will run using the Arm64 CLR on Arm64 devices when supported, even if it was built with the AnyCPU setting.

How to use the setting in Visual Studio 2022To use the new setting in Visual Studio 2022, you need to do the following steps:

  1. Make sure you have the Windows 24H2 update installed on your development machine and your target device.
  2. Open your .NET project in Visual Studio 2022 and right-click on your project in Solution Explorer and select Properties.
  3. In the Build area confirm that the AnyCPU configuration is enabled and that the Prefer 32-bit option is unselected.
  4. Select the new Prefer native ARM64 option.
  5. Save and rebuild your project.
  6. Deploy your app to your Arm64 device and run it. You can also debug it using Visual Studio 2022, which will automatically detect the correct architecture and launch the debugger accordingly.

Enjoy the benefits of native Arm64 appsBy using the new setting in Visual Studio 2022, you can easily run and debug your .NET apps natively on Arm64 devices, without changing your code or your build configuration. This will help you improve the performance, reliability, and battery life of your apps, and give your users a better experience.

We hope you enjoy this new feature and find it useful for your development scenarios. As always, we appreciate your> feedback and suggestions, which help us make Visual Studio better for you. Please let us know what you think by leaving a comment below, or by using the Report a Problem tool in Visual Studio. Thank you for choosing Visual Studio 2022!

The post How to run .NET apps natively on Arm64 devices appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 introduced a new XAML designer for building WPF apps, with a goal of increasing the performance and reliability of the designer. The new designer can quickly open a XAML file by using WPF’s built-in parser and display. This new design has a nuanced behavior when the root XAML element derives from an abstract base class. This article helps with understanding implications for using an abstract base class and describes workarounds which can ensure a smooth design experience.

The Challenge with Abstract Base ClassesWhen working with the XAML Designer, the base class of the root element is instantiated for display purposes. This allows developers to visualize and interact with their UI components directly within the designer, while the custom control is being developed. In the example screenshot below, the base class of the root element is UserControl. The custom control’s derived class is specified in the x:Class attribute as TestControl. Therefore, an instance of UserControl is instantiated for display in design view:

However, an issue arises when the root element’s base class is abstract. Since abstract classes cannot be instantiated, the XAML Designer will find the first non-abstract base class and instantiate that instead. Most of the time, this will work well, but there are cases where this will break design view, possibly showing an error message. One case where design view breaks is when the abstract base class defines a property that is crucial for display, such as the Content property.

Illustrative ExampleImagine you have an abstract base class as follows:

If this abstract class is the base class for your custom control, the XAML Designer will not be able to instantiate AbstractControlBase and will instead instantiate the Control class. The reason is that Control is the first non-abstract base class. This leads to any reference to AbstractControlBase being broken in design view. In the following screenshot, it shows how a ControlTemplate cannot be applied to AbstractControlBase, and the Content property cannot be used to display anything in design view:

Effective WorkaroundsTo mitigate this issue, there are practical workarounds that ensure that the XAML Designer continues to function seamlessly.

  1. Move Display Properties to a Non-Abstract Base ClassOne approach is to refactor your code by transferring the properties critical to design view to another level of base class that is not abstract. This adjustment allows the XAML Designer to instantiate and render the necessary components. The following code shows how the Content property was moved from AbstractControlBase to a new ControlBase class:

In the XAML file, the base class stays as AbstractControlBase, but the control template now applies to the concrete base class ControlBase:

  1. Utilize Standard ControlsAnother strategy is to derive the abstract class from WPF’s ContentControl, which already provides common properties that are used for display in design view, such as the Content property. This method circumvents the instantiation issue associated with abstract classes, allowing your UI elements to be properly displayed while designing your XAML content.

ConclusionUnderstanding the implications of using abstract base classes and implementing effective workarounds can significantly enhance your design workflow. By moving properties to non-abstract base classes or utilizing standard controls, you can ensure that your UI components are rendered accurately, allowing you to harness the full potential of the XAML Designer.

If you have feedback about the XAML Designer, please let us know by using the Visual Studio Feedback Tool. We’re eager to hear what you think!

The post Understanding the behavior of the XAML Designer with abstract base classes appeared first on Visual Studio Blog.

View Details

We continue to invest in the VisualStudio.Extensibility SDK to allow users like you to create extensions that run faster and smoother than ever before! VisualStudio.Extensibility helps you build extensions that run outside the main Visual Studio IDE process for improved performance and reliability. Additional benefits include a sleek and intuitive .NET 8-based API and comprehensive, well-maintained documentation to help you develop amazing extensions faster than ever before.

This 17.11 release builds on our previous releases, bringing support for defining user-configurable settings for your extensions to allow your users to customize their experience along with even more enhancements to remote UI features. We’ve also made substantial updates to our project query API documentation.

Get started with VisualStudio.ExtensibilityFor the latest up-to-date docs and installation instructions, visit https://aka.ms/VisualStudio.Extensibility. We encourage you to report bugs and suggest features via the issue tracker on our GitHub repo, where you can also find extension samples to help you get started.

What’s new for VisualStudio.Extensibility?Our 17.11 release of VisualStudio.Extensibility includes the following features:

  • Customize your extensions further with settings support
  • Show images and use context menus in Remote UI
  • Enhance your tool windows with toolbars

We’ve also refreshed and updated the project query API documentation based on feedback from extension developers like you!

Customize your extensions further with settings supportWith this release of VisualStudio.Extensibility, we’ve enabled a handful of APIs that allow you to define settings for your extensions. This allows your end users to alter the behavior of the extension by adjusting values you’ve elected to define as settings.

In order to support this scenario, you’ll now find APIs specific to defining, accessing, and writing settings in your extension. To add settings to your extension, first add a definition for your setting in a class in the extension.

If you’d like to learn more about how to define and leverage settings in your apps, refer to the VisualStudio.Extensibility settings article. You’ll find more details along with samples to get you coding quickly!

Note that the settings API, like VisualStudio.Extensibility, supports Hot Loading of settings. This allows your extension’s settings to be discovered without requiring your users to restart Visual Studio.

Show images and use context menus in Remote UIAs the VisualStudio.Extensibility model prioritizes extensions running outside of the Visual Studio process, it introduces a challenge when adding UI support to extensions as most UI frameworks are in-process. To get around this, there is a set of classes called Remote UI that allow you to define WPF controls in an out-of-process extension and then show them as part of the Visual Studio UI.

With this release, you can now add a context menu to a Remote UI control from XAML, a familiar experience if you’ve ever added a context menu in standard WPF. You’ll also be able to use Remote UI XAML to show either custom images or images that already exist in the Visual Studio catalog. This gives you additional options for providing users with useful information in a visual format and can help you increase your extension’s UI appeal!

Visit the Other Remote UI concepts documentation for code samples and more information.

Enhance your tool windows with toolbarsYou can now use VisualStudio.Extensibility to add toolbars to your extension’s tool windows to give your users a quick and easy way to access or leverage features in your extension.

See the Add a toolbar to a tool window section in the tool window overview doc to learn more about creating, adding content to, showing, and controlling the visibility of tool windows – and of course to learn more about adding toolbars to those tool windows.

Project Query API documentation updatesIn response to your valuable feedback, we have revamped our documentation to better serve your needs. As we transition to a new model, our project query documentation is evolving to leverage VisualStudio.Extensibility project query wrappers for accessing and modifying solutions/projects. To explore the updated documentation, please refer to Query the Project API (VisualStudio.Extensibility). For details specific to project query using Visual Studio SDK, you can visit Query the Project API (Visual Studio SDK).

About experimental APIs, breaking changes, and how we make decisions about VisualStudio.ExtensibilityIn reviewing feedback from our issue tracker, we realized it would be useful to outline information about some of the decisions we’ve made around VisualStudio.Extensibility. With this new extensibility model, we carefully consider exactly what should and should not be supported based on two major criteria: your feedback and the design goals of the project. One recent example: we decided not to support the ability to programmatically invoke VSCT (Visual Studio Command Table)-based commands via VisualStudio.Extensibility. This decision aligned with established principles for VisualStudio.Extensibility for a few reasons:

  • VSCT based commands are synchronous. VisualStudio.Extensibility extensions operate asynchronously in a separate process.
  • As there’s no guarantee that UI state will remain coherent due to the asynchronous nature of the invocation from another process or thread, allowing invocation could lead to unpredictable user experiences.
  • VSCT-based commands allow input and output of any type. VisualStudio.Extensibility extensions can run out of process. This imposes limitations around the types of input and output data that can be serialized.
  • Direct command invocation breaks our commitment to having consistent, easy-to-use APIs as it would essentially introduce another set of APIs that are more macro/script-like.

As we continue increasing the surface area of the VisualStudio.Extensibility SDK, we’ll rely on this framework to inform decisions on API coverage and availability. The API is growing and changing. We aim to minimize breaking changes and ensure stability and a consistent experience for you, our extension developers. When we make changes because of customer feedback or internal changes, we’ll communicate it formally with plenty of notice on the VisualStudio.Extensibility breaking changes page. We’ll use the following guidelines for breaking changes to experimental APIs:

  • Breaking changes can be made as part of LTSC minor version releases of Visual Studio.
    • A list of breaking changes for the release will be shared by Preview 2 of that release.
    • The list will be shared in the breaking changes doc linked above.
  • Removal of APIs may be formally deprecated by marking the type or by using the [Obsolete] attribute.
    • This will also happen by Preview 2 of the release in which they’ll be removed.

Most APIs in VisualStudio.Extensibility are stable, which means we do not plan to make any breaking changes to them. For these, we want to replicate the stability expectations associated with the existing VS SDK:

  • Breaking changes to VisualStudio.Extensibility APIs or RPC contracts will only happen as part of a major version release of Visual Studio.
    • The list of breaking changes will be available by Preview 1 of the release.
  • Any API removal will happen formally by marking the type or by using the [Obsolete] attribute.
  • Demotion of stable APIs to experimental is considered a breaking change and will be formally announced.

We can’t do this without you!The time and effort you’ve spent reporting issues and sharing suggestions so far has been instrumental in shaping VisualStudio.Extensibility. We need your help as we continue to develop VisualStudio.Extensibility! Please try out this preview release and let us know what you think. Check out the docs, browse the code samples, and build your first extension. You can send feedback and report issues through our issue tracker.

To request features, look at Developer Community to see if someone else made a similar request first. Create a new one if you can’t find a similar request. By checking for similar requests and upvoting and commenting on them, you help us better prioritize requests. Give VisualStudio.Extensibility a try today and share your thoughts with us!

The post VisualStudio.Extensibility 17.11: Settings and more Remote UI support appeared first on Visual Studio Blog.

View Details

If you’re working on a large and complex solution, you might find yourself overwhelmed by the number of results when you use code search in Visual Studio. You might be looking for a specific class, method, or variable, but end up scrolling through pages of irrelevant matches. Wouldn’t it be nice if you could narrow down your search scope to only the parts of the solution that you care about?

In the latest update of Visual Studio, you can now use the new scoping options in code search to filter your results by the entire solution, the current project, or the current document. You can also toggle the inclusion of external files in your search.

This way, you can quickly and easily find what you need without getting lost in the noise.

How to Use Scoping in Code SearchTo access the new scoping options, open the Code Search window by pressing Ctrl+T or clicking on the Search button (magnifying glass icon) at the top of the IDE. You’ll see a drop-down menu at the far right of the search box that lets you choose between different scopes.

You can select one of the following options:

  • Entire solution
  • Current project
  • Current document

You can also click on the checkbox next to Search in external items to toggle the inclusion of code files that are not part of your solution.

You can set different scopes for different filters, and your selections will be remembered across sessions. For example, you can set the default filter to search through the entire solution, and the member filter to search through the current document. This way, you can switch between various levels of granularity depending on what you’re looking for.

Here’s an example of how code search scoping can help you find what you need faster. Suppose you want to find a method called GetProducts in your solution. If you use the default filter and scope, you might get hundreds of results from various projects. But if you use the member filter and scope it to the current project, you will get a narrower set of results that are relevant to your current context.

We Hope You Enjoy This FeatureWe hope that code search scoping will make your coding experience more productive and enjoyable. We’d love to hear your feedback on this feature and any other suggestions you have for improving code search in Visual Studio 2022. You can use the Report a Problem tool in Visual Studio or head over to the Developer Community website.

Thank you for your continuous feedback and support, which helps us make Visual Studio better every day.

The post Search scoping helps you find what you’re looking for appeared first on Visual Studio Blog.

View Details

Before .NET 9, the debugger was unable to track exceptions thrown from user-code async methods into non-user code framework methods, such as ASP.NET middleware. We are pleased to announce that you will now start seeing the debugger stop for these user-unhandled exceptions in your ASP.NET applications, as well as anywhere else this might happen!

SummaryDebugging asynchronous code, especially in frameworks like ASP.NET Core, can be tricky due to the potential for exceptions to be thrown across asynchronous boundaries.

Now, the Visual Studio Debugger will automatically break when an async Task method throws an exception back to framework code. This will allow you to easily identify and diagnose issues in your ASP.NET applications, leading to faster debugging cycles and improved productivity. Read below for more details about how user-unhandled exceptions work and how the debugger handles async methods.

Please note that this is for .NET 9 and newer projects only.

DetailsThe Visual Studio Debugger will enter a break state when exceptions are thrown under three different conditions:

  • First chance exceptions, where exception settings indicate that the debugger should break whenever exceptions of the specified type are thrown.
  • Unhandled exceptions, where the exception is unhandled and no catch handler is found.
  • User-unhandled exceptions, where Just My Code is enabled, and an exception was found to have traveled through user code before a catch handler was found in non-user code.

User-unhandled exceptions are the target of the change to account for async user-unhandled scenarios.

All async Task<T> functions in C# compile to a state machine with an implicit catch handler that catches all exceptions thrown in the Task, sets IsFaulted, and adds the Exception to the AggregateException in Task.Exception.

When a Task is “unwrapped”, typically either via the preferred await or .Result, the stored exception is rethrown to the caller as would happen in a synchronous method and the implicit catch handling is not typically important or observed.

To a debugger, on the other hand, this looks like exceptions are being handled! An exception was thrown, it was caught in “user code” (the compiled result of async Task<T> DoSomethingAsync(...)), and any non-user code awaiting that Task will throw the exception again from non-user code. It is important to note that when Just My Code is enabled, the runtime will avoid sending the debugger events for exceptions that were not thrown in user code, significantly improving performance.

Now consider this behavior in a typical ASP.NET MVC Controller, when Just My Code is enabled:

[HttpPost]

public async Task<ActionResult<TodoItem>> PostTodoItem(TodoItem todoItem)

{

_context.TodoItems.Add(todoItem);

await _context.SaveChangesAsync(); // imagine this throws some Exception

return CreatedAtAction(nameof(GetTodoItem), new { id = todoItem.Id }, todoItem);

}

If SaveChangesAsync() throws an unhandled Exception, it will:

  1. Immediately catch it and fault the Task. The debugger is notified, but its user code throwing and catching, so the process continues.

  2. async Task<ActionResult<TodoItem>> PostTodoItem will unwrap the faulted Task, rethrow the Exception, and catch it again. Again, the debugger is notified, but nothing is amiss here (and there might be user code that might eventually await it to catch the exception, we cannot see into the future!)

  3. Whatever non-user library/framework middleware that is awaiting PostTodoItem will unwrap that Task and rethrow the exception, but since Just My Code is enabled, the debugger is oblivious – that exception was not thrown from user code and caught in non-user code, it was thrown from non-user code.

Thus, changes were required in the runtime to allow the debugger to indicate that we’d like to keep an eye on a particular exception object, so that if the compiled catch handler of a user-code async Task<T> method catches an exception, we continue to be notified about that exception object in case it is rethrown in non-user code. That way, if an exception is thrown through an ASP.NET MVC Controller, the debugger can break for user-unhandled.

Limitations

There are some limitations with this approach, notably the fact that the debugger is not actually stopped on the PostTodoItem frame in the example above, it is stopped at the frame below it, where the exception was rethrown and caught in non-user code:

App!MyMVCApp.DbContextOptions<TodoContext>.SaveChangesAsync() Line 10

App!MyMVCApp.TodoController.PostTodoItem(TodoItem todoItem) Line 5

[External Code] <- The debugger will stop here

This means the frames the exception was thrown from have been unwound past and are not necessarily valid to do variable evaluations on. A GC (Garbage Collection) may have occurred, variables may have been changed, and so on. The debugger will create fake [Exception] frames to represent the context in which the exception was originally thrown, and will attempt to save information from the async state machine to evaluate variables as best as it can, but certain things get nulled out by the compiler as part of async Task exception handling, notably:

  1. Local reference type variables
  2. Local value types with reference fields, or value types that reference other value types with reference fields.

Parameters and class fields/properties will stay intact, as will the exception itself.

For more information, see the original feature request in the public dotnet runtime repository here: https://github.com/dotnet/runtime/issues/12488.

To disable entering break state for async user-unhandled, you can run (in the associated Visual Studio Developer Command Prompt)

vsregedit set local hklm Debugger\EngineSwitches DisableBreakForAsyncUserUnhandled dword 1

or otherwise set the indicated key for the target installation of Visual Studio.

Library authors who do not want the debugger to stop on expected exceptions thrown into their functions can use the [DebuggerDisableUserUnhandledExceptions] attribute introduced in .NET 9 Preview 7, and either rethrow the exception or call the new Debugger.BreakForUserUnhandledException(Exception e) function when the exception is unexpected. You can find the API proposal and discussion for this pair of APIs here: https://github.com/dotnet/runtime/issues/103105.

Thank you!We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Break for Async User-Unhandled exceptions in the Visual Studio Debugger appeared first on Visual Studio Blog.

View Details

The current cyber security climate demands that applications not only provide outstanding features but also prioritize the security of user data. Applications like Visual Studio rely on token-based authentication to access resources on your behalf. While effective, token-based authentication can be susceptible to attacks if not properly protected. Today, we are happy to announce that starting with the Visual Studio 17.11 update, we are helping better protect your credentials by making the Windows authentication broker, also known as WAM (Web Access Manager), the default authentication method for Visual Studio 2022.

Download Visual Studio 17.11Benefits of Using WAMEnhanced SecurityOne of the most significant advantages of WAM is the enhanced security it offers you. By supporting conditional access policies that create a cryptographically secure tie between the token and your device, WAM helps mitigate common vulnerabilities associated with token-based authentication. In addition, WAM can leverage rich OS capabilities such as Windows Hello & FIDO (Fast ID Online) keys to streamline your experience while helping ensure your credentials are better protected against bad actors.

Simplified User ExperienceBeyond enhancing your security, WAM seamlessly integrates with the Windows account infrastructure, helping to provide you with a consistent and reliable authentication experience across your applications.

This integration helps reduce the overall number of authentications prompts you see inside Visual Studio and allows you to leverage your accounts without having to remember and constantly re-enter your credentials.

Getting started with WAMTo begin leveraging the benefits of WAM, ensure that your Visual Studio is updated to version 17.11 or later. Once updated, WAM will be enabled by default, and you can start experiencing the enhanced security and productivity it offers.

You can validate that WAM is enabled by opening the Accounts settings under Tools > Options:

Check our docs for additional details regarding using WAM inside Visual Studio 2022.

Let us know about your experienceWe continue to prioritize the security and usability of Visual Studio and are committed to providing the tools and resources you need to build secure, high-performing applications.

We look forward to sharing more about what’s next for security. In the meantime, we hope that you enjoy the new WAM authentication experience in Visual Studio and that it makes your development workflow more productive.

If you experience any issues or have feedback, please let us know by using the Report a Problem tool in Visual Studio or by posting on the Developer Community or in the comments below. We value your input, and we are always working to improve Visual Studio based on your needs and suggestions.

Thank you for using Visual Studio and happy coding!

The post Enhancing your Visual Studio authentication experience appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 17.11 now brings exciting advancements from GitHub Copilot! This release significantly improves how GitHub Copilot integrates into your development workflow, offering smarter and more intuitive coding assistance.

Discover the new GitHub Copilot features in Visual Studio, such as enhanced context understanding, improved code completions, and AI insights for debugging and naming. These updates aim to boost your productivity and efficiency in coding. To try these new features, download the update, make sure to activate your GitHub Copilot account and check out the release notes for more detailed information.

GitHub Copilot is getting smarterGitHub Copilot Chat now enables you to reference your complete solution, which allows you to gain an even deeper, holistic understanding of your solution to get better results! To reference your solution, simply use @workspace, and Copilot will respond to high-level questions regarding your solution, files, and their interactions.

Additionally, GitHub Copilot Enterprise users in Visual Studio can now use @GitHub to get answers enriched with context from their entire repository and Bing search results.

Naming things made easyGitHub Copilot can now generate naming suggestions for your C++ identifiers (variables, methods, or classes) based on how your identifier is being used and the style of your code.

To try it out, you’ll need an active GitHub Copilot subscription. Navigate to any variable you wish to rename, right-click -> Rename (Keyboard: Ctrl+R, Ctrl+R). You’ll notice a GitHub Copilot sparkle icon that you can click or toggle to generate naming suggestions.

AI-generated breakpoint expressionsAI-generated expressions for conditional breakpoints and tracepoints are now supported in C++. GitHub Copilot analyzes your code and offers insightful breakpoint expressions, streamlining your debugging process.

When you place the cursor in the condition text for a conditional breakpoint/tracepoint in the breakpoint settings window, GitHub Copilot will instantly generate AI-based expression suggestions tailored to your code. You can choose the condition that best suits your needs.

Understand your symbols with GitHub CopilotWe’ve integrated GitHub Copilot into the tooltip on hover over symbols to provide AI-generated summaries of the selected symbol. This is available for both C# and C++ developers.

This feature assists developers in understanding descriptions of various symbols at different invocations within their codebase. By hovering over a symbol and selecting the ‘Tell me more’ option, GitHub Copilot can generate documentation for the selected symbol.

Refine your GitHub Copilot suggestionsIn Visual Studio 17.11, you can now refine code completions by adding context or asking questions without accepting them first. This update allows you to modify and retry GitHub Copilot’s suggestions before having to accept, saving you the hassle to accepting and refining again! Just press Alt+/ to modify, or if you’re happy with the suggestion, press tab to accept.

GitHub Copilot is even more secureIntroducing GitHub Copilot Content Exclusion, a new feature that allows admins to Copilot to ignore specific files in a repository or organization, ensuring sensitive information is protected while using AI for efficient coding. This applies to Completions, Inline, Chat, for GitHub Copilot for Business and Enterprise users. Additionally, exclusions also apply to other non-chat features, like rename suggestions and hover text. Additionally, content exclusion works with repos on platforms other than GitHub, including Azure DevOps.

We hope you enjoy this update to Visual Studio and all the new developments happening within GitHub Copilot, and we look forward to hearing what you think. You can share feedback with us by using the thumbs up or down within the Chat, via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on Twitter, YouTube, and LinkedIn and on Microsoft Learn.

Thank you for using Visual Studio and happy coding!

Download Visual Studio 17.11The post New GitHub Copilot features in Visual Studio 2022 17.11 appeared first on Visual Studio Blog.

View Details

IntroductionIn Visual Studio 2022 version 17.11, you will find brand new productivity enhancements for your game development workflows. From faster conditional breakpoints to a swath of Unreal Engine enhancements, we have added various productivity boosters based on your feedback. Once again, thank you for sharing Developer Community feedback and answering our surveys. Your valuable feedback continues to drive the direction of the Visual Studio gaming team.

General C++ Game DevelopmentSupercharge Your IntelliSense PerformanceWe have received feedback from AAA developers about IntelliSense performance. While we have improved performance over the past releases, we understand that these performance improvements may be less impactful for large C++ projects.

Here are some helpful tips to further boost the power for Visual Studio’s IntelliSense for developers with powerful hardware:

  • Ensure 64-bit IntelliSense is activated. +
  • Adjust your memory limits (in MB) to reflect your hardware. +

Faster Conditional BreakpointsIn version 17.11, you will see a significant improvement in performance for conditional break points. Our initial assessment found that execution time is almost four times as fast, reducing execution time from 80 seconds to 21 seconds over 80,000 iterations.

Build Insights Quality of Life ImprovementsWe have added several quality-of-life enhancements to Build Insights. Starting in version 17.11, you can now group your results by project, view the relative path and file name in place of the full path, and see a better grouping of results in the Included Files view.

Unreal Engine IntegrationAdding Unreal Engine Classes, Modules, and PluginsIn Visual Studio 2022 version 17.11, you can now add Unreal Engine class templates, modules, and plugins. These new productivity features are available for both vcxproj and uproject.

To get started, right-click on your project in Solution Explorer and select Add > Unreal Engine Item.

In the revamped Add New Item dialog, you can select several new choices.

Unreal Engine ClassesBased on your feedback, we have added additional Unreal Engine class templates. You can now find the common class templates in Visual Studio’s Add New Item dialog just as you would find in the Unreal Engine Editor. The new dialog provides a list of common Unreal Engine class templates that you can add to your project. You can also now add your class to a module of your choice.

Unreal Engine ModuleYou can now also add an Empty Unreal Engine Module using the Add New Item dialog.

Unreal Engine PluginLastly, you can now add an Unreal Engine Plugin to your project through the Add New Item dialog.

Unreal Engine ToolbarTo further streamline our integration with Unreal Engine, we have added the Unreal Engine toolbar in Visual Studio 2022 version 17.11. The toolbar contains new productivity features and shortcuts to existing integration.

  • The play icon and the dropdown work in tandem to quickly attach to processes while debugging. With the Unreal Editor running, you will see Unreal Engine related processes. Selecting one of the choices will allow you to easily attach to the process to start a debugging session. Additionally, you can type any process name to quickly attach to that process. +
  • The start and stop button will control the Unreal Engine integration server, used for the Unreal Engine Test Adapter. The server runs as a background process that automatically updates your test information. If you have the Unreal Engine Test Adapter option active, the server will automatically start upon opening your UE project.
  • The Rescan Blueprints button will refresh your Unreal Engine Blueprint references.
  • The Unreal Engine Log button is a shortcut to open the Unreal Engine Log window, in case you close it accidentally.
  • The Configure Tools for Unreal Engine button is a shortcut to launch the Unreal Engine Integration Configuration window. The configuration page gives you an overview of the Unreal Engine Integration status and gives you help if certain integrations were not configured properly.

Blueprints UpdateWe received feedback asking to improve the process of setting up Blueprint references in Unreal Projects. Starting in Visual Studio v17.10, you will no longer need the Unreal Engine Plugin “Visual Studio Integration Tool” to view Blueprint references. Blueprint references will automatically show up if you have the “Visual Studio Tools for Unreal Engine” component installed.

Send us your feedbackWe hope you enjoy this update to Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on Twitter, YouTube, LinkedIn, and on Microsoft Learn.

Thank you for using Visual Studio and happy coding!

The post C++ Gaming Productivity Update for Visual Studio 2022 version 17.11 appeared first on Visual Studio Blog.

View Details

In Visual Studio 2022 v17.11, you’ll discover several new features that address specific issues developers have reported. These updates don’t belong to a distinct category, but we’re dedicated to sharing them with you in this blog post. You can download the update and view the comprehensive release notes for full details.

Find the code you’re looking forDo you ever feel like you’re seeing too many results in code search? Narrow down your focus with the newly added scoping options in Code Search.

For the default code search experience and each filter, you can now set the scope to Entire solution, Current project, or Current document and toggle inclusion of external files.

You can set different scopes for different filters. For example, the default experience can be set to look through Entire solution and members can be set to look through only current document. Your selections will be preserved past the current session.

Familiar keyboard shortcutsWhen moving between different IDEs and editors, it can be frustrating to have to relearn keyboard shortcuts. We’ve made some changes to some default keyboard shortcuts to make them more familiar and to preserve your muscle memory.

Toggle line commentsYou’ve been able to toggle line comments in Visual Studio for a long time, but the default keyboard shortcut was Ctrl+K, Ctrl+/. We’ve now added Ctrl+/ as an alternative shortcut, which is the default in many other IDEs and editors.

Open Command PaletteOr Feature Search as it’s called in Visual Studio. The default keyboard shortcut for this feature is now Ctrl+Shift+P, which should be familiar to VS Code users for opening the Command Palette.

Never miss installing a componentMany teams use .vsconfig files to standardize their teams’ Visual Studio installations. The .vsconfig files can be placed in a repo or a project’s solution directory, and Visual Studio will automatically detect if components specified in the *.vsconfig file are missing.

If any are missing, then a notification such as the one pictured below will appear.

We’ve made two improvements to this experience in Visual Studio 2022 version 17.11 Preview 1.

  1. First, Visual Studio can now detect if any local or network hosted extensions are missing from the installation, and if so, it’ll prompt you to install them. Previously, with respect to extensions, Visual Studio was only able to recognize if marketplace extensions were missing.
  2. Secondly, Visual Studio will now re-prompt the notification in certain situations, such as if the .vsconfig file has changed because new components or extensions get added to it. Previously, the notification would only pop until you acted upon it, at which point it would be suppressed forever*.

Improved user authenticationVisual Studio now uses the Web Account Manager (WAM) as its main authentication mechanism. This integration not only streamlines the authentication experience for Visual Studio, but it also enhances the security of your credentials.

Here’s how the new WAM experience looks like:

How does this impact your experience?

Using WAM as the default authentication experience has many benefits, including:

  • Windows integration: In addition to reducing the overall number of authentication prompts, you can now select existing Windows accounts instead of repeatedly entering credentials.
  • Better token protection: Refresh tokens are better secured as they are now device bound.
  • Support for the latest security features:
    • Leverage rich OS capabilities such as Windows Hello & FIDO keys.
    • Access the latest and greatest Microsoft Entra ID capabilities and conditional access policies.

New Teams Toolkit templatesTeams Toolkit now offers an empty Teams template for you to connect with your existing projects or use it as a starting point for new Teams apps.

  • Start with this empty template to create a Teams app.
  • If you want to add Teams capability to your existing project, add Empty Teams App to your project and then connect two projects by making simple edits follow https://aka.ms/Config-Teams-app.

Teams Toolkit supports authentication for Search Results from API Message Extensions app.

We hope you enjoy this update to Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on Twitter, YouTube, LinkedIn, and on Microsoft Learn.

Thank you for using Visual Studio and happy coding!

Download Visual Studio 17.11The post New IDE features in Visual Studio v17.11 appeared first on Visual Studio Blog.

View Details

GitHub Copilot in Visual Studio 2022 17.11 now offers an improved experience you to refer to their methods, classes, functions, and entire solution directly within the chat. By using the # symbol followed by the name of a method, class, or function, or by referring to your solution with @workspace, you can provide specific context that helps GitHub Copilot better understand their code and the problem at hand.

Refer to your solutionGitHub Copilot Chat now allows you to refer to your entire solution. This feature helps provide an even deeper understanding of your solution to get the best results. To refer to your solution, simply use the @workspace and Copilot will answer high level questions about your solution, files and how they work together.

Try asking GitHub Copilot Chat questions like:

  1. @workspace What project can I run in my solution?
  2. @workspace In my workspace, where is #methodname referenced?
  3. @workspace Where does serialization occur in my solution?

Reference your methods, classes, functionsGitHub Copilot Chat now allows you to refer to your methods, classes, and functions inline. By referring to methods, classes, and functions directly within the chat, you can provide specific context that helps GitHub Copilot better comprehend your code and the problem at hand. This feature empowers you to provide richer context to GitHub Copilot, enabling it to deliver more precise responses by gaining a deeper understanding of your codebase.

Try asking GitHub Copilot Chat questions like:1. I have a test method named #methodName. How can I ensure that it’s being executed correctly? 2. What are some optimizations that could be applied to #methodName? 3. How does #methodName1 use #methodName2 and what issues should I look out for? 4. /explain #methodName

Search the web in Copilot ChatGitHub Copilot now includes context from your entire repository & can search the web.

GitHub Copilot Enterprise subscribers in Visual Studio can now use GitHub Copilot Chat to get answers enriched with context from their entire repository and Bing search results.

Get answers from across your entire codebaseGitHub Copilot Chat can now answer questions with understanding of your full repository, not just the tabs you have open. Index your repository on GitHub.com, and then ask a question mentioning @github. You can ask questions like @github where is rate limiting implemented?

Search with the context of the webGitHub Copilot chat can also search Bing to find information outside of its general knowledge or your codebase. When you mention @github, GitHub Copilot will intelligently decide when to use Bing. You can ask questions like @github what is the latest LTS version of .NET?

Bing search is only available if enabled by an administrator – for more details, see Enabling GitHub Copilot Enterprise features or read the docs.

Try it out today!

We hope you enjoy this new feature in GitHub Copilot for Visual Studio! Your feedback is important to us, so please share your thoughts using the thumbs up or down in the Chat, or by visiting the Developer Community. We look forward to hearing from you!

Happy coding!

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using GitHub Copilot in Visual Studio on what you like and what we can improve. Your feedback is critical to help us make GitHub Copilot the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Enhancing Code Comprehension: GitHub Copilot’s Features in Visual Studio 2022 17.11 appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 version 17.11 is here and comes with a host of new features for C++ developers. We’ve made improvements across our toolchain, Unreal Engine support, Build Insights, CMake debugger, and more. This post gives a quick overview of what’s available; for all the details, see What’s New for C++ Developers in Visual Studio 2022 17.11 on the C++ blog.

Standard LibraryThe three main areas of improvement in this release are in formatted output, vectorization, and diagnostics. For formatted output, we’ve implemented parts of Formatting Ranges and all of Printing Blank Lines with println. Our vectorization improvements hit over a dozen of the standard algorithms, and we’ve improved the diagnostics of common misuses of std::ranges::to and std::get(std::tuple). See the STL changelog for all the details.

CMake DebuggerWe have added support for the CMake debugger in CMake projects targeting Linux via WSL or SSH. The CMake debugger allows you to debug your CMake scripts and CMakeLists.txt files through the Visual Studio debugger.

To start a CMake debugging session, set a breakpoint in your CMakeLists.txt file and then navigate to Project > Configure Cache with CMake Debugging.

Unreal Engine SupportWe’ve added several new features for Unreal Engine developers:

  • An Unreal Engine toolbar that provides quick access to Unreal Engine actions such as attaching to UE processes and accessing the UE log
  • An Add Class dialog for adding common UE class templates to your project
  • An Add Module dialog for adding UE modules to your project

Build InsightsIn this update, we added quality of life changes to C++ Build Insights integration. You can now filter your Build Insights trace results by project. For results in each row, you will now see the relative path and file name instead of the full path. We have also improved the grouping of results in the Included Files view.

Breakpoint PerformanceWe have significantly enhanced the performance of conditional breakpoints in C++ through a reworked implementation.

Beginning with version 17.11, our initial assessment finds that execution time is almost four times as fast, reducing execution time from 80 seconds to 21 seconds over 80,000 iterations.

SummaryWe hope this has given you a taste of what’s new. For all the details, see What’s New for C++ Developers in Visual Studio 2022 17.11 on the C++ blog.

We are very much interested in your feedback. The comments below are open. Feedback can also be shared through Visual Studio Developer Community. You can also reach us on Twitter (@VisualC), or via email at visualcpp@microsoft.com.

The post New C++ features in Visual Studio v17.11 appeared first on Visual Studio Blog.

View Details

Debugging and diagnostics are vital skills for any developer, but they can also be difficult and time-consuming to get proficient . That’s why we’ve added some fantastic new features and enhancements to Visual Studio 2022 v17.11 that will help you find and resolve bugs faster and easier than ever before. Here are some of the highlights. Download this update and see the release notes for all the details.

DebuggingBreak on async method exceptionsDebugging asynchronous code, especially in frameworks like ASP.NET, can be tricky due to the potential for exceptions to be thrown across asynchronous boundaries.

Now, with Visual Studio Debugger it automatically breaks when an async Task method throws an exception back to framework code.

AI-generated breakpoint expressionsAI-generated expressions for conditional breakpoints and tracepoints are now supported in C++. GitHub Copilot analyzes your code and offers insightful breakpoint expressions, streamlining your debugging process.

Debug AnyCPU applications manifested to run as arm64Visual Studio natively supports building and debugging Arm64 apps on Arm-based processors. Unfortunately, applications built with the AnyCPU setting running on an Arm64 machine will default to using x64 emulation. While the capabilities of the x64 emulator have expanded, the most efficient Arm CPU scenarios are supported when applications are running natively.

To better support the intended native behavior the Windows 24H2 update introduces a new setting for your App manifest files. .NET developers can include a list of supported architectures (amd64 or arm64), explicitly signaling that an application built with the AnyCPU setting should run natively using the Arm64 CLR on Arm64 devices.

Blazor WebAssembly debuggingThis release features a preview of the improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later.

Organize your breakpoints with default breakpoint groupsBreakpoint groups allow you to customize and toggle breakpoints for faster and more effective debugging.

You can now mark the selected breakpoint group as the default, ensuring all newly added breakpoints are automatically included in that group.

Edit and visualize LINQ expressions in the IEnumerable visualizerThe Visual Studio debugger now offers an editable expression feature in the IEnumerable visualizer, a powerful enhancement for developers working with collections.

Improved performance of conditional breakpoints in C++We have significantly enhanced the performance of conditional breakpoints in C++ through a reworked implementation.

Our initial assessment shows a performance improvement of at least 35% in version 17.10 and 70% in version 17.11, reducing execution time from 80 seconds to 21 seconds over 80,000 iterations.

ProfilingKeep your target selection in the instrumentation tool between runsThe instrumentation tool now persists the target selection between runs offering a significant benefit by enhancing the continuity of profiling sessions.

With this improvement, you can maintain your specified target across multiple instrumentation runs, removing the need for repetitive selection tasks.

Decompile .NET assembliesVisual Studio profiler now offers auto-decompilation for .NET libraries in scenarios where source code is unavailable. By automatically decompiling code during source lookup, even without loaded symbols or exact file locations, you can gain insights into the code’s structure and performance issues.

With this new feature, while visualizing a collection or dataset, you can directly edit the expressions textbox on the top of the dialog with your desired LINQ expressions. The visualizer updates in real-time, reflecting the data change resulting from your query.

We hope you enjoy this update to Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn and on Microsoft Learn.

Thank you for using Visual Studio and happy coding!

The post New debugging and diagnostic features appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 v17.11 includes fantastic updates to everyone working with Git. They bring the richness of both GitHub and Azure DevOps into Visual Studio and part of your natural workflow. This greatly simplifies your inner loop, making you even more productive than before. Download this update and see the release notes for all the details.

More meaningful code reviewsWe’ve made it easier to view your GitHub and Azure DevOps pull request comments directly in your working file in Visual Studio. You can now stay in your context, make necessary code changes, and interact with your colleagues’ suggestions without switching contexts to the browser.

Fix for CodeLens timelineCodeLens timeline now respects the configuration of your timeline to show the correct information. This fix addresses an issue where the timeline was not honoring the months set in the file changes hover preview.

Updates to pull request creationWe’ve improved on the create a pull request experience with target branch selection, commit counts, and other stabilization fixes. Additionally, we now automatically create links to work items that have been mentioned in commits that are part of the pull request. We also draft pull requests which was one of the top requests.

We hope you enjoy this update to Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn and on Microsoft Learn.

Thank you for using Visual Studio and happy coding!

Download Visual Studio 17.11The post New git tooling features appeared first on Visual Studio Blog.

View Details

We are excited to announce that Copilot Content Exclusion is now available in Visual Studio 2022 17.11. This feature allows your admins to configure Copilot to ignore certain files in a repository or organization, giving you enterprise control that ensures sensitive information is protected while seamlessly integrating trusted AI for efficient coding.

This will now be available for Completions, Inline, Chat, for GitHub Copilot for Business and GitHub Copilot for Enterprise customers. Content Exclusion is not limited to repos hosted on GitHub but also available for repositories hosted on other platforms, such as Azure DevOps.

Get Visual Studio 2022 17.11How to Exclude ContentOrganization administrators or repository owners can choose which files or paths are excluded. This will prevent Copilot from accessing excluded files. Learn how to enable this feature here.

How to Check if Your Content is ExcludedCopilot experiences where exclusions apply:

| Copilot experiences | | Completions | Verify if Content Exclusion is enabled on your file by checking the left side for the “Excluded” label. | | Inline Chat | Verify if Content Exclusion is enabled in Inline Chat below the prompt box. | | Chat Window | Verify if Content Exclusion is enabled for the specific file you referenced by checking the tip at the top of your prompt box in the Chat Window. |

Please note that certain GitHub Copilot features in Visual Studio may be fully disabled if any file is excluded. We hope this new feature enhances your experience with GitHub Copilot in Visual Studio

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using GitHub Copilot in Visual Studio on what you like and what we can improve. Your feedback is critical to help us make GitHub Copilot the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Copilot Content Exclusion Now Available in Visual Studio 2022 17.11 appeared first on Visual Studio Blog.

View Details

We’re excited to announce the availability of Visual Studio 2022 v17.12 Preview 1 – the first preview of our next update to Visual Studio. This update focuses on providing fantastic developer experiences for working with .NET 9 projects and new AI productivity features, along with continues improvements all-around. Download the preview and see the full list of enhancements in the release notes.

.NET 9 + Aspire.NET 9 elevates cloud-native and intelligent app development, focusing on productivity enhancements, streamlined deployments, and accelerated AI integration, ensuring superior performance for developers across various applications. And Visual Studio 17.12 fully supports .NET 9 development making it easy for you to take full advantage of all the improvements it has to offer.

Additionally, you’ll find updates to features around the IDE that make working with .NET and ASP.NET more delightful than ever.

AI productivityWith our ongoing commitment to radically increase developer productivity using AI, this update brings new improvements to GitHub Copilot that are unique to Visual Studio. By providing more context from the IDE, you’ll find more accurate suggestions using a more comprehensive knowledge of your solution. Combine that extra context with more fine-tuned code generation and you’ll find this update elevates your coding experience significantly.

Download Visual Studio v17.12We hope you enjoy this preview of Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

You can download the preview from our website or update it from within the IDE. Please note that you should not use this preview in production environments, and some extensions or workloads may not be compatible with it.

Thank you for using Visual Studio and happy coding!

The post First preview of Visual Studio 2022 v17.12 with .NET 9 appeared first on Visual Studio Blog.

View Details

We are thrilled to announce the General Availability (GA) of Visual Studio 2022 version 17.11. This release is a testament to our commitment to listening to you, our developer community. Every enhancement, every fix, and every new feature in this release has been shaped by your feedback. Whether you’re building web, desktop, cloud, or gaming applications, Visual Studio 2022 v17.11 is designed to make your development experience smoother, faster, and more intuitive.

We heard you – loud and clear. From the most upvoted issues on our Developer Community Forum to the suggestions that came through in our feedback channels, this release is a direct response to your needs and priorities.

Download Visual Studio 2022 v17.11Alongside this release, we’ve also made significant improvements to our release notes. We’ve categorized the feature enhancements to make it easier for you to find exactly what’s new and relevant to your work. What’s more, we’ve linked each enhancement back to the original Feedback Ticket that inspired it, so you can see firsthand how your input directly shaped this release. This is part of our ongoing commitment to transparency and collaboration, ensuring that every update to Visual Studio reflects the needs and priorities of our developer community.

Productivity EnhancementsYour time is valuable, and with Visual Studio 2022 v17.11, we’ve made sure that every second counts. Here are some of the key productivity features that have been influenced by your feedback:

  • Find the Code You’re Looking For: Enhanced search capabilities to help you quickly locate the code you need, even in the largest projects.
  • More Meaningful Code Reviews: Improvements to code review workflows, making it easier to spot potential issues and collaborate with your team.
  • Updates to pull request creation: Continual improvements to the pull request creation experience.
  • Familiar keyboard shortcuts: Some common keyboard shortcuts now match those in other popular IDEs.

GitHub Copilot – Smarter and More SecureGitHub Copilot has quickly become an indispensable tool for many developers, and with this release, it’s getting even better. Thanks to your input, Copilot now offers:

  • AI-Generated Breakpoint Expressions: Automatically suggest breakpoints based on your code, helping you debug more efficiently.
  • Understand Your Symbols: Improved symbol recognition to ensure you get the most accurate suggestions.
  • Refined Suggestions: More precise and context-aware code completions, reducing the need for manual edits.
  • GitHub Copilot is even more secure: GitHub Copilot Business customers to prevent specified files or repositories from being used to inform code completion suggestions made by GitHub Copilot.

Debugging & DiagnosticsWe know that efficient debugging is crucial to your workflow. With v17.11, we’ve made several community-driven improvements:

  • Easier to Fix Async Exceptions: Improved handling and diagnostics for asynchronous code, helping you resolve issues faster.
  • Profile External Code with Ease: Enhanced profiling tools for better performance analysis, even with external code.
  • Improved Debugging on Arm64: Expanded support and optimizations for Arm64, ensuring a smooth experience on a wider range of devices.
  • Blazor WebAssembly debugging: A preview of the improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later.
  • Expressive IEnumerable Visualizer: The editable expression feature in the IEnumerable visualizer allows direct editing and visualization of LINQ expression in the Visual Studio debugger.

IDE & Workflow EnhancementsYour development environment should work for you, not against you. That’s why we’ve focused on making Visual Studio even more intuitive and responsive:

  • Never Miss Installing a Component: Streamlined component installation processes to ensure you always have the tools you need.
  • Stay Updated and Secure: New features to help you stay on the cutting edge, while keeping your environment secure and stable.
  • New Teams Toolkit templates: Teams Toolkit added new Teams app templates for a better Teams development experience.
  • Improved user authentication: Visual Studio now uses the Windows authentication broker otherwise known as WAM as the default authentication mechanism.

Web & Gaming Development ToolsFor our web and game developers, we’ve introduced several updates to make your work easier and more efficient:

  • NPM Packages in Solution Explorer: Seamlessly manage your NPM dependencies directly within Visual Studio.
  • Discover dynamic Web API routes: The Endpoints Explorer has been updated to discover endpoints at runtime.
  • Unreal Engine Add Class Templates: Simplified template management to speed up your Unreal Engine development.

.NET & C++ DevelopmentOur focus on .NET and C++ remains strong, with new tools and improvements to enhance your coding experience:

  • Revamped Resource Explorer: A more powerful and intuitive resource management tool for .NET developers.
  • Debug Your CMake Projects on Linux: Expanded support for C++ developers working in cross-platform environments.
  • Build Insights QoL Update: Adds various quality of life improvements to C++ Build Insights.

SHARE YOUR FEEDBACK AND STAY CONNECTEDAs you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Visual Studio 2022 v17.11 – Your feedback in action appeared first on Visual Studio Blog.

View Details

Hi everyone! I’m Serena, a rising 4th year at Rochester Institute of Technology with a major in Computer Science and a minor in Psychology. This summer I was a returning intern at Microsoft as a software engineering intern with the JavaScript and TypeScript Tooling team. In this blog post, I will be covering what it was like to work on language tooling and my overall experience as an intern at Microsoft.

What I Worked OnOver the summer, I worked on a toggle feature for inlay hints (that is additional information about source code that is rendered inline) in Visual Studio. The inlay hint feature supports multiple languages including Python, JavaScript, TypeScript and Razor. My project also involved working on a new settings page on the Tools/Options window for this feature. To complete this project, I had to ramp up on how the Language Server Protocol (LSP) works as well as researching on how a similar feature was integrated into Roslyn (a .NET Compiler Platform for C# and Visual Basic) and Visual Studio Code.

I majorly worked out of the Redmond office. During this summer, I worked closely with my mentor to understand the problem space and how the existing code base worked in relation to inlay hints. This also meant the start of my project was slower than expected. I had anticipated some unfamiliarity with the space I was working in but being thrown into multiple repositories at once felt unsurmountable at the start. With the help of my mentor, I was able to set out weekly deliverables to break the project into smaller chunks of exploration. In addition to this, I met with my manager weekly to give status updates and talk about my internship progression in general. The success of my internship is noted in all the conversations I had regarding development and inlay hints in its entirety. These conversations were cross-team efforts with the Visual Studio Editor team in the second half of my internship. The discussions shaped a lot of what the feature turned out to be (from the choice of a dropdown over checkboxes to the string choices of the settings) and were essential as this feature is going to be available in the next preview of VS! They also ensured I challenged not only my thoughts as a developer but also my introverted personality. I was pushed out of my comfort zone frequently to talk to various engineers off and on my team regarding various aspects of the project. Outside of my project, I got to sit in on triaging bugs and working through feedback tickets on the tooling experience which was insightful to see the connection between users and developers. I also attended multiple intern events, especially those organized for the Developer Division (DevDiv) interns and DevDiv Blacks at Microsoft (BAM) interns.

What I LearnedFor the past 12 weeks, there’s been a steady flow of new information and while I was at Microsoft last summer, being on a different team brought new insights into what is possible and what happens at Microsoft. Some takeaways I’ve had from the summer have been:

  • The Language Server Protocol. From working on this project, I got to understand the connection between LSP and the individual language servers as well as the client (Visual Studio Editor).
  • The balance between experimenting and seeking help. Over the summer, I tried to find the perfect time to reach out for help and what I learned was there wasn’t a one size fits all solution. For each roadblock I hit, it took a different length of time to solve it and even if sometimes it was a simple fix, it was a fix I wouldn’t have come to without outside help. Other times, mulling over the problem for a couple of hours would get me a solution and new insights. An example of a roadblock I faced was in implementing the settings page. I was using a complex, outdated implementation for pages as a guide and got stuck when certain parts just did not translate to my scenario. After a couple of tries at making it work, I reached out to the Editor team and found out that was no longer the way they implemented new pages and was given a simpler page as a guide. Everything flowed more seamlessly from there on out. Without reaching out, I would have been stuck on that for way longer with no way forward.
  • Code reviews are not personal. Seeing all the comments come in for my first PR made me think “did I do anything right?”, and I had to work through realizing comments didn’t immediately equal the work I put out was trash or an indictment on my skills. Most of them turned out to be questions for clarification or optimization comments which didn’t mean my approach was wrong but there was a better way to do it.

What I EnjoyedI enjoyed meeting other DevDiv interns and gaining insight from them on what their teams worked on. I also participated in the Intern Networking Program which was an easy and fun way to meet other engineers across Microsoft and learn about what’s happening in other teams and organizations. Connecting and participating in BAM events also really made my time here enjoyable – seeing a community of people that look like you and with whom you have shared identities is always something I look for in spaces I find myself in and finding that community in Microsoft has been great!

Outside of work, exploring the Seattle area (and enduring the weather here) has been interesting. Also having time to get back into some of my hobbies (reading and consuming an unhealthy amount of reality TV) has been appreciated. In all, the connections and time to take in a new city have been the highlight of the summer.

What’s NextI accepted this offer last Fall and was very curious about what team and project I would end up working on, what the team dynamic would be, and how working alone on a project would be. I came in knowing next to nothing about language tooling but as I leave, I’m grateful for the experience, the work I got to do, and the people I’ve met along the way. I’m heading back to school for my fourth year and I’m leaving still curious about all the possibilities in this field. I had an amazing summer, and I hope I get to stay in touch with the people that helped make this a great experience!

The post My Summer Experience as a SWE Intern at Microsoft appeared first on Visual Studio Blog.

View Details

One of the most powerful and frequently used features of Visual Studio is the Attach to Process dialog, which enables you to debug processes running on your machine or on a remote machine. For anything you could develop using Visual Studio, the Attach to Process dialog allows you to quickly attach the debugger to the processes you want to inspect and troubleshoot. While this feature has been around for a long time, its current design has room for modernization to better fit the latest versions of Visual Studio. Thus, we used this opportunity to improve the Attach to Process experience introducing a revamped and refreshed UI. Along with the new UI, we also took some time to introduce additional features users had requested and improved performance and accessibility.

The first thing you may notice is that the new UI visual style was updated to be consistent with the rest of Visual Studio, as well as supporting dark mode or any other VS theme you are using. The refreshed layout is not just about looks—it’s designed to save space and reduce clutter. This means you can easily find and select the processes you want to debug, even when working with smaller window sizes. It’s a cleaner, more intuitive experience that keeps everything you need within easy reach.

What’s new in the Attach to Process dialog?Following are the new features and improvements to the dialog:

  • Theming support: The dialog now adapts to your preferred VS theme.

  • Decluttering: We revamped the view to reduce clutter and give back vertical space. This includes having the connection information hidden as a tooltip and having the Code Type be selected through a combo box in the dialog, instead of requiring a separate window like the old dialog did.

  • Introduced Local and Remote connection types: We added a new “Local” only connection type that simplifies the view when only debugging processes on your own machine. The existing “Default” connection was renamed into “Remote (Windows)”, as the new default connection is the Local one.

  • Improved performance: Rendering time of both the tree view and flat view of the processes was improved. This should be especially noticeable for the tree view.
  • Collapsible items in the Tree view: The dialog now allows you to collapse child processes shown in the Tree view. Helping you reduce clutter.

  • Persistence of columns positions and widths on the processes list: The dialog now remembers the positions and widths of the columns on the processes list. This way you don’t have to adjust them every time you re-open VS.

  • Integrated “Track Window” experience: When selecting a process using the Track Window toggle, any window you selected will be highlighted on the processes list. Allowing you to see its information before deciding to attach, or you can attach directly to it though a double click.
  • Buffered Text Search: The dialog now lets you start typing the name of the process you are searching as soon as the dialog opens and even before the processes are loaded. The dialog will buffer your input and apply it as soon as the processes are available, saving you some time in your workflow.

Other changes:* + The search now supports wildcards, hexadecimal search, property filters and multiple process search.

    • Process icons are shown on the lists. (Local connection only)
    • Preview of the selected processes. You can double click on it to scroll to the selected process on the list.
    • The last attached process name is shown on the reattach menu item. (Only on VS 17.11)

Try it out and let us know what you thinkThe new Attach to Process dialog is available in Visual Studio 2022 version 17.10 and later. You can access it from the Debug > Attach to Process menu or by pressing Ctrl+Alt+P. We hope you enjoy using it and find it more productive and pleasant than the old one. If you have any thoughts or suggestions, please share them with us on the Developer Community site or just leave a comment below. Your feedback is very important to us.

Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn.

The post Introducing the revamped Attach to Process experience appeared first on Visual Studio Blog.

View Details

You can now leverage Sign CLI for a more secure, modern way to sign your Visual Studio extensions. Signing your VSIX packages improves security, prevents tampering, and builds trust with your users. This integration makes it easier and more convenient to sign your packages than ever before!

Sign CLI replaces the older VSIXSignTool with a modern, general purpose sign tool that’s actively maintained and kept up to date with the latest security standards. It supports cloud and local signing from a variety of sources and can also fit seamlessly into your CI pipeline for easy integration. Continue reading to learn how to enhance your extension publishing workflow by using Sign CLI!

Obtain a code signing certificateTo sign your VSIX, you’ll need a valid EV or standard certificate from a public certificate authority that utilizes SHA 256, SHA 384, or SHA 512 digest algorithms. Windows supports certificates from many popular certificate authorities, such as Certum, Comodo, DigiCert, GlobalSign, SSL.com, and more.

For a full list of trusted partners, please see https://aka.ms/TrustCertPartners.

Get ready to sign your extensionsTo start using Sign CLI to sign your extension packages, you’ll first need to install it. It’s available as a dotnet tool on the nuget.org Gallery. To install, open Visual Studio’s integrated terminal using View > Terminal (or use the Ctrl+` shortcut), then use the commands below. Note that if you’re working outside of Visual Studio, you can access the Developer PowerShell by selecting Start in Windows then typing in “developer PowerShell”.

Install Sign CLIThe Sign tool is still a prerelease version, so you’ll need to include the –prerelease flag when you install to get the latest:

dotnet tool install sign --prerelease --global

To install a specific version, visit the versions tab on the Sign CLI page on nuget.org to find the version you’re interested in and use the following syntax:

dotnet tool install sign --global --version <version>

Offline installationIn the event you’re working in an isolated environment, you can download the Sign CLI NuGet package you want and install it using:

dotnet tool install --global --version <version> --add-source <path to folder> sign

Sign your VSIX using Sign CLISign CLI supports cloud signing with Azure Key Vault or local signing using certificates and private keys stored in:

  • PFX/P7B/CER files
  • The Windows Certificate Manager
  • A USB device with access to a Cryptographic Service Provider (CSP)

Once installed, you can use Sign CLI from a Visual Studio’s integrated terminal (View > Terminal).

For example, to sign a VSIX using a PFX file with a certificate and a private key, use a command like the following:

sign code certificate-store -cfp <SHA-256 fingerprint> -cf "D:\Certs\my.pfx" -d "VSIX Signature" -u "http://timestamp.acs.microsoft.com/" "C:\Users\Contoso\Downloads\FingerSnapper2022.vsix"

Or to sign a VSIX using the Microsoft Certificate Manager:

sign code certificate-store -cfp <SHA-256 fingerprint> -d "VSIX Signature" -u "http://timestamp.acs.microsoft.com/" "C:\Users\Contoso\Downloads\FingerSnapper2022.vsix"

For more detailed instructions, please visit our Signing VSIX Packages article where you can also find a breakdown of all of the command-line options for Sign.

Let us know what you thinkAs you use Sign CLI to sign your extensions, please use the Issues tracker on the Sign CLI GitHub repo to report any issues or bugs you experience. If you want to provide general feedback on extension signing or to suggest additional features, please create a feedback ticket at the Visual Studio Developer Community.

We’re excited to hear from you!

The post Sign VSIX packages with Sign CLI appeared first on Visual Studio Blog.

View Details

Here is one Visual Studio tip from my colleague Gwyn Peña-Siguenza which I didn’t know about! Yes, even after 26 years using this fantastic tool, I am still discovering new features. So thanks to Gwyn for this!! This is all about deleting lines, and using the Windows Clipboard for support.

You can see the short video on our YouTube channel, and there is also a longer video with 20 must-know shortcuts here. Don’t forget to subscribe if you want to learn more tips!

Using the Clipboard History in WindowsOne of my favorite tools on Windows is the Clipboard History. This feature was introduced in Windows 10 and is seriously adding productivity to my day-to-day. If you haven’t been using it, you need to enable it in the Windows settings. Simply follow the steps:

  • Go to the Windows Settings
  • Search for Clipboard settings
  • Enable “Clipboard History”

Windows Clipboard settingsTo test that this works, try the following:

  • Copy one piece of text using Ctrl-C
  • Copy another piece of text using Ctrl-C again.
  • Press the Windows key and the V key together (Win-V)
  • This brings up a new window where you should be able to see the two entries you just copied at the top.

This enables you to copy multiple pieces of content in a document without having to always Ctrl-Tab back and forth between the original document and the target document. And the cool thing is that it even supports images!

Windows Clipboard history with two items of text and one imageDeleting a line with clipboard supportSo why am I bringing this up? Well another thing that we do quite often in code is deleting lines. There’s even a joke that the best developers are not the one writing a lot of lines of code, but those who delete a lot of lines of code

In order to delete a whole line, most people would follow these steps:

  • Place the cursor on a line of code.
  • Move the cursor to the top of the line with the Home key.
  • If the line was indented, press Home once again to ensure that the cursor is really on column 0.
  • Press the Shift key.
  • With the Shift key pressed, move the cursor at the end of the line with the End key.
  • With the whole line selected, press the Delete button.
  • Probably you will also have to press Delete once more to delete then empty line.

This is a lot of steps for a simple operation that we do a LOT in a developer’s day. Thankfully you can simplify it.

  • Place the cursor on a line of code.
  • Press Ctrl-L.

That’s it. The line is deleted and there is no empty line remaining where it was. but the best part is, this line was saved in the Clipboard! To test this, simply press Win-V and you should see the line you just deleted on top of the history. Of course this also works for multiple lines.

Deleting a line without clipboard supportNow, sometimes you don’t want the deleted line(s) to be saved to the Clipboard history. In this case, follow these steps:

  • Place the cursor on a line of code.
  • Press Ctrl-Shift-L.

This way you can keep your Clipboard history tidy.

More tips about Visual StudioHopefully these tips help you to be more productive! And if you want to learn more about key shortcuts in Visual Studio, you should watch Gwyn’s 5:30 minutes video on the Visual Studio YouTube channel.

The post Visual Studio tip: Using Ctrl-L to delete a line with and without Clipboard backup appeared first on Visual Studio Blog.

View Details

A Visual Studio Subscription, whether Professional or Enterprise, delivers far more than just software usage rights; it’s a comprehensive toolkit designed to significantly boost your development capabilities and career growth. These subscriptions can save you thousands each year, offering everything from monthly Azure credits for cloud experimentation to complimentary access to premium training platforms like Pluralsight and LinkedIn Learning. You will also benefit from discounted rates on Azure Dev/Test pricing and significant savings at professional events like Visual Studio LIVE!

Before we explore the details of our three new exciting benefits, ensure you’re fully leveraging your Visual Studio Subscription. If it’s been a while, log in at my.visualstudio.com to review and activate your benefits, equipping you with all necessary tools and training to excel in the fast-paced tech environment.

Exclusive New Learning Paths for Visual Studio SubscribersUncover special opportunities designed specifically for paid Visual Studio subscribers to keep you at the forefront of the rapidly evolving software development landscape. With the rapid emergence of AI tools like copilots, staying well-skilled is not just an option—it’s imperative.

These three new exclusive benefits are crafted to enhance your skills and ensure you’re well-equipped to leverage the latest advancements in Visual Studio, .NET, and Azure, helping your business maintain a competitive edge. Utilize these exclusive benefits to achieve annual savings exceeding $1,500, supporting your desire to stay informed of the latest advancements in technology and development practices. Here’s what’s new for you:

Dometrain Pro: Full Access to Premium Courses Overview: Boost your technical expertise with Dometrain Pro. Gain unlimited access to over 380 hours of HD content covering everything from foundational programming to advanced development techniques, all curated to help you keep pace with industry changes. * Key Benefit:* Enjoy a 50% discount on your subscription to Dometrain Pro for Visual Studio, granting you access to more than 36 comprehensive courses for a full year. This is an excellent resource for staying current and deepening your knowledge base.

Training by Tim Corey via DevPass Business Edition Overview: Designed for developers at all career stages, DevPass Business Edition provides targeted, real-world training. This program, featuring renowned educator Tim Corey, includes courses that are directly applicable to daily development work and upcoming challenges in modern software practices. * Key Benefit:* Take advantage of a 50% discount on DevPass Business and unlock all 28 courses and over 320 hours of HD training for a full year, ensuring your skills remain sharp and relevant.

Visual Studio LIVE! Events: Exclusive Subscriber Discounts Overview: Engage with the latest in software development at Visual Studio LIVE! Events, available in-person and virtually. These professional development gatherings spotlight cutting-edge technologies and practical applications, with a particular emphasis on AI and cloud advancements. Gain insights that can transform how you and your business leverage new products and features to accelerate development and elevate your solutions in the market. * Key Benefit:* Secure exclusive discounts on registrations, allowing you to gain invaluable insights from industry experts at a fraction of the usual cost. This is your gateway to learning about new features, tools, and strategies that can help your business partners achieve more.

ACCESS YOUR BENEFITSUnlocking the full potential of your Visual Studio Subscription is straightforward and can significantly enhance your development experience. Here’s how you can start utilizing these opportunities today:

Access the Visual Studio Subscription Portal

  • Step 1: Navigate to my.visualstudio.com. This portal is your gateway to all the benefits available through your subscription.
  • Step 2: Log in using your Visual Studio credentials. If you’re uncertain about your account details, consult your subscription administrator at your company.

Understanding Your Subscription Level

  • Community: Ideal for individual developers, the Community edition provides access to essential tools and services to kickstart your development projects. Note, however, that access to premium benefits are not included.
  • Professional: Designed for professional developers, this subscription tier includes a more comprehensive array of tools and services. As a Professional subscriber, you’ll discover numerous benefits designed to enhance your productivity and broaden your skill set.
  • Enterprise: The most extensive subscription tier, tailored for teams and organizations aiming to leverage the full power of Visual Studio. Enterprise subscribers enjoy access to exclusive benefits, including advanced tools, services, and training opportunities that can make a significant impact on your business outcomes.

Some benefits are reserved for paid subscription levels, which includes: Visual Studio Enterprise (Standard), Visual Studio Enterprise subscription with GitHub Enterprise, Visual Studio Enterprise (Annual cloud), Visual Studio Professional (Standard), Visual Studio Professional subscription with GitHub Enterprise, and Visual Studio Professional (Annual cloud).

Explore Your Benefits

  • Each subscription tier offers unique benefits, varying significantly in terms of access and scope. Once logged in, dedicate time to explore the specific benefits associated with your subscription level. From software licenses and Azure credits to training modules and partner offers, each benefit is crafted to support different facets of your development work.

Take Action Today

  • We encourage all our subscribers to log in and explore their benefits today, while you’re thinking about it. By fully understanding and utilizing your benefits, you ensure that you are not only keeping pace with the latest technological developments but also securing a competitive edge in your projects and career.

Check out your full list of benefits, based on your subscription type by visiting my.visualstudio.com

MY.VISUALSTUDIO.COMThe post Three New Premium Visual Studio Subscriber Benefits Announced appeared first on Visual Studio Blog.

View Details

Any web, desktop, or mobile developer works with images often. You reference them from C#, HTML, XAML, CSS, C++, VB, TypeScript, and even in code comments. Some images are local, and some exist online or on network shares, while others only exist as base64 encoded strings. We refer to them in numerous ways in code, but always as string values that don’t show us what the image looks like. Until now.

The feature request An option to preview images when they are hovered has gotten a lot of attention lately, so we decided to look into it. Various image previewers exist for different editors already, but they all do things a little differently. If we were to build this, we must do it in a way that feels native and natural to Visual Studio. We therefore launched a community experiment to figure it out.

The result is an editor tooltip that in the code editor. The tooltip shows the image in its original size but capped at maximum of 500 pixels wide and high. Below the preview image you’ll see the size in pixels and the file size in bytes.

The participants of the experiment were very excited about the feature. Here’s what some of them said:

We identified some important questions in need of an answer:

  1. What are the must-have image file types to support?
  2. Which image reference syntaxes and formats are most used?
  3. Which additional features could be important?

The experiment helped us answer these questions. Let’s go over them.

Supported file typesThe most common image files used by participants of the experiment are (in order):

  • PNG – 53%
  • JPG – 21%
  • SVG – 15%
  • ICO – 4%
  • WebP – 4%
  • GIF – 2%
  • Other file types like BMP, TIFF, DDS

The only format not directly supported by WPF is SVG, so we must convert those to a bitmap format WPF can render. That’s why SVG support didn’t make it into the first version, but we hope to have it ready soon.

Reference syntaxesThere are various ways to reference an image and depend largely on the language and app model. The most common ones we saw from the experiment were:

  • Relative URL (./, ../, and /)
  • File path (c:\, c:/, \, and /)
  • Data URI (data:image/png;base64,…)
  • Pack URI (pack://application:,,,/Images/MyImage.png)
  • Image monikers (KnownMonikers.StatusWarning)

Additional featuresThe community suggested two features beyond simply showing the image preview.

  1. Zoom in on the previewThis is a cool feature and one that would be great to investigate further for a future update. However, it is out of scope for now.
  2. Click preview image to openThe idea is that users should be able to click the preview image to have it open in their default image viewer application. It was simple to add, so we did.

That was the story of how the image hover preview feature made it to Visual Studio. To try it yourself, install the latest version of Visual Studio 2022 (v17.10 or newer) and give it a go.

The post Making Visual Studio a bit more visual appeared first on Visual Studio Blog.

View Details

Visual Studio LIVE! Microsoft HQ 2024August 5-9 | Microsoft Conference Center, Redmond, WAThere’s still time to register, join us, get your questions answered, and bring back a wealth of knowledge and excitement to your teams! We’re close to selling out for next month’s conference, which will be packed with valuable sessions and activities, hosted on campus at the Microsoft Conference Center in Redmond, WA.

Visual Studio LIVE! 2024 is not just another conference; it’s a celebration of innovation, learning, and community. Here are some key highlights and reasons why you should attend:

Discover the Latest Innovations in Visual Studio, .NET, Azure, and GitHubJoin us to dive deep into the latest capabilities across Visual Studio, Azure, GitHub, and the marvels of GitHub Copilot. This event offers an immersive experience with 35 speakers, including 20 from Microsoft, and 71 sessions spread over 13 tracks. Whether you’re a seasoned developer or just starting, there’s something for everyone.

Keynote Sessions at Visual Studio LIVE! 2024Keynote by Scott Hunter: Introducing .NET Aspire – Cloud Native Development for .NET

One of the most anticipated sessions is Scott Hunter’s keynote on “Introducing .NET Aspire – Cloud Native Development for .NET.” .NET Aspire, which shipped during the Microsoft Build conference, transforms .NET into a modern cloud-native framework with support for Observability, Resiliency, Scalability, and Manageability. This keynote will show how to transform an existing application, demonstrate the new telemetry dashboard, create local resources and resources in the cloud, and run and deploy multi-part apps from the command line, VS Code, and Visual Studio. Don’t miss this opportunity to learn about our most exciting release in years!

Keynote by Asad Khan and Bob Ward: Building Applications with the Modern SQL Using AI and Microsoft Fabric

Another must-see session is the keynote by Asad Khan and Bob Ward on “Building Applications with the Modern SQL Using AI and Microsoft Fabric.” This session will cover the latest advancements in SQL products and services, showcasing how AI and Microsoft Fabric can enhance your applications and improve efficiency. Gain valuable insights from industry leaders on how to leverage these cutting-edge technologies to build powerful, modern applications.

Unique Networking OpportunitiesVisual Studio LIVE! 2024 is designed to be intimate, with attendance capped at just 500. This setup provides you with unparalleled access to mingle directly with our speakers and product managers from Visual Studio, Azure, and GitHub. Engage in meaningful interactions and gain insights directly from the experts.

  • Meet The Experts Welcome Reception: On Tuesday (8/6) from 4:15 pm to 5:45 pm, join us for a casual expo-style event with food, beverages, and raffles. Meet Product Managers from Visual Studio, .NET, Azure, GitHub, and GitHub Copilot.
  • Meet The Visual Studio & .NET Team Reception: On Thursday (8/8) from 4:15 to 5:45 pm, connect with the actual tool makers of .NET Aspire & Blazor, GitHub Copilot Integration in Visual Studio, VS Extensibility, C# Dev Kit for VS Code, and more. Discuss specific features and get direct feedback from the developers who build these tools.

Exclusive Access and BenefitsAttendees will enjoy VIP access to the Microsoft Commons—a bustling hub of retail, dining, and entertainment exclusive to Microsoft employees. Additionally, you’ll receive passes to the Microsoft Employee Store, where you can score exclusive deals on the latest Microsoft products.

Two Full Days of Hands-On LabsGo deeper into development topics with these excellent hands-on labs:

  • Application Building with .NET Aspire & ASP.NET Core 8 by Damian Edwards and David Fowler. Build distributed applications using the .NET Aspire stack and ASP.NET Core 8, covering new features in .NET 8 & C# 12.
  • Asynchronous and Parallel Programming in C# by Jeremy Clark. Master asynchronous programming in C# using the .NET Task Parallel Library (TPL) and learn techniques for running code in parallel.
  • Elevate Your Career with Python and AI by Eric D. Boyd. A two-day workshop starting with Python basics and advancing to AI and machine learning applications.
  • Build Modern Applications with Azure SQL Database and SQL Server by Jerry Nixon and Brian Spendolini. Deep dive into new features of Azure SQL and SQL Server, including JSON, Data API builder, REST endpoints, and ChatGPT/OpenAI.
  • Microsoft Blazor Top to Bottom by Jason Bock, Allen Conway, and Rockford Lhotka. Learn to build Blazor apps, use the Razor component model, data and event binding, and explore Blazor server, WebAssembly, and MAUI hybrid apps.

For the full list of hands-on labs, visit Visual Studio LIVE! 2024 Hands-On Labs.

Some of your favorite speakers from Visual Studio & .NET Mads Kristensen: Visual Studio Tips & Tricks and Your Future is Bright with Visual Studio and AI * James Montemagno: What’s New & Next for .NET MAUI * Daniel Roth: What’s Next for ASP.NET Core & Blazor * Harshada Hole: Fast Focus: Visual Studio Debugging & Diagnostics: Tips & Tricks * Jessie Houghton: Fast Focus: Upgrade Your Git Game in Visual Studio 2022 * Dalia Abo Sheasha: Lessons Learned Building AI-powered Features in Visual Studio * Rachel Kang:* What’s New & Next for .NET MAUI

Click here for our complete list of amazing speakers, 31 in all!

Learn from the BestThe event will feature over 70 sessions, including hands-on labs and workshops, covering both introductory and advanced topics. This is your chance to accelerate your understanding of the latest technologies and bring back valuable knowledge to your team.

Hear from Past AttendeesDon’t just take our word for it. Here’s what past attendees have to say about Visual Studio LIVE!:

  • “The best thing about VS Live! was meeting Microsoft people.”
  • “The conference events and the reception sponsored by Microsoft were outstanding!”
  • “Learning about the direction of technology and Microsoft, and what others in the industry are doing, was invaluable.”
  • “Access to Microsoft staff and demonstrations of AI techniques by Microsoft presenters was a major highlight.”
  • “I appreciated the variety of courses and the expertise of the speakers and Microsoft reps.”

Register Now and SaveVisual Studio Professional & Enterprise Subscribers can unlock exclusive discounts by exploring your discount benefit on My.VisualStudio.com. Not a subscriber? No problem—grab the EARLY BIRD Discount on the Visual Studio Live! Event Page. Only 500 spots are available for this exclusive event, and we expect it to sell out, so don’t delay!

We look forward to seeing you at Visual Studio LIVE! 2024. Secure your spot now for an unforgettable week of learning, networking, and technological innovation.

LEARN MOREThe post Get Hands-On with Visual Studio and Azure: Live at Microsoft HQ this August! appeared first on Visual Studio Blog.

View Details

Have you ever struggled to understand what a commit was doing or why it was made? Do you wish you had more clarity and context when reviewing or collaborating on code changes? If you answered yes, then you’ll love what GitHub Copilot can do for you: generate commit explanations. GitHub Copilot can analyze your code differences and produce concise summaries that highlight the key points. No more guessing or wasting time on deciphering your Git history. You can focus on coding and collaborating with ease. And the best part is, you can also improve your communication and teamwork by having better documentation and transparency of your code changes.

Download Visual StudioUnravel your commit history with GitHub CopilotGit history can be daunting to shuffle through, but it’s often the best way to learn about a code base or help identify the origin of a bug. We’ve added a GitHub Copilot powered explain feature to the Commit Details window to make it easier to understand the contents of each commit. You’ll get a summary of the changes side by side with the code, highlighting the key differences and the rationale behind them. Since GitHub Copilot needs to look at all the changes, this may take some time for large changesets or pull requests.

Double click on any commit to open the Commit Details pane in the Git Repository window. Then, select Explain button above the commit message to get a summary of the changes. Pro tip: use the expand option and the summary view to get a better view of the code changes with the description.

Please share your thoughts!More folks are finding this option useful, so we wanted to highlight it here and share it broadly. We’d love to hear your thoughts for how to make commit explanations better and any other ideas to superpower Version Control with GitHub Copilot, especially with Git history.

Take the SurveyWe appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Demystify history with GitHub Copilot commit explanations appeared first on Visual Studio Blog.

View Details

At //Build 2024, the WinUI team announced a renewed focus on WinUI as one of the premier app development frameworks we recommend for native Windows app development. To make it as seamless and easy as possible to get into coding, we created a new Windows Dev Center page, streamlined our Getting Started with WinUI documentation, and partnered with Visual Studio to improve the developer experience with workloads and templates. Today, we’ll focus on showing you the great new changes in Visual Studio along with a little bit of our thought process behind them and links to learn more!

Getting started with the new workloadIn Visual Studio 17.10, the new “Windows application development” workload is now available for developers to jump right in and get started with writing stylish, modern, and fast WinUI apps using .NET or C++ with only one click. This workload replaces the older “Universal Windows Platform development” workload with tools aimed at the latest generation of WinUI + the Windows App SDK. WinUI templates have also been given a fresh new icon and priority boost in the New Project template list, and they now include a new community-requested Unit Test template to help test WinUI apps more easily!

To get started with the new workload, follow these easy steps:

  1. Open the Visual Studio Installer.
  2. Under Workloads > Desktop & Mobile, select the “Windows application development” workload.
    • If you’re developing in C#, congrats, you’re finished! The workload includes .NET WinUI app development tools by default.
  3. If you’d like to develop in C++ or if you need the tools for Universal Windows Development, select the optional “C++ WinUI app development tools” component. This will automatically select the Universal Windows Platform tools and C++ Universal Windows Platform tools components.

That’s it! In previous versions of Visual Studio, to develop with WinUI + the Windows App SDK you had to manually search for each required component in the list of optional components – and this was after reading the docs to find out what you needed! We also heard feedback that WinUI in the Windows App SDK, which represents the latest generation of WinUI that succeeds the Universal Windows Platform (UWP), was less prominent than its predecessor. With the new workload and components, we’ve addressed this feedback to make the newest tools and APIs clear, front-and-center, and available with one click!

Take advantage of WinUI template improvementsOnce you have the “Windows application development” workload installed, now it’s time to start creating projects. We got some great feedback here on the New Project screen as well – the WinUI templates were far down the list, which made them seem less important than other templates, and they needed a fresh coat of paint. We heard you, so we bumped the most-used WinUI templates closer to the top and added a sparkly new icon!

Go to File > New Project to see these updates in action!

The rest of the templates aren’t much farther down, either; on most monitors, you probably won’t need to scroll to see them. In that list is one more addition we’d love to highlight – the new Unit Test template for WinUI! This was directly requested by you, the WinUI developer community, and we’re thrilled to introduce it alongside our other improvements to the WinUI workload and template experience.

ConclusionWe wanted to thank you again for all your for you. You’re helping to make it easier for new WinUI developers to embrace native app development on Windows and helping us produce the best native app development experience on Windows that we can.

To give us feedback on the platform directly, visit us on GitHub, or follow us on Twitter to stay up to date on releases and news.

To learn more about WinUI and for more info on getting started, check out our new Windows Dev Center page at https://aka.ms/windev.

If you’re interested in the full picture of what we talked about at //Build 2024 beyond our Visual Studio updates, check out these two sessions:

  • Navigating Win32 App Development with WinUI and WPF | BRK241 (youtube.com)
  • How to create superior experiences with WinUI and WPF | BRK244 (youtube.com)

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Dive into native Windows development with new WinUI workload and template improvements appeared first on Visual Studio Blog.

View Details

Writing good pull request descriptions is essential for effective code reviews and collaboration. But it’s time-consuming and tedious, especially when you have multiple commits or complex changes. That’s why we’re highlighting a feature that will make your life better with the help of GitHub Copilot: generated pull request descriptions. GitHub Copilot examines your code changes and generates helpful summaries that you can edit and customize. Save your energy for your coding tasks and let GitHub Copilot provide extra context for your reviewers.

Download Visual StudioStarting with Visual Studio version 17.10 GA, to try these out, you’ll need to have an active GitHub Copilot subscription and the GitHub Copilot component installed and the Git Preview Features enabled in the GitHub Copilot Menu.

Get going faster with generated pull request descriptionsOne of the most popular features of GitHub Copilot is the ability to generate Git commit messages based on your code changes. We’ve heard awesome feedback on this feature, so we wanted to continue saving you time and improve your collaborations by enabling GitHub Copilot-powered pull request descriptions. You can now generate a first draft for your pull request and preview the markdown output. You’ll get assistance in providing important context to your colleagues for their reviews and get the added benefit of ensuring you include the right changes in your pull request.

Select “Add AI Generated Pull Request Description” sparkle pen icon within the Create a Pull Request window to see your description.

Help us go furtherSo far, we’ve heard customers are satisfied with their generated results, sharing that responses are accurate and useful, and inserting suggestions at a rate of 80%! Please share your ideas to improve this future and further power up Version Control with GitHub Copilot.

Take the SurveyWe appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Let GitHub Copilot draft of your pull request description appeared first on Visual Studio Blog.

View Details

We are thrilled to announce the latest enhancements to the .NET Upgrade Assistant. .NET Upgrade Assistant helps upgrade solutions to newer versions of .NET. Whether you’re upgrading from .NET Framework to .NET 8 or just between .NET Core versions (from .NET 6 or 7 to .NET 8 or 9), .NET Upgrade Assistant can help you understand what changes will be needed. .NET Upgrade Assistant is available as a Visual Studio extension or as a command-line tool. Now as part of your upgrades to modern .NET, you’ll have access to powerful code assessment features.

Here’s what’s new:Our code assessment tool scans your solution at the source code level and identifies potential issues and dependencies that could pose challenges during the upgrade process. You will be provided with a comprehensive dashboard that provides an overview of issues across your entire solution and estimates of how much effort will be required for each issue to be remediated.

Each issue in the report is categorized by severity, allowing you to prioritize your efforts. Whether it’s a mandatory issue blocking upgrade or an optional issue identifying opportunities to take advantage of features available in the latest .NET framework, you’ll know exactly where you need to focus your attention.

Issues can provide exact locations within your source code where issues were detected, making troubleshooting and fixing dependencies a breeze. Easily navigate through projects and pinpoint areas that need attention. You can jump to a line that requires your attention, address issues and mark them as fixed, and save the current state of the issues and report so you or your coworkers can pick up exactly where you left off, making collaboration easier than ever. We also include relevant links to documentation, best practices, and community discussions to give you the guidance you need to tackle each challenge.

Install the Visual Studio ExtensionPre-requisites:* Windows operating system * Visual Studio 2022 version 17.1 or later

Installation:If you don’t already have the .NET Upgrade Assistant installed, you can download and install the extension from the Visual Studio Marketplace or install it from inside Visual Studio.

Note: The .NET Upgrade Assistant extension now installs on a per-user basis so there’s no requirement for elevated admin permissions to install. This addresses a need voiced by some users who don’t have admin permissions on their dev machines. More information and troubleshooting suggestions may be found in this blog post.

Install the CLI toolPrerequisites:* .NET SDK

The .NET Upgrade Assistant is also available as a .NET global tool. You can install the tool with the following command:

dotnet tool install -g upgrade-assistant Similarly, because the .NET Upgrade Assistant is installed as a .NET tool, it can be easily updated by running:

dotnet tool update -g upgrade-assistant Analyze applications with Visual StudioOnce you have installed the Visual Studio extension, you are all set to analyze your application in Visual Studio. You can do so by right clicking on your solution in the Solution Explorer and selecting Upgrade.

The tool will open a window offering you to either create a new report or open an existing one.

To start a new report, select the projects you want to analyze on the next screen. Web projects are already checked for you, but you may change the selection by checking or unchecking the boxes next to the projects. When the tool runs its assessment, it also analyzes the dependencies for your selected projects.

On the next screen you can select your preferred target framework for the upgrade. If you need help deciding which target framework is right for you, please check out this blog post.

Next you will choose the components from the previously selected projects that you want to analyze. You can select just your source code and settings, or also include all your code’s binary dependencies for analysis. A custom config file may also be included to change the way that the rules for analysis work. After this selection, hit Analyze to begin the assessment of your application and receive your report

Analyze applications with the CLIAfter you’ve installed the .NET Upgrade Assistant CLI tool, open a terminal window and navigate to the directory that contains the project you want to analyze. You can use the following command to see the available options the CLI provides:

upgrade-assistant --help Run analysis on your application with:

upgrade-assistant analyze The CLI tool provides an interactive way of choosing which project to analyze. Use the arrow keys to select an item, and press Enter to run the item. Select the project you want to analyze. Follow the prompts in the command terminal to make the same selections as outlined above in the Visual Studio extension. When the analysis is done, you will be provided with a report in the format you selected.

Interpret ResultsAfter analysis in Visual Studio, the tool will provide you with a dashboard summary and detailed report. The report will show you information about the number of projects analyzed, issues and incidents found, and an estimate of how much effort each issue, incident, and project will take to be fixed.

You can view aggregate issues for the whole solution or dig into project specific views. Here you can see detailed information on each incident, get help on how to fix them, jump to their location in code, and so on. You can view these issues by type of issue or by component so that you can understand where the bulk of the issues in the report originate from.

Share resultsBoth the CLI tool and Visual Studio allow you to save the results of the analysis in various formats so that you may share the report with others. In Visual Studio, just click the export icon in the top right corner of the tool window and select your desired export format.

In the CLI tool, the final selection before your report is generated will be to select your desired export format. Press Enter to select, then you will be prompted to enter a name for your report. The tool will then generate your report in the format you selected.

The tool can generate reports in HTML, CSV, and JSON formats. The HTML report looks very similar to the dashboard you’ll see in the Visual Studio after the analysis is completed.

You can export these reports with various privacy modes so that you can feel confident that those who receive the reports will have exactly the right amount of information required to understand what work needs to be done without risking exposing sensitive information.

Useful MaterialsFor supported languages, project types, and upgrade paths, please refer to our Microsoft Learn documentation for the .NET Upgrade Assistant.

Documentation: Overview of the .NET Upgrade Assistant – .NET Core | Microsoft Learn

Install: How to install the .NET Upgrade Assistant – .NET Core | Microsoft Learn

Getting started: .NET Upgrade Assistant | Get Started (microsoft.com)

FeedbackPlease give us your feedback or report any issues either by filing an issue directly in the .NET Upgrade Assistant repository, or via the Visual Studio feedback channel by choosing Help | Send Feedback in Visual Studio. Please mention “.NET Upgrade Assistant” in the title so it will get routed to our team quickly. We appreciate your input and want to build the best tools for you!

The post Code Assessment with .NET Upgrade Assistant appeared first on Visual Studio Blog.

View Details

Visual Studio is coming to Microsoft Update! We’re pleased to announce that starting in August 2024, developers who are not part of an organization managed by an IT administrator can choose to receive monthly Visual Studio security updates through the Microsoft Update (MU) system on “patch Tuesdays”. This new update option will be available for Visual Studio 2022, Visual Studio 2019, and Visual Studio 2017. It won’t be available for the Preview channel.

How to enable Visual Studio updates through MUOpen Windows Settings and go to Windows Update > Advanced Options. If you can toggle the option at the top “Receive updates for other Microsoft products”, then you control your machine’s update policies and can choose to receive updates for Visual Studio and other Microsoft products from MU. We encourage you to enroll in this capability, as it’s by far the easiest way to stay updated and secure on a monthly cadence. If this option is greyed out and you can’t toggle it, this new feature does not apply to your machine (even if it is turned on) because your administrator controls your update policies.

Figure 1 – Microsoft Update policy that is controlled by the userHow it worksAs with other Visual Studio update methods, Visual Studio must be closed to apply these updates. MU will never force-close Visual Studio to apply the update. Updates delivered through Microsoft Update typically happen during machine idle time at night. Once you have opted into receiving Visual Studio updates through MU, just remember to periodically save your work and close Visual Studio in the evening to make sure that the update isn’t blocked. The next morning, you can verify in the Windows Update history that the latest Visual Studio security update was successfully applied. You can also initiate the update manually on demand by closing Visual Studio and pressing the Windows Update “Check for updates” button.

Opting out of MU updates for Visual StudioIf you have chosen to receive updates for other Microsoft products, but you don’t want to receive Visual Studio updates from MU, you can set this registry key value to opt out:[HKLM\Software\Policies\Microsoft\VisualStudio\Setup]“VSthroughMUUpdatesOptOut”=dword:1

Preview the experience through July 2024You can try out this new experience through July 2024 in advance of it rolling out in August. To opt in to the preview, toggle “Receive updates for other Microsoft products” to On, and set this registry key value:[HKLM\Software\Policies\Microsoft\VisualStudio\Setup]“PreviewAutomaticUpdates”=dword:1

Starting in August 2024, this registry key won’t be necessary.

During June and July, the updates will have a “[Microsoft Update Preview]” prefix in the title. These updates are the same update as if you manually installed it from within the Visual Studio IDE.

Figure 2 – Visual Studio security updates delivered during the Preview timeframePlanned improvementsThere are a few improvements to this experience that we’re working on.

  • If you rollback an update, you can temporarily use the registry key to opt out of MU updates for Visual Studio to prevent the update from automatically being re-applied. We’re working on a reliable experience for this.
  • We’re working to improve the error messages in the Windows Update UI, such as for the condition that the update was cancelled because Visual Studio was open.
  • If you use the “Check for Updates” button in the Windows Update UI, the progress bar will appear to be stuck at 0% until the update finishes, at which point it will immediately go to 100%. Visual Studio updates can take a while, so we ask for your patience while we improve the progress bar.

What about IT Admin managed machines?We’ve delivered a rich set of managed update solutions via Visual Studio Administrator Updates, which allow IT administrators in organizations to deploy monthly Visual Studio security updates by using Windows Update for Business. Over 1500 organizations, including Microsoft, currently use this solution to automatically install Visual Studio security updates on hundreds of thousands of machines each month.

ConclusionIf you’re an individual user that controls your own machine’s update policies, we hope you enroll in this solution to automatically receive and install updates for Visual Studio along with other Microsoft products. We welcome your feedback on this Automatic Update experience.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Keep Visual Studio automatically updated and secure through Microsoft Update appeared first on Visual Studio Blog.

View Details

Delegates are everywhere in modern code; a delegate is a type that represents references to methods with a particular parameter list and return type. Developers use delegates to pass methods as arguments to other methods. One example you may be familiar with is with event handlers. Handlers are methods you can invoke through delegates. Delegates remind me of C++ function pointers, but of course delegates are fully object-oriented.

There are a few ways to represent delegates, there is, for example, Func delegate. This generic delegate represents a method that takes one or more parameters and returns a value of a specified type. Here is an example (with a lambda expression):

Func<int, int> Multiplier = n => n * 5; int val = Multiplier(5); Console.WriteLine(val); The most recent variation of this concept is Action, which provides a more convenient shorthand. When you use Action you do not have to explicitly define a delegate that encapsulates a method with a single parameter. Here is an example:

``` Action outputFunc = GetOutputRoutine();
outputFunc("Hello, World!");

static Action GetOutputRoutine()
{
return MyConsoleWriter;
}

static void MyConsoleWriter(string input)
{
Console.WriteLine("Console: {0}", input);
} ``` So, this is a nice lesson, but why am I mentioning all this? While I find passing methods around like parameters is convenient when writing code, I also wish it were easier to follow while debugging. You can of course easily step into these methods, but I often want to quickly navigate to the underlying code represented by the delegate before or after stepping, and with the latest updates to Visual Studio 17.10 it’s incredibly easy.

When you pause while debugging, you can hover over any delegate and get a convenient go to source link, here is an example with a Func delegate.

The Go to Source indicator makes it clear, in this example, that you will get redirected back to the lambda expression.

Please note this is not just for managed code situations, this also supports C++ function pointers and std::function.

We appreciate your feedback to help us improve Visual Studio and make it the best tool for you! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Please stay connected with the Visual Studio Debugger team on Twitter.

The post Easily navigate code delegates while debugging appeared first on Visual Studio Blog.

View Details

The Bosch security camera team was seeking a unified development setup for their team and recently re-evaluated Visual Studio as a solution for their C++ projects and remote Linux development needs. Their experience with Visual Studio 2022 featured notable improvements relevant to their workflows such as seamless GDB integration and CMake/WSL integrations.

Download Visual StudioThe Bosch team had adapted their project to maximize Visual Studio’s capabilities but had one last barrier before being able to widely adopt Visual Studio, which was a need for increased customizability of rsync settings.

Read more about the Microsoft C++ team’s experience with delivering this functionality to Bosch at the link below:

Bosch widely adopts Visual Studio 2022 after experiencing performance improvements for C++ Linux cross-compilation – C++ Team Blog (microsoft.com)

ConclusionWe appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.  

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn. 

The post Bosch widely adopts Visual Studio for their C++ remote Linux projects appeared first on Visual Studio Blog.

View Details

We believe that boosting the productivity of your development and team collaboration helps you produce better software solutions. That’s why the Visual Studio Version Control team has delivered new features, streamlining your inner loop and code review experiences. You’ll get AI support writing commit messages, pull request descriptions, commit explanations, and a better pull request creation experience. Download the latest Visual Studio release to try them out and let us know what you think!

Download Visual StudioWrite less, code more with GitHub Copilot Starting with Visual Studio version 17.10 GA, to try out generated pull request descriptions and commit explanations, you’ll need to have an active GitHub Copilot subscription and the GitHub Copilot component installed and the Git Preview Features enabled in the GitHub Copilot Menu.

Updates to generated Git commit messages We listened to your feedback and shortened the output of our generated Git Commit features. Share feedback on this change on the ticket in Developer Community.

Improve your code reviews with generated pull request descriptionsLeverage GitHub Copilot, you can now generate a first draft description for your pull request. You’ll get assistance in providing important context to your colleagues for their reviews and get the added benefit of ensuring you include all the pertinent changes in your pull request.

Select “Add AI Generated Description” sparkle pen icon within the Create a Pull Request window to see your description.

Unravel your commit historyWe’ve added a GitHub Copilot powered explain feature to the Commit Details window to make it easier to understand the contents of each commit. You’ll get a summary of the changes side by side with the code, highlighting the key differences and the rationale behind them.

Double click on any commit to open the Commit Details pane in the Git Repository window. Then, select “Explain” icon to get a summary of the changes.

Create a pull request in Visual Studio with work item linkingWe were so excited by the enthusiastic reception to the preview Create a Pull Request flow and the subsequent updates. This is now the default experience in Visual Studio and includes the number one request from Azure DevOps, linking work items to pull requests. Now, you can use the Related Work Item section to view any items you referenced in your description and link them to your pull request on Azure DevOps.

Help us make the Visual Studio Version Control tooling better AI support can make tedious version control documentation easier to tackle. Also, smoother pull request experience helps your collaborations thrive! Try out the latest features in Visual Studio 17.10 GA and share your feedback in the following surveys:

  • AI Commit Message
  • AI Pull Request Descriptions
  • AI Explain Commit
  • Create a Pull Request Improvements

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.  

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn. 

The post Catch up on the latest Git tooling features in 17.10 GA appeared first on Visual Studio Blog.

View Details

We are excited to announce the latest update of Visual Studio 2022, which brings you a range of performance enhancements across various areas of the IDE. In this blog post, we will highlight some of the most notable improvements that you can experience in version 17.10, such as faster Windows Forms designer loading, faster Razor colorization, quicker solution loading, and reduced DLL overhead.

Download Visual Studio 17.10Windows Forms designer loading speedWe heard from developers and partners that Windows Forms designer in projects targeting .NET Core 3.1 and up can be slow in loading up. In those scenarios the designer is loaded inside a separate process that runs alongside Visual Studio. The time to load this process can be long depending on the project’s dependencies. The impact is exacerbated when this designer process needs to be restarted under some conditions, such as when project references change. To improve the designer restart time, we have optimized how we prioritize and load assemblies into the designer process.

We are thrilled to announce that these enhancements have yielded remarkable design time performance improvements, ranging from 30% to an impressive 50% in a typical line of business application. We encourage you to explore the updated designer and share your invaluable feedback through the VS feedback channel so that we can continue improving Windows Forms designer performance.

Razor / C# colorization speedColorizing C# code is a complex operation. When there is C# code inside Razor pages, Razor delegates the task of colorization of such code to the C# language service (Roslyn). Our data shows that in most cases this colorization is very fast, but about 10% of cases can run into hundreds of milliseconds.

Performance improvement of Razor editing experience is a consistent focus of our engineers; in 17.10 they focused on the slow colorization. In their analysis, they found that Roslyn performs a significant amount of work which is not really needed in the specific context of colorization of the code (e.g. determining which variables are potentially null).

Optimizations have been put in such that Roslyn does just the work that is needed in the colorization context. Based on data from 17.10 Preview builds, we have noticed about 25% reduction in colorization time in the slowest cases. If you have noticed a lag before colorization within Razor, we hope you will notice the improvement in 17.10.

Faster .NET solution loadThe speed of opening a solution is something that we improve with every update of Visual Studio and 17.10 is no different. Visual Studio uses something called an evaluation cache such that on every opening of a solution, MSBuild does not have to reevaluate all the dependencies.

In 17.10, the contents of this cache were heavily tuned such that loading it is more efficient. Our measurements with OrchardCore solution showed that the cache size dropped by nearly 50%. More importantly for our users, this resulted in a 10% reduction in the time to open that solution.

Improving the fundamentalsIn 17.10, in addition to improving fundamentals such as CPU and memory usage, we also reduced the number of DLLs loaded in specific scenarios. With careful refactoring and tuning of code involved in loading .NET projects, we cut down the number of DLLs loaded by 10%! Loading DLLs can be slow on lower end machines with spinning disk hard drives. Moreover, DLL loads invite overhead from anti-virus software inspecting the DLLs, so we hope these improvements will help on slower machines.

Share your feedback and stay connected with Visual Studio!We appreciate the time you’ve spent reporting issues and submitting suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the entire Visual Studio team, thanks for reading and Happy Coding!

The post Visual Studio 2022 – 17.10 Performance Enhancements appeared first on Visual Studio Blog.

View Details

We previously announced the addition of new, optimized Azure VM image offers to help you create and test your applications faster and more easily on Azure VMs and the Microsoft Dev Box service. As we continue to evolve and optimize our offers, we’re introducing more developer-optimized VM images and deprecating our older non-optimized offers. In this blog post, we’ll provide details and timelines for the additions and depreciations that will take place over the next couple of months.

Boost your productivity with new Azure marketplace imagesWe’re committed to giving you the best, most productive starting point for your Azure VMs and Dev Box definitions. That’s why our developer optimized images are tailored to meet your development needs and include the latest OS’s, tools, and developer settings. They also provide a consistent and reliable development environment that can be easily replicated and shared across teams and projects.

Today we are happy to announce two new additions to our Azure marketplace presence. First, we just added a VS 2022 Community image to the existing Visual Studio 2022 (Microsoft Dev Box compatible) VM offer.

For the second addition, which will happen later this year, we’ll create a new Azure VM offer that focuses on the latest Windows Server release.

This new offer will include images of the following Visual Studio releases:

  • VS 2019 Professional
  • VS 2019 Enterprise
  • VS 2022 Community
  • VS 2022 Professional
  • VS 2022 Enterprise

What are we deprecating?Over the years we have published several VM images in the Azure marketplace. Although we believe this has made it easier for you to develop on your Azure VMs, many of our older VM images have either reached their end-of-life, contain unsupported components, duplicate more recent marketplace releases, or don’t offer developer optimizations.

Today we are announcing our plan to deprecate the following offers:

| Offer to be deprecated | Replaced by offer | | Windows Client | * Windows 11 * Windows 10 | | Visual Studio 2019 | * Visual Studio 2019 (Microsoft Dev Box compatible) * new Windows Server offer | | Visual Studio 2022 | * Visual Studio 2022 (Microsoft Dev Box compatible) * new Windows Server offer |

We also plan to deprecate the VS 2015 images from the Visual Studio 2015 & 2017 offer. There will be no changes to the VS 2017 images at this point, and the offer will be renamed to “Visual Studio 2017” to reflect these changes.

What’s the timeline for these changes?We know some of you may rely on the images that we are planning to deprecate. Because we want to make the right choices and provide you with ample time to make changes and provide feedback, we’ll make these changes gradually. We hope to gather and address your feedback along the way.

| Phase | Date | Description | | 1 | Starts: June 28, 2024Completes: ~90 days after (Sept 26, 2024) | * Deprecation of VS 2015 images in offer Visual Studio 2015 & 2017 * Deprecation of offer Windows Client | | 2 | Starts: November 8, 2024Completes: ~90 days after (Feb 6, 2025). | * Deprecation of offers: VS 2022 & VS 2019 | | 3 | ~December, 2024 | * New Windows Server offer is published. |

At the start date for each deprecation phase, impacted offers (Dev Box compatible plans are not impacted) will:

  • No longer be searchable in the marketplace.
  • Remain available for deployment to new VMs or scale set instances up until the deprecation date.

Here’s what will happen after the deprecation completes:

  • You won’t be able to deploy any additional virtual machine (VM) using any images within these respective offers.
  • Active VM instances won’t be affected following the deprecation date.

See the full Deprecated images FAQ to learn more.

Finally, don’t forget that you can make your own custom images using our older downloads page.

Let us know what you think!We know that these kinds of changes might impact some in a way that we’ve not accounted for, or that the process may be too arduous to react to. Therefore, we ask you to please share your thoughts about the deprecation plan via this Developer Community ticket.

If you have feedback about the new additions, requests or suggestions to improve our Azure VM offerings, please share it via this Developer Community ticket.

The post Giving our Azure marketplace images a makeover appeared first on Visual Studio Blog.

View Details

Visual Studio LIVE! Microsoft HQ 2024August 5-9 | Microsoft Conference Center, Redmond, WAJoin the Ultimate Developer Celebration!Who’s ready to connect with fellow developers and Visual Studio Product Managers this August at the Microsoft Campus in Redmond? Visual Studio Live! @ Microsoft HQ celebrates the bright days of the Pacific Northwest—offering the perfect opportunity to immerse yourself in everything Visual Studio, Azure, GitHub, and the marvels of GitHub Copilot. This isn’t just a conference; it’s a celebration of innovation, learning, and community! With 35 speakers, including 20 from Microsoft, and 71 sessions spread over 13 tracks, there’s something for every developer. Dive deep into new capabilities across Visual Studio, Azure, and GitHub, and bring back cutting-edge knowledge to give your business a competitive edge.

Why August is the Perfect Time to Visit Us:Not only will you have access to our dynamic lineup of sessions, but you can also enjoy VIP access to the Microsoft Commons—a bustling hub of retail, dining, and entertainment exclusive to Microsoft employees. Sample a variety of cuisines, shop for the latest gadgets and souvenirs, or unwind in the outdoor plaza with live music and games. As a special bonus, we’ll provide passes to the Microsoft Employee Store where you can score exclusive deals on the latest Microsoft products.

Exclusive Networking Opportunity:Unlike larger conferences, Visual Studio Live! 2024 at Microsoft HQ is intentionally designed to be more intimate, with attendance capped at just 500. This unique setup provides you with unparalleled access to mingle directly with our speakers and product managers from Visual Studio, Azure, and GitHub. It’s a rare opportunity to connect personally with industry leaders, gaining insights and sharing your feedback on the tools you use every day. When we say you’ll “meet the Tool Makers,” we truly mean it—this is your chance to interact, learn from, and influence the experts behind the technologies driving today’s innovations!

Why Attend Visual Studio LIVE!Take a break from your coding routine and join us at Visual Studio Live! 2024, where you can rapidly accelerate your understanding of the latest in Visual Studio, Azure, and GitHub amidst the camaraderie of fellow developers. It’s the perfect opportunity to catch up on Microsoft’s innovations in a collaborative setting, ensuring you stay ahead of the curve without falling behind on your projects. Plus, check out these other reasons to sign-up before it is sold out:

  • Inspirational Keynotes: Don’t miss keynotes from Microsoft leaders like Scott Hunter on building cloud-native applications on Azure (08/06), and Asad Khan with Bob Ward on leveraging AI and Microsoft Fabric for modern SQL applications (08/07).
  • Comprehensive Learning: Tailored for developers, architects, and technical managers, this event offers both introductory and advanced topics to deepen your expertise.
  • Interactive Experience: Engage directly with Microsoft product leaders and industry experts through several planned networking events.
  • Networking Opportunities: Connect with Microsoft Speakers, MVPs, and Product Managers across the Visual Studio IDE and Azure services.
  • Spotlight on AI: Discover the latest in AI technology with GitHub Copilot integrated with Visual Studio and more.

Exclusive DiscountsVisual Studio Professional & Enterprise Subscribers can unlock exclusive discounts for the event by exploring your discount benefit on My.VisualStudio.com. Not a subscriber? No problem—grab the EARLY BIRD Discount on the Visual Studio Live! Event Pagehttps://na.eventscloud.com/ereg/index.php?eventid=770846 before it’s gone! Only 500 spots are available to this exclusive event, we expect it to sell out, don’t delay.

Don’t Miss Out!This event is expected to sell out—secure your spot now for an unforgettable week of learning, networking, and technological innovation.

We’re excited to collaborate with Visual Studio LIVE! to bring you this comprehensive event, designed to empower the developer community’s growth and success. Join us in Redmond this August for a memorable week of learning, networking, and tech innovation.

LEARN MOREThe post Get Hands-On with Visual Studio and Azure: Live at Microsoft HQ this August! appeared first on Visual Studio Blog.

View Details

With the recent revamp of Visual Studio’s Resource Explorer, developers are in for a treat! We’re thrilled to unveil the reimagined Visual Studio Resource Explorer, and trust us, it’s a game-changer.

Developers who manage resources in Visual Studio will be delighted to learn that we have finally updated our out-of-the-box resource management experience to better accommodate the needs of the modern .NET developer. This update will make it easier and faster for developers to manage resources in their .NET applications. Here’s the lowdown:

The Pain Points We Crushed:Let’s rewind. The old Resource Editor had its quirks – no search, no filters, and a data grid that felt like a maze. If you manage sprawling solutions with gazillions of resources, you know the struggle. And don’t get us started on the one-file-at-a-time limitation – a real buzzkill for multilingual apps. Plus, that window? Not zoom-able. Not theme-friendly. Not cool.

In the new Resource Explorer design, we have tackled these common issues and introduced several new features that will make your resource management workflows in Visual Studio much more productive. As you can see when we compare the two experiences, we’ve bridged the gaps in the old experience and sprinkled in delightful new features to boost your productivity. Get ready for a more modern and convenient resource management journey.

Feature Comparison:

| Feature | NEW Resource Explorer | LEGACY Resource Editor | | Grid View of Resources | | | | Add/edit/delete resources | | | | Search | | | | Single view for resources across solution | | | | Edit multiple resource files at once | | | | Edit multiple locales at once | | | | Dark mode and VS theme support | | | | string.Format pattern validation | | | | Warnings and validation of resource data | | | | Combined view for string and media resources | | | | Datagrid zoom-ability | | |

What’s new in the update?Loading multiple files:The cornerstone of this update is the ability to load multiple files and view all localizations at once within the same view. When you open the new Resource Explorer, you’ll find a comprehensive overview of all the resources you’ve stored alongside the locales for each file. You can even configure which locales are visible in the datagrid. This streamlined interface allows you to compare translations side by side and even edit them in place. No more toggling between different screens or hunting for specific files—the new design brings everything together, making localization management a breeze.

Search and Filter:One of the most highly requested features we are delighted to deliver on is search. Our search isn’t confined to a single file, either. It dances across different .resx files, highlighting every occurrence of your search term. Need that elusive translation string? Found! Want to track down a specific locale? Done! It’s like having a resource detective at your service.

You also have the option of selecting a subset of files to search. Whether it’s specific locales, resource groups, or just a corner of your project, you can ensure your search precision.

Comments:Each translation of a resource now has its own comment, all visible at once in the datagrid. Imagine this: You’re working on an app that supports multiple languages, and you stumble upon a quirky phrase that needs tweaking. With individual translation comments, you can provide context, backstory, or even a friendly reminder to your future self.

It’s also common that the translator isn’t the same person managing the app’s resources. Maybe it’s a third-party service or a colleague from another team. No need to worry about misunderstandings of translation context because comments bridge the gap. The translator can leave notes, explanations, or caveats right alongside the translations. It’s like having a virtual sticky note attached to each string, making collaboration seamless. Keep an eye out for familiar UI – we’ve borrowed a leaf from the UX playbook of other beloved apps (hello, Excel!). When you explore translations, be on the lookout for the small icon in the corner of each cell.

Validation and Warnings:The new Resource Explorer now warns you if you are missing translations or have issues with your placeholder values.

Missing Translation warnings: Localization just got smarter. If your app supports multiple languages, missing translations can be a headache. Our revamped Resource Explorer now detects those gaps and issues targeted warnings. Whether it’s a label, button, or tooltip, we’ve got your back.

Placeholder Validation: Ever accidentally left a resource field blank or mis-formatted, only to discover it during deployment? Fear not! Our new placeholder validation feature ensures that you never miss a beat. As you create or modify resources, we’ll nudge you to fill in those essential details. No more surprises during runtime – placeholders keep you on track!

Accessibility and UI changes:At Microsoft we understand technology – that’s why we continue to innovate, create, and design in a way that gives everyone the ability to achieve more. As part of this redesign we have made a handful of accessibility and UI changes that will be appreciated by developers of all abilities.

Accessibility and Assistive Technologies: We’ve fine-tuned every pixel to ensure compatibility with screen readers and assistive technologies. Everyone deserves an inclusive coding experience!

Zoom: No more squinting at the tiny grid view trying to decipher resource details. Our new grid view provides precision at your fingertips with the built-in zoom capabilities – simply use your mouse wheel or keyboard shortcuts to zoom in and out.

Dark Mode: Say goodbye to eye strain! Our revamped Resource Explorer now boasts a sleek dark mode that’s easy on the eyes. Whether you’re all-too familiar with late-night coding sessions or you simply prefer a more stylish interface, the dark theme sets the stage for focused productivity. Dive into your resource management tasks with confidence, knowing that your eyes are well taken care of.

What this version doesn’t include:This first release of the revamped Resource Explorer does not include CSV import and export functionality, automatic translations, or a way to integrate your own translation engines directly into the designer. For these, and many more advanced features, we recommend ResXResourceManager. This Visual Studio extension, created and managed by a key developer community contributor, will always be the best-in-class resource management experience and includes many state of the art features outside of the scope of what we offer out-of-the-box in Visual Studio. If you already use this extension for your resource management in Visual Studio, no need to change anything – it will still work as usual with the new update.

Where to find it:The revamped Resource Explorer is now on by default in the 17.11 Preview 2 and later versions of Visual Studio. You can open the designer either by double clicking on your Resources folder in the Solution Explorer, or by navigating to View > Other Windows > Resource Explorer.

The post Introducing the Revamped Visual Studio Resource Explorer appeared first on Visual Studio Blog.

View Details

We’re bringing our updated Extension Manager to all users! Over the last year, we’ve made our updated Extension Manager available as an optional preview feature and have been asking you to let us know what you think. Based on your incredible feedback, we’re now ready to offer the new Extension Manager as an on-by-default preview feature starting with Visual Studio 17.10. We’ve streamlined the essential features into a modern UI to help you discover great new extensions and manage your installed extensions.

With this release, we still want to hear from you! As you use the Extension Manager in this last preview phase, please share your thoughts so we can bring you the best possible experience in our upcoming official release.

Meet the new Extension ManagerGone are the days of leaving Visual Studio to find additional information on extensions! We created the new Extension Manager to spotlight the most important content when searching for extensions, including a large pane for viewing detailed descriptions.

The left sidebar has lets you choose between primary views:

  • Browse the Visual Studio Marketplace for new extensions
  • View and manage your Installed extensions
  • Discover and install any available Updates for your extensions
  • Install any extensions for which you have Roaming enabled

Filter your searchesYou can click the filter icon to the right of the search box to show the category and subcategory menus, which you can use to filter the search results. For example, you can search for tools to help with documentation or for ASP.NET controls.

Let us know what you think!The new Extension Manager is available to all Visual Studio 17.10 users and is on-by-default.

If for any reason you want to return to the previous Extension Manager, you can disable the preview feature by navigating to Tools > Manage Preview Features and unchecking the box for the feature called Extension Manager UI Refresh. To reenable the new Extension Manager, check the box for the preview feature and restart Visual Studio.

As you use the new Extension Manager, please use this ticket on Developer Community to share your thoughts and feedback. We want to hear from you about anything that might be missing or that could be improved.

If you run into any bugs or issues, please report them so we can prioritize fixing them.

The post A modern Extension Manager has arrived with Visual Studio 17.10 appeared first on Visual Studio Blog.

View Details

Imagine creating extensions that run faster and smoother than ever before! If you haven’t been following along lately, we’ve been working on improving the VisualStudio.Extensibility SDK. VisualStudio.Extensibility helps you build extensions that run outside the main IDE process for improved performance and reliability. With it comes a sleek and intuitive .NET 8-based API and comprehensive, well-maintained documentation to help you develop awesome extensions.

This 17.10 release builds on our previous releases, and it brings with it a brand-new debugging experience to make it easier for you to get your extensions running just the way you’d expect. We’ve also enhanced our remote UI features, added a new way to prompt users, and continued to add features to our project query API.

Get Started with VisualStudio.ExtensibilityPlease visit https://aka.ms/VisualStudio.Extensibility for the latest up-to-date docs and installation instructions. We encourage you to report bugs and suggest features via the issue tracker on our GitHub repo, where you can also find extension samples to help you get started.

What’s new for VisualStudio.Extensibility?Do you want to develop and debug your extensions more quickly and more easily than before? Our 17.10 release adds the following features to help you do just that:

  • Debug your extension using our new Diagnostics Explorer
  • Leverage XAML Resources in your UI
  • Let your extension users pick files or directories
  • Track project changes with an improved query API

Debug your extension using our new Diagnostics ExplorerWe’ve created a powerful new tool for debugging your extensions called the VisualStudio.Extensibility Diagnostics Explorer, available here in the Visual Studio Marketplace. With it, you’ll be able to see extensions the way that Visual Studio sees them to help ensure that you’ve configured yours correctly.

This tool, which itself was written as an in-process VisualStudio.Extensibility extension, can help you answer questions like “why isn’t my command showing up where I expect it to be in the IDE?” or “why isn’t my extension being activated when I expect it to be?”

Inspect configurationVisualStudio.Extensibility has already made it easier for you to configure your extensions by eliminating the need for you to manually maintain separate metadata files. Now, we’re building on that with the Diagnostics Explorer, which lets you see exactly which extensions and components were discovered by Visual Studio, along with the configuration of each discovered item.

For example, if you weren’t seeing your command in the IDE, you could use the Command tab Diagnostics Explorer to view any commands that have been contributed to Visual Studio. If it’s not present in the list, that’s a hint to double check your configuration to make sure it gets discovered. If it’s present, but not enabled or visible, you may want to check your activation constraints. And if it’s marked as enabled and visible, you could use the dropdown menu to view command placements to make sure you’ve placed it correctly.

Using the Commands tab, you can inspect commands, command sets, groups, menus and toolbars, command placements, and dynamic command anchors. Other tabs let you inspect components for other feature areas including tool windows, document types, text views, and more. As we add features in future releases, you’ll be able to inspect any new components alongside these in the Diagnostics Explorer.

View live event logWe know that extension developers like you sometimes develop extensions that may need to handle events throughout the IDE, such as a command being executed, a tool window being opened, or a TextView being created, so we’ve added a live event viewer to enable you to observe these events and their properties in real time:

Create better activation constraintsThe Activation Constraints tab in the Diagnostics Explorer gives you the current state for each of the values available to you when creating an activation constraint. Using this tab, you can get the IDE into the state that you want to use for your activation (such as building a project or opening a markdown file), and then you can inspect the values for each of the available expressions to help you create your constraint.

For example, suppose you wanted a command to be visible only if there’s a C# file open in the editor. With the Diagnostics Explorer, you could open a C# file and use the Activation Constraints tab to help you to determine which of the expressions you’ll need to craft your constraint:

EnabledWhen = ActivationConstraint.ClientContext(ClientContextKey.Shell.ActiveEditorContentType, "CSharp"). Leverage XAML Resources in your UIXAML resources accelerate your UI development by letting you define objects like colors, brushes, or styles that you can leverage throughout your project. With this release of VisualStudio.Extensibility, we’re adding support for XAML resources to help you develop great UIs for your extensions!

Consistent with our other remote UI features such as UI controls, you’ll define any XAML files with ResourceDictionaries as embedded resources in your .csproj file:

`<ItemGroup> <EmbeddedResource Include="\XamlResources.*xaml" /> <Page Remove="XamlResources.*xaml" /></ItemGroup>` Once defined, it’s easy to include your resources in other components so that they can be referenced in your XAML throughout your project:

`ResourceDictionaries.AddEmbeddedResource("XamlResources.xaml")` You can even localize your resources: see the Modal Dialog sample for more information and let us know what you think!

Let your extension users pick files or directoriesBuilding on our previous support for user prompts and custom dialogs, we’ve added the ability to display file and directory picker prompts from your extensions. For example, you can use the ShowOpenFileDialogAsync() method to prompt users to select a single file to open:

VisualStudioExtensibility.Shell().ShowOpenFileDialogAsync(options, cancellationToken); Using the new APIs, you can prompt users to:

  • Select a single file to open
  • Select one or more files to open
  • Select a single file to Save As
  • Select a directory to open

As always, if there are other types of user prompts that are important for your extensions, please let us know through our Issues Tracker.

Track project changes with an improved query APIOur 17.10 release adds three new features to the project query API.

Track changes to query resultsThe TrackUpdatesAsync() method can be used in your project system queries to create an IObserver object to track changes to the state of the projects or solutions in your query. For example, if you want to track when updates made to the files in a project, you could use:

var query = await myProject .Files .With(f => f.FileName) .TrackUpdatesAsync(new TrackerObserver(), CancellationToken.None); In this example, the TrackerObserver implements IObserver<IQueryTrackUpdates<IFileSnapshot>>, so you can use your own custom logic to handle the update events.

Query project rulesEach project in the project query API now contains a RulesResults attribute, which includes a rule name and a list of items. You can access these rules by calling RuleResultsByName() for a given configuration.

var results = await querySpace .Projects .With(p => p.Path) .With(p => p.ActiveConfigurations .With(c => c.RuleResultsByRuleName("CompilerCommandLineArgs") .With(r => r.RuleName) .With(r => r.Items .With(i => i.Name)))) .ExecuteQueryAsync(); Skip results in a queryWe’ve added the Skip() method to enable you to skip results in your query.

var projects = await queryableSpace.Projects .With(proj => proj.Name) .Skip(1) .ExecuteQueryAsync(); Here, the first project is skipped, and the remaining projects are returned.

We can’t do this without you!We need your help as we continue to develop VisualStudio.Extensibility! Please try out this preview release and let us know what you think. Check out the docs, browse the code samples, and build your first extension. You can send feedback, report issues, or request features through our issue tracker.

We’re prioritizing the features that our extenders ask for, so please give VisualStudio.Extensibility a try and share your thoughts with us!

The post VisualStudio.Extensibility 17.10: Debug your extensions with the Diagnostics Explorer appeared first on Visual Studio Blog.

View Details

We’re excited to introduce the general availability of .NET Aspire, a comprehensive stack aimed at simplifying the way .NET cloud-native apps are built and managed. .NET Aspire offers developers like you an improved, opinionated framework for constructing distributed applications, ensuring a seamless and consistent development experience.

This new stack brings together a collection of tools, patterns, and special NuGet packages known as .NET Aspire Components designed specifically for the orchestration, component integration, and tooling required in modern cloud-native development. Whether you are on day-zero or well into your cloud native journey, Visual Studio provides the most natural way to deliver projects to Azure.

If you’re a distributed application developer .NET Aspire brings something you’ve always wanted: –

  • The ability to select F5 and have all the dependencies start up or be provisioned.
  • Your projects are automatically configured between significant, distributed changes in the app.
  • Deployment of these multi-node apps into a live development or test environment are a one-click gesture.
  • .NET Aspire’s built-in service discovery capabilities enable your front-end apps to find your back-end APIs with less friction and almost zero configuration.

Getting started with .NET AspireDownload the latest Visual Studio build today to get started. If you don’t already have .NET Aspire installed, open the Visual Studio Installer, select Modify, and choose the ASP.NET and web development workload, and then select .NET Aspire SDK. Alternatively, you can run dotnet workload install aspire from a command line. Then, you’ll start to see new .NET Aspire project templates in Visual Studio and at the .NET CLI. Once you see the templates, try creating your first cloud-native .NET Aspire app by selecting the .NET Aspire Starter Application template.

Download Visual StudioIf you’ve ever had to build a front-end app that accessed a REST API back end and needed caching to enhance the app’s performance, you’ll recognize the topology of the app right away. Once you select F5 to start the debugger, the familiarity will end and the excitement will start – without needing to configure anything in your project or set startup order, the whole application will start up.

The .NET Aspire Dashboard opens and from there you’ll have access to deep telemetry, metrics, and distributed traces where you can see how the entire app is working end-to-end.

Deploying to Azure Container AppsIf you’re an Azure customer, you’ll be happy to know we’ve applied this same sort of one-click joy to our publishing experience, too. From within Visual Studio, you can right-click-publish an entire multi-node app to Azure Container Apps in one click. With “whole-app provision-and-publish” capabilities provided by the Azure Developer CLI (azd), from right within Visual Studio you can create new development environments in Azure Container Apps with one click.

This makes it easier than ever to spin up – and down – whole new copies of your application in isolated environments in your Azure subscription. Within minutes, your projects – and the dependencies they require to run – are all deployed successfully to Azure Container Apps.

Download Visual StudioWe’re happy to announce the general availability of .NET Aspire, which extends Visual Studio’s capabilities for cloud-native application development. .NET Aspire provides a framework and tools that have an opinionated approach, making distributed .NET applications easier to build, deploy, and manage. This integration aims to make the development of cloud-native apps more straightforward and productive.

Early adopters of .NET Aspire are heralding it as a game-changer in the cloud-native development space. They rave about how Aspire is revolutionizing their workflow by simplifying deployment and refactoring. They love the open telemetry dashboard, as it offers unprecedented insights that were once only available in production. With the help of .NET Aspire, developers are transforming the way they work, focusing more on innovation and less on the intricacies of operations.

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post Developing cloud native apps with Aspire appeared first on Visual Studio Blog.

View Details

We are excited to announce the release of Visual Studio 2022 v17.11 Preview 1, the first preview of our next update for Visual Studio 2022. This preview focuses on quality-of-life improvements for all developers and workloads. See the release notes for full list of features.

When you use Visual Studio, you want to feel empowered and productive. That’s why quality-of-life features are so important: they make coding a smooth and enjoyable experience, free of unnecessary hassles and headaches.

You’ll also find hundreds of user-reported bugs and issues fixed and lots of tweaks to existing features. All of it to make you more productive and the Visual Studio developer experience the best one yet.

We hope you enjoy this preview of Visual Studio, and we look forward to hearing what you think. You can share feedback with us via Developer Community, by reporting issues via report a problem and share your suggestions for new features or improvements to existing ones.

You can download the preview from our website or update it from within the IDE. Please note that you should not use this preview in production environments, and some extensions or workloads may not be compatible with it.

For more details on what’s new in this preview, please check out our release notes. Thank you for using Visual Studio and happy coding!

The post First preview of Visual Studio 2022 v17.11 appeared first on Visual Studio Blog.

View Details

The future always starts with developers. They determine the speed of innovation, and never has that been more true than today, in the era of Generative AI. We’re already seeing GenAI have a profound impact on the way that we build applications and collaborate with our colleagues. More developers will be empowered to create with technology by having access to a coach to guide you through each stage of your learning journey. And user expectations are evolving quickly so that today’s end-users expect their apps already know about their context and history, and even anticipate their next step.

There’s a lot of change on the horizon! But it can be hard to find the time to learn when we’re overwhelmed and bogged down with technical debt. Developers continually have to context switch between tools, which impacts their cognitive load and ability to focus. We know that even on a good day, developers only spend about 2 hours a day coding, and it takes them 23 minutes to regain focus after context switching. This, combined with randomizing meetings to assemble resources you need can make you feel exhausted at the end of the day and frustrated by inefficiencies. All this can take the joy out of work and make developing software feel like toil.

But we know there’s a path to developer happiness—where devs can focus more on coding and less on ops; where they can innovate at the speed of their creativity; and where they can get going fast, without having to worry about managing the infrastructure their apps depend upon.

Dev happiness = staying in the flowOne of our guiding principles is to bring the best tools to you where you live—in your code editing tools—so you can stay in the flow! At Build this week we’re announcing some pretty amazing developer experiences to bring more joy and less toil to your life as a developer.

For starters, we’re announcing the general availability of Visual Studio 17.10. In this version. We’ve plugged GitHub Copilot everywhere throughout the IDE, so it changes how you write, learn, test, search, and fix code in your apps.

We’re also announcing the preview of GitHub Copilot for Azure, an extension that integrates seamlessly with GitHub Copilot chat in Visual Studio Code and Visual Studio, bringing Azure expertise right to your fingertips! Using GitHub Copilot for Azure, you can learn about Azure resources and best practices; explore and manage Azure resources; and troubleshoot issues and locate relevant logs and code. GitHub Copilot for Azure is built atop a general extensibility surface area we’ve introduced into GitHub Copilot. Soon you won’t have to context switch as all your favorite tools will be integrated into your code! More on that in a bit…

.NET Aspire is now generally available.NET Aspire codifies the best practices for cloud-native development with tools for multi-project management, built-in HTTP resiliency, health checks, OpenTelemetry, and easy multi-node deployment via Visual Studio, VS Code, and the Azure Developer CLI. .NET Aspire makes it easy to get started with templates and a set of curated components based on our opinionated stack inside Microsoft and co-developed with the .NET community.

Using .NET Aspire, it’s easy to build and debug using service discovery and a completely new developer dashboard to see real-time telemetry and metrics, and to get a foothold on diagnosing issues. You can run and deploy with a single command to launch and run multiple services. Being able to express app topology in C# makes cloud deployment easy to any cloud destination.

Lots of great innovations to bring the best of all your tools into where you live—your favorite code editor tools—so you can stay in the flow!

Building intelligent appsOver the past year we’ve witnessed the birth of one of the most pivotal technological innovations in history: Generative AI (GenAI). It has changed user expectations for every experience and continues to shape how businesses think of technology as an enabler for rapid growth.

We refer to any app that uses artificial intelligence for all or some of its functionality as an “intelligent app.” The way intelligent apps change experiences and operations are what can become competitive differentiators. It starts by thinking about the use cases where your data can provide actionable insights that can improve your processes or your customer experience. This is a massive paradigm shift—it’s changing user expectations for how we all interact with technology. Natural language is the new user interface; we simply talk to it. I can ask it questions and it already has the context of my account or my history and it can even anticipate my needs. And these apps continually improve by learning while in production. What that means is that the traditional developer inner and outer loop also evolves to facilitate the evaluation cycle and continuous learning once deployed to production.

Whether you’re using a foundational model like GPT3, Phi-3, building your own custom machine learning, or augmenting an existing model with fine-tuning, these apps go beyond an algorithm recommending content based on what you click, tap, listen to, or watch. Intelligent apps learn from the user’s inputs and data to continually get better over time, while observing responsible AI best-practices.

For our developer tools and application building blocks, our goals are to…

  • Make building GenAI apps more approachable
  • Reduce the effort required to build, manage, and evolve GenAI apps
  • Support the end-to-end app development lifecycle, including the new tasks necessary to build intelligent apps — like evaluating models and prompts and preparing data
  • All while maintaining enterprise-grade security, scalability, compliance, and governance according to our DevOps and platform engineering best practices

Today, we’re announcing the AI Toolkit for Visual Studio Code. This toolkit helps AI engineers develop and deploy intelligent apps by enabling them to explore, acquire, evaluate, and integrate small and large language models within VS Code. You can use your local hardware to try, run, and evaluate state-of-the art small language models—or SLMs—like Phi-3. It takes advantage of the deep investments we’ve made in the ML stack on Windows to provide a turnkey experience to run any model seamlessly on your laptop, Dev Box, or Azure AI compute. While it runs best on Windows today, MacOS support is coming soon!

Intelligent apps: Better on AzureIn addition to providing a platform to host your apps, the Azure App Platform provides the essential building blocks you need to accomplish the different tasks that you typically do to build and operate a GenAI application, including leveraging Azure OpenAI and hosted models in your apps; building enhanced copilots; experimenting and optimizing; and hosting custom models and fine tuning them with your data.

All the capabilities are integrated with one another, and you can use them together seamlessly. For example, you can incorporate experimentation and use Vector DB add-ons for your GenAI apps running on any of our App Platform services.

Here are just a few of the ways that Azure is evolving for the era of AI:

  • When you start growing your application portfolio, you will likely want to track token usage across multiple applications, or to make sure that a single app doesn’t consume the whole TPM quota. Azure API Management has introduced new capabilities to enhance the scalability and security of Generative AI deployments. These include the Azure OpenAI token limit policy for fair usage and optimized resource allocation, one-click import of Azure OpenAI endpoints as APIs, a load balancer for efficient traffic distribution, and a circuit breaker to protect backend services.
  • API sprawl poses significant challenges in API governance, security, compliance, and reuse. Without a centralized inventory, APIs can become isolated, leading to poor API reuse, lack of alignment with organizational API design and organizational processes, as well as increased vulnerability to security breaches. And most GenAI apps consume LLMs via APIs – so the era of GenAI is the era of API-first development. The Azure API Center provides centralized API inventory for seamless discovery, reuse, and governance regardless of API type, lifecycle stage, or deployment location.
  • Azure Container Apps now include secure sandboxes at scale: When you build applications that run code or commands from untrusted sources, you have to ensure that the code runs in its own isolated environment. If an LLM is generating the code you need to evaluate, what is the best way to execute that code? Dynamic sessions provide secure, ephemeral sandboxes called “sessions” for running potentially malicious code. Each session runs in its own Hyper-V virtualization boundary — ensuring complete isolation from other sessions and resources.

You can read about all these Azure announcements and more in the Build Book of News.

Developer productivity comes from team agilitySo, we’ve covered new tools and experiences that help you stay in the flow and get into building intelligent applications. Now let’s talk about how the practice of platform engineering can help organizations stay secure and compliant and developers focus on their code.

Developers want to be able to self-serve environments, workflows, and infrastructure with the confidence they’re adhering to the best practices and requirements of their organization. It’s just one more aspect of staying in the flow.

Last November we launched our guidance on platform engineering. On a very basic level, platform engineering is a set of patterns and practices helping to modernize enterprise software delivery. These patterns and practices, if executed right, can become the glue between development and operations teams—creating more cohesion and flow amongst teams throughout the product-making lifecycle.

At its best, Platform Engineering empowers teams to achieve scale and reduce the time it takes to deliver business value—all while eliminating toil, promoting self-sufficiency, and reducing the cognitive load required to meet broader operational and organizational standards.

With policy enforcement, security monitoring, and observability, organizations can govern their app estate to get better cost control and reduce risk while delivering a great developer experience.

And GitHub Copilot is now the perfect platform to deliver an unparalleled developer experience for platform engineering. With the new extensibility capabilities, GitHub Copilot can be augmented and grounded with your product catalog that you define in GitHub repos with Templates, Workflows, APIs, and samples that provide start-right automation and policy enforcement to your developers who can discover and deploy them with natural language user interfaces in Copilot Chat.

New features in Microsoft Dev Box and Azure Deployment EnvironmentsMicrosoft Dev Box, an Azure service that gives developers self-service access to preconfigured, project-specific developer workstations, has been a key part of our approach to platform engineering. Used by companies like GM and Siemens Healthineers China (and by over 25k Microsoft developers), Dev Boxes reduce environment setup from days to minutes, encouraging collaboration and experimentation. With pre-installed tools and source code, developers can onboard and start coding quickly.

For development teams, we’ve recently added standardized templates with project-level catalogs specific to each project. We also have a new Dev Box imaging service where teams can create and maintain custom image using config-as-code to make sure their entire team has a consistent environment.

And Azure Deployment Environments now delivers more seamless experiences to customers, enabling them to leverage popular Infrastructure-as-Code (IaC) frameworks quickly and easily with its new extensibility model and to perform or customize deployments based on their organizational needs.

These capabilities give development teams more control to customize environment templates for their team-specific needs and provide platform engineers with additional ways to build templates in their preferred IaC format.

But consistent environments across teams doesn’t mean that the experience can’t be personalized to developers.

The new Dev Home capabilities in Windows make it easy to create a personalized, consistent environment that works beautifully with Microsoft Dev Box. It’s simple to create, connect, and customize Dev Boxes, pin frequently used Dev Boxes to your taskbar or start menu, and add tools onto your config or the one you’re building for the team.

CloseOur mission is to empower developers to achieve more. Our vision is to enable them to set up a complete engineering system in seconds, contribute from any device, build for any platform, collaborate with anybody, and scale with confidence. In the era of AI, developers and their teams can get into the zone, learn about new technology more quickly than ever before, explore what’s possible at the speed of their creativity, and share their expertise to accelerate the impact of their entire team.

The post Maximizing joy and minimizing toil with great developer experiences appeared first on Visual Studio Blog.

View Details

Today, as we kick off the //BUILD 2024 conference, we’re thrilled to share the general availability of Visual Studio 2022 17.10! This release features a new, single GitHub Copilot extension, marking a significant leap forward in AI-assisted development by embedding the power of advanced AI directly into strategic parts of your Integrated Development Environment (IDE).

With the integration of GitHub Copilot directly into Visual Studio, we’re offering you a coding partner with improved context, providing smart suggestions and code completions that help you stay focused and productive. We’ve updated the familiar features to use the latest AI models with the goal of keeping you in the creative flow for longer. To enable these AI experiences, activate your GitHub Copilot subscription today by signing in to GitHub and starting a free trial.

Today’s post will focus on GitHub Copilot, but over the next few weeks we will continue to provide additional details on the improvements in the 17.10 release, which includes the General Availability of .NET Aspire, further expanding Visual Studio’s capabilities into cloud-native application development. For a complete list of our latest enhancements check out the Release Notes. We invite you to try out Visual Studio 2022 17.10 GA and discover these new features and improvements for yourself.

Download Visual StudioAccelerating your coding experiences with GitHub CopilotGitHub Copilot’s latest experience is integrated into Visual Studio and combines the features of GitHub Copilot’s code completion capabilities and GitHub Copilot Chat into one convenient package, eliminating the need to install two separate extensions.

This AI-driven inline companion understands your code, offering real-time suggestions and intelligent code completions. Additionally, GitHub Copilot chat presents the opportunity for a sustained, threaded conversation in which you build context and background for the problems you are investigating. It’s like having a coding partner that speeds up your development process, allowing you to focus on innovation rather than getting bogged down by the basics.

Onboarding developers to new teams and projects comes with the challenge of knowledge sharing, but when code commits are moving faster than documentation the most important source of truth becomes the code itself. GitHub Copilot Chat provides convenient slash commands and references to get better answers that are scoped to your specific solution and projects.

In the following example we ask GitHub Copilot to explain (/explain) a method from a specific class by including a reference to the class file using the # symbol:

/explain the AddItemToBasket method in #file:BasketService.cs Or in this example we ask it to fix a problem in a method:

/fix the HashThisData method in #file:StringExtentions.cs Slash commands allow you to quickly set the intent for many common development tasks (e.g. /doc, /explain, /fix, /optimize, /generate, etc.). While references allow you to be more specific about the information you want GitHub Copilot to consider when answering your question (e.g. #solution, #locals, #file.cs, etc.).

Debugging fasterWith GitHub Copilot debugging and validating code in Visual Studio becomes a less daunting task. For example, one of the most common bugs developers are forced to investigate comes from exceptions. Now when an error is caught the AI-powered Exception Helper can assist you through the troubleshooting process. The Exception Helper uses a combination of the exception type and call stacks to help form a context rich question from diagnostics data available to Visual Studio’s best in class debugger.

We are also supporting rubber ducking techniques where we invite you to articulate the problem in your natural written language while the debugger is paused. By including the local’s reference (#locals) you can ask direct questions about the state of a variable. For example, I might ask:

Why is the value of InterestRate NaN? #locals Our newest set of debugging features include a deadlock detection helper that identifies blocking states in your running application, and more importantly, it can also suggest solutions for the underlying code. We have also integrated GitHub Copilot into our breakpoint workflows, allowing you to easily define your break point conditions, giving you the opportunity to strategically pause the debugger at key moments of an investigation.

Scaffold tests and summarize code commitsGitHub Copilot can also assist you in both the generation and resolution of unit tests, helping teams conserve code coverage and health. While scaffolding these kinds of tests is necessary work, it can also be a time consuming and repetitive task. In this example we create a set of tests for a selected class:

/tests #file:StringExtentions.cs The outcome of GitHub Copilot assistance is a more productive development process, where time spent on crafting unit tests and error resolution is minimized, and code quality is consistently high.

We know that you can grow frustrated with the time you spend maintaining a healthy code base. It can be hard to recall and condense the hours of design and development into notes and documentation that communicate the appropriate intent to your team. GitHub Copilot enables smart PR and commit suggestions, it’s easier than ever to maintain clarity and consistency across your developer projects.

We found that 80% of developers find the generated PR description suggestion helpful enough to use. In all, GitHub Copilot helps developers complete their code faster, reduce their mental effort, while allowing them to focus on more enjoyable work.

Download Visual StudioAs we wrap up our exploration of Visual Studio’s latest enhancements with GitHub Copilot, it’s clear that this integration creates an important opportunity to help you achieve more. Whether you’re a seasoned developer or just starting out, the latest updates to Visual Studio are designed to help you be more productive. We invite you to download the latest version of Visual Studio, activate your GitHub Copilot subscription today and start a free trial to enjoy the latest AI experiences.

Share your feedback and stay connected with Visual Studio!We appreciate the time you’ve spent reporting issues and submitting suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the entire Visual Studio team, thanks for reading and Happy Coding!

The post Visual Studio 2022 17.10 and GitHub Copilot: Your Coding Partner for Faster and Smarter Development appeared first on Visual Studio Blog.

View Details

In our previous post, we discussed GitHub Copilot’s Slash Commands, which allow you to trigger specific actions within Visual Studio with simple text-based inputs. Now, let’s explore the /optimize command and its potential to improve code quality in Visual Studio.

Refactoring with /optimizeIn a recent exploration by Bruno Capuano, we see the transformative capabilities of GitHub Copilot’s /optimize command. Bruno demonstrates its prowess by refactoring a code snippet, showcasing how simple text-based inputs can yield significant improvements in code structure and performance.

One of the prime examples showcased by Bruno involves the conversion of a traditional for loop utilizing numerical indices into a more readable and intuitive foreach loop. While foreach loops in .NET might seem more verbose, they often offer better readability, a crucial aspect in maintaining code quality and ease of understanding.

Here’s a glimpse of the original for loop snippet:

for (int i = 0; i < chatHistory.Count; i++){ var message = chatHistory[i]; var msg = new ChatMessage(); msg.role = message.Role.ToString().ToLower(); msg.content = message.Content; root.messages.Add(msg);} To provide context to Copilot, Bruno selects the entire loop. He then initiates the inline chat dialog by typing “Alt-/”.

To guide Copilot in refactoring the code, Bruno types a Slash ‘/’, which opens the previously discussed dialog. He chooses the Optimize command from the menu and sends the command to Copilot.

Copilot responds with several optimization suggestions:

  • The ChatMessage instance can be initialized during construction, enhancing efficiency.
  • A foreach loop is utilized.

The refactored code appears as follows:

foreach (var message in chatHistory){ var msg = new ChatMessage { role = message.Role.ToString().ToLower(), content = message.Content }; root.messages.Add(msg);} Learn from Copilot: Give it a Try!The most effective way to comprehend a tool’s functionality is to use it firsthand. I find it fascinating to apply the /optimize command to my production projects. At times, the modifications are minor, affirming the quality of my original code. However, there are instances when Copilot suggests ingenious alterations, often introducing me to new syntaxes.

Validating the output of GitHub Copilot is also crucial to ensure it hasn’t introduced any errors or regressions. Unit tests can serve as a safety net for these changes, just as they do during the refactoring of any piece of code.

Additional ResourcesWe offer a wealth of resources to further your understanding of GitHub Copilot for Visual Studio. We encourage you to explore this collection, you can watch the full video here and regularly visit this blog for more content.

The post Improve your code quality with GitHub Copilot in Visual Studio appeared first on Visual Studio Blog.

View Details

MICROSOFT BUILD 2024Watch it Live! or On-Demand – Starting Next Tuesday!

Next week, from May 21st, I’ll be diving into Microsoft Build 2024, and I invite you to come along for the ride—virtually! We’ll explore cutting-edge developments in Visual Studio, Azure, and AI development from wherever we are, no travel required. It’s your chance to join live discussions and connect with tech enthusiasts from around the world, all from your home or office.

This year, I’m particularly excited about charting new paths with AI and copilots. Whether you’re looking to boost your efficiency, secure your projects, or simply expand your tech horizons, the keynotes and breakout sessions are set to deliver. And if you have questions, the experts—yes, the real wizards behind Microsoft’s innovations—will be there to answer them in the session chat rooms.

To give you a head start, I’ve shared a few of the sessions I plan to attend below. Hopefully, they’ll inspire your own choices as you start building your ‘Session Planner’ today.

REGISTER & LOGIN TODAY...IT'S FREE!Must See Sessions at Build 2024: Microsoft Build Opening Keynote: Join Satya Nadella, Rajesh Jha, and Kevin Scott on Tuesday, May 21, from 9:00 AM to 11:00 AM PDT. Learn how this era of AI will unlock new opportunities, transform how developers work, and drive business productivity across industries. * Next Generation AI for Developers with the Microsoft Cloud: Join Scott Guthrie and leaders across Microsoft on Wednesday, May 22, from 8:30 AM to 10:00 AM PDT. Learn how to build secure and responsible AI solutions with the foundation of the Microsoft Cloud. Featuring a fireside chat with John Lambert and Julia Liuson to learn what you can do to create secure solutions in today’s threat landscape. * Maximize Joy, Minimize Toil with Great Developer Experiences:* Join Amanda Silver and friends on Tuesday, May 21, from 1:00 PM to 1:45 PM PDT. At Microsoft, enhancing the developer experience is central to our mission. In this session, delve into the latest advancements in developer tools and learn about our collaborative efforts across the technology spectrum. Discover how these innovations are shaping the development of modern, intelligent apps.

Visual Studio at Build 2024:Browse all the Build sessions online, but here’s a sampling of some of the Visual Studio sessions that will offer an in-depth look into what we’re currently developing and enhancing, with a strong technical focus:

  • What’s New in GitHub Copilot and Visual Studio: Explore enhancements in AI-assisted coding with Damian Brady and Filisha Shah on Wednesday, May 22, from 6:00 PM to 6:45 PM PDT. GitHub Copilot is your AI coding assistant, and when paired with Visual Studio, so much more! We’ll take you through tips and tricks, special integrations, and other recent enhancements to make sure you’re getting the most out of GitHub Copilot, including things that you can only do with Visual Studio.
  • Build Apps from the Cloud with Microsoft Dev Box, Visual Studio & More: Dive into cloud-native development with Anthony Cangialosi and Denizhan Yigitbas on Tuesday, May 21, from 2:15 PM to 3:00 PM PDT. Learn how to unify ready-to-code development environments with best-in-class dev tools to deliver an unparalleled coding experience for building intelligent applications and more. Give developers the flexibility to use the tools they want within IT guardrails and enable self-service by integrating Microsoft Dev Box with top-tier developer tools like Visual Studio and GitHub Copilot. Plus, streamline test environment provisioning with Azure Deployment Environments.
  • Demystify Cloud-Native Development with .NET Aspire: Damian Edwards and David Fowler will introduce you to .NET Aspire on Wednesday, May 22, from 1:00 PM to 1:45 PM PDT, focusing on tools and components for building intelligent cloud services. Explore the groundbreaking .NET Aspire technology stack designed for cloud-native development. We’ll explore the Orchestration, Components, Tooling and more. We’ll even show you how to integrate the Azure Open AI component to add intelligent functionality to your distributed services.
  • .NET Aspire Development on Any OS with the Visual Studio Family: Discover the flexibility of .NET Aspire with Wendy Breiding and Brady Gaster on Wednesday, May 22, from 2:15 PM to 3:00 PM PDT, including seamless Azure integration. Explore the core features of .NET Aspire and how it enhances the developer experience for building cloud-native applications. This session will demonstrate building .NET Aspire apps with Visual Studio and VS Code, so you can choose the best tool for your workflow. We’ll then cover Azure Developer CLI (AZD) integration and the “azd up” experience, showcasing how .NET Aspire and AZD work together to seamlessly move your locally-running app to the cloud!
  • What’s New in C# 13: Mads Torgersen and Dustin Campbell will reveal the latest features in C# 13 on Thursday, May 23, from 8:30 AM to 9:15 AM PDT. Join Mads and Dustin as they show off a long list of features and improvements coming in C# 13. This year brings long-awaited new features like extensions and field access in auto-properties, as well as a revamped approach to breaking changes to ensure cleaner language evolution in years to come. Additionally, we take collection expressions to the next level by facilitating dictionary creation and opening params to new collection types.
  • Infusing Your .NET Apps with AI: Practical Tools and Techniques: Join Vin Kamat, Luis Quintanilla, and Stephen Toub on Thursday, May 23, from 11:00 AM to 11:45 AM PDT. Learn how to incorporate AI into your .NET applications using tools, libraries, and best practices. This session will demonstrate practical examples of leveraging Azure AI services and the .NET AI ecosystem to create “intelligent apps.” Ideal for developers looking to enhance their apps with advanced AI capabilities.
  • Diagnostic Techniques for .NET Running on Linux and Within Containers: Join Mark Downie and Sam Spencer for a pre-recorded session available on Monday, May 21, from 8:30 AM PDT. Learn the essential tips and tricks for diagnosing .NET applications running on Linux and within container environments such as Kubernetes. From local diagnostics in WSL to debug sidecars, this session will unveil how .NET has tools designed to help you tackle the trickiest diagnostic challenges. Discover diagnostic techniques that enhance your ability to maintain robust, efficient applications across diverse environments.

For Hanselman Fans Scott and Mark Learn AI: Join Scott Hanselman and Mark Russinovich on Wednesday, May 22, from 3:30 PM to 4:15 PM PDT. Learn how to use AI tools to make smarter apps on Windows. You will learn how to use AI in your app, consume models both local and in the cloud, and how to use LLMs to make your apps even more awesome for users. They may even clean up Scott’s messy desktop that has been bothering Mark for some time now. * “Highly Technical Talk” with Hanselman and Toub: Don’t miss Scott Hanselman and Stephen Toub for a 100% LIVE demo session on Thursday, May 23, from 12:30 PM to 1:15 PM PDT. With zero slides and just code, they’ll dive deep into the internals of .NET, tackling performance issues and optimizations live on stage. This session is perfect for advanced developers looking to level up their debugging and performance skills using Microsoft’s own tools. * Level Up Your Dev Box, How Devs at Microsoft are Productive on Windows:* Join Scott Hanselman, Vicky Harp, and Maddy Montaquila on Wednesday, May 22, from 6:00 PM to 6:45 PM PDT. Discover how Microsoft developers enhance their productivity through custom setups and tools. This session will showcase a variety of tips, including using aliases, the best VS Code extensions, customizing the Windows Terminal, and efficient ways to set up new computers. Learn valuable shortcuts, apps, and systems to optimize your development workflow.

In-Person Only Demos – These demos are available only in Seattle and will not be recorded.For those of you joining us in Seattle, you’ll want to catch these live demos in the Demo Theaters on Level 5.

  • Tips & Tricks for Visual Studio and GitHub: Join Harshada Hole and Jessie Houghton for an exclusive demo session on Tuesday, May 21, from 4:45 PM to 5:00 PM PDT. Discover how to unlock the full potential of Visual Studio with expert tips and tricks. Learn to enhance your workflow by integrating powerful community extensions for peak efficiency.
  • What’s New for Copilot in Visual Studio 17.10: Catch Rhea Patel on Thursday, May 23, from 9:00 AM to 9:15 AM PDT for a demo on enhancing your Copilot chat experience in Visual Studio. This session will showcase cutting-edge generative AI applications, including a new interaction model and context improvements in Copilot Chat. Note:
  • VisualStudio.Com – Unlocking Your Benefits & Diamond: Attend this demo with Jason Chlus and Jacqueline Widdis on Wednesday, May 22, from 5:45 PM to 6:00 PM PDT. Learn about all the benefits included in your Visual Studio Subscription through a demo-filled tour. Discover how to easily access Azure credits, software downloads, training resources, and support to maximize your development potential.
  • Customize Dev Box for You and Your Team: Join Dhruv Muttaraju and David Obando on Wednesday, May 22, from 3:30 PM to 3:45 PM PDT. Learn how to configure and deploy customized Dev Boxes, tailored to the specific needs of individual teams, at scale using config-as-code templates and leveraging package management.
  • Microsoft Dev Box for Accessibility: On Wednesday, May 22, from 5:00 PM to 5:15 PM PDT, explore how to build Dev Boxes that cater to accessibility needs. This session will introduce the new config-as-code customization starters that showcase all the accessibility options available, ensuring your Dev Box is as comfortable and familiar as your local environment.

Ready to join thousands of developers at Build 2024? Don’t miss out on these exciting sessions and more! Click the link below to register today and secure your spot to experience Build 2024 virtually, alongside a global community of developers. Embrace the opportunity to learn, connect, and grow at this incredible event!

Register for Build 2024 and Join Us Online for Free!

Follow Us at Microsoft Build on TikTok!The Visual Studio TikTok team will be going Live! from Build. Check out @VisualStudio on TikTok

The post Get Ready for Visual Studio at Build 2024: Join Thousands Online! appeared first on Visual Studio Blog.

View Details

GitHub Copilot, the AI-powered coding assistant, revolutionizes coding in Visual Studio with its advanced features. In this series, we delve into the efficiency and convenience offered by Slash Commands, elevating your coding workflow.

Introducing Slash CommandsSlash Commands are predefined actions within GitHub Copilot, accessible through the prompt interface. Bruno Capuano, in his latest video, elucidates these commands, accessible via the Slash button in the Copilot Chat window or by typing a forward slash in the message box.

Alternatively, you can also access the Slash Commands by typing a forward slash in the message box.

Key commands include:

  • doc: Insert a documentation comment in the current cursor position.
  • exp: Start a new conversation thread with a fresh context.
  • explain: Provide an explanation for the selected code.
  • fix: Suggest fixes for code errors and typos.
  • generate: Generate new code snippets based on your input.
  • optimize: Recommend code optimizations to improve performance.
  • tests: Create a unit test for the current code selection.
  • help: Access help and support for GitHub Copilot.

A Practical Example with /fixDemonstrating the power of Slash Commands, the /fix command automatically suggests corrections for typos and errors, enhancing code quality and efficiency.

In the video, Bruno demonstrates how GitHub Copilot can automatically suggest corrections for typos and other issues. This command can be used in the main chat window, and it’s also accessible in the inline chat by pressing Alt-Slash (Alt-/) or through the right-click context menu.

As you can see, these Slash Commands can significantly improve your productivity in Visual Studio. Learn how to Install GitHub Copilot in Visual Studio.

Additional ResourcesTo learn more about GitHub Copilot and Slash Commands, check out our resource collection here. You can watch the full video here. For ongoing updates, stay tuned to this blog and consider subscribing to our YouTube channel for more insights and tutorials.

  • Code Faster and Better with GitHub Copilot’s New Features: Slash Commands and Context Variables
  • Announcing the GitHub Extension for Visual Studio

The post Mastering Slash Commands with GitHub Copilot in Visual Studio appeared first on Visual Studio Blog.

View Details

Transform Your Coding Workflow with GitHub Copilot in Visual StudioGitHub Copilot is a game-changing AI-powered assistant that can revolutionize your coding workflow in Visual Studio. In our video series, Bruno Capuano explores how this intelligent coding companion can help you write code more efficiently while maintaining quality and accuracy.

Copilot: An Assistant, Not a ReplacementBruno highlights that GitHub Copilot is designed to support your coding journey in Visual Studio, not replace developers. Microsoft’s philosophy is centered on AI working in harmony with human efforts, maintaining a balance that respects human dignity. As CEO Satya Nadella emphasizes, AI should enhance productivity without displacing people.

This is why developers should always validate the code generated by GitHub Copilot, as AI-based systems can sometimes suggest code that doesn’t align with your requirements or even produce errors, known as “hallucinations.” Even though GitHub Copilot is generally accurate, it’s critical to review its suggestions to ensure correctness.

To get started, ensure GitHub Copilot is installed in your development environment. For more information on setup, refer to the GitHub Copilot documentation, or learn how to install GitHub Copilot Chat for Visual Studio.

Leveraging LLMs for a New Interaction ParadigmLarge Language Models (LLMs), the technology behind GitHub Copilot, offer a new paradigm for interacting with computers. These models rely on complex probabilities and extensive training data to generate responses based on natural-language prompts, allowing for a more conversational style of coding. This interaction model is not limited to text—it can also involve other media types like images and videos.

However, given the variability of LLMs, the same query might yield different results, emphasizing the need for developer oversight.

Embracing the Future with GitHub CopilotAs AI becomes increasingly integrated into various industries, developers need to adapt. Tools like GitHub Copilot can give you a competitive edge by improving efficiency and adaptability. To stay ahead in the ever-changing tech landscape, it’s crucial to familiarize yourself with AI tools and understand their strengths and limitations. To learn more about GitHub Copilot and how to use it, check our collection with resources here or via our full-length video. Explore our resources and video tutorials for in-depth guidance on making the most of GitHub Copilot in your development projects!

Additional Resources:

  • Code Faster and Better with GitHub Copilot’s New Features: Slash Commands and Context Variables
  • Announcing the GitHub Extension for Visual Studio

The post Using GitHub Copilot as your Coding GPS appeared first on Visual Studio Blog.

View Details

GitHub Copilot is an AI-driven coding assistant designed to streamline your coding tasks and boost productivity in various development environments. In this ongoing series, we focus on its integration with Visual Studio, illustrating how it can significantly enhance your workflow and coding experience.

The latest short video I just published focuses on a specific command in GitHub Copilot for Visual Studio: the AskVS command.

https://www.youtube.com/watch?v=pPKYdBd8aqY

The AskVS commandIn the example from the video, Bruno selects a block of code and then opens the GitHub Copilot Chat window, where he enters the following command:

/AskVS refactor the #

This command triggers a series of helpful auto-completions. The initial / invokes the Slash command menu, allowing Bruno to choose the AskVS option. When he types #, another menu appears, enabling him to select the specific lines of code he previously highlighted. This approach also allows for flexibility, as you can select other context options, like different files or scopes.

Continuing with the command, the updated instruction is:

askvs refactor the CustomChatCompletionService.cs:25-32 to a new function

By issuing this command, GitHub Copilot receives a clear directive to refactor lines 25-32 within the specified file.

GitHub Copilot’s ResponseAfter running the command, GitHub Copilot presents the refactored code in a dialog, complete with a preview button. This feature lets you review the proposed changes before applying them, ensuring you’re comfortable with the modifications. Additionally, Copilot might suggest related code, like helper functions or code snippets demonstrating how to utilize the new code structure.

GitHub Copilot’s Response to AskVS commandExploring AskVS for More InsightsThe AskVS command has broader applications beyond refactoring. In the video, Bruno asks Copilot how to switch from the light theme to the dark theme in Visual Studio. In response, Copilot outlines the steps to change themes and includes hyperlinks to the specific Visual Studio dialogs where these changes occur.

ConclusionGitHub Copilot offers more slash commands and features, as demonstrated in previous videos. To explore these further, you can view the full-length video here. For additional resources, check our curated collection here.

Additional Resources:

    • Code Faster and Better with GitHub Copilot’s New Features: Slash Commands and Context Variables
    • Announcing the GitHub Extension for Visual Studio

The post Exploring the AskVS command in GitHub Copilot for Visual Studio appeared first on Visual Studio Blog.

View Details

Pure Virtual C++ is our free one-day virtual conference for the whole C++ community. This year it will run on April 30th 15:00 UTC. Sign-up for free to get access to our five sessions on the day and a host of pre-conference content which will roll out in the two weeks leading up to the conference.

The sessions are:

Automated Testing of Shader Code with Keith Stockdale (Rare)Rare has a rich culture of writing automated tests for their game and engine code. The ‘Sea of Thieves’ project has hundreds of thousands of automated tests that exist to validate behavior and to ensure that bugs are kept to a minimum, as we continually deliver an ever-changing experience to players. Among this large test suite are tests that validate and verify shader code. This session explores the new Rare Shader Test framework, describing how tests are written for shader code. The talk will also delve into the C++ and HLSL implementation of the shader testing framework to discuss the design goals of the system, and how we are using C++ to meet these design goals.

Message Handling with Boolean Implication with Ben Deane (Intel)Message reception and dispatch is something common to many codebases. This talk shows the unreasonable effectiveness of going back to basics and really understanding and unlocking the power of Boolean algebra in the design of a message handling library. We’ll talk about composing predicates on messages and manipulating them at compile time in order to do the least work when dispatching them at runtime. Particularly we’ll introduce implication, develop an intuition for this lesser-used Boolean operation, and see how it is key to a generic approach for simplifying predicates.

I Embedded a Programming Language In Debug Information with Sy Brand (Microsoft)DWARF information on Linux provides debuggers with a bridge between high-level source code and the machine instructions generated by the compiler. As part of this, it describes how to locate variables within your program at runtime using a language called DWARF Expressions. When implementing a parser for DWARF Expressions I thought “this seems suspiciously Turing-complete, can I implement a programming language inside this?” It turns out the answer is yes. In this session you’ll learn how debug information and executables are stored on Linux systems and how I managed to (ab)use them to implement a programming language interpreter that runs when you ask your debugger for the address of a variable.

Enhancing C++ development with Copilot Chat with Sinem Akinci (Microsoft)Copilot is an AI-powered pair programmer integrated into Visual Studio and VS Code that can be there to assist you at many different points in your C++ development journey. In this session, we’ll introduce Copilot and Copilot Chat, share tips for achieving the results you want, and provide different use cases for using these tools. Then, we’ll see these tools in action in C++ code in Visual Studio as we tackle a variety of problems from navigating and understanding code to refactoring existing code.

Progress Report: Adopting Header Units in Microsoft Word with Zachary Henkel (Microsoft)Microsoft Office is a huge C++ codebase with nearly 100 million lines of native code. This size provides a constant challenge to build the product as quickly as possible. C++20 header units are a way to receive many of the benefits of modules, while still working with a codebase originally designed for classic header inclusion. At CppCon 2022 we announced that Office would investigate header units with the goal of improved build throughput. We’re excited to present the results of that work for the benefit of the C++ community at large. In this session, we’ll share build performance metrics for the first time.

The post Free Pure Virtual C++ 2024 Conference appeared first on Visual Studio Blog.

View Details

A step-by-step guide to use GitHub Copilot Chat in Visual StudioGitHub Copilot serves as an AI-powered coding assistant capable of operating across various development environments, assisting you with your everyday coding challenges. In this new series of content, we will demonstrate how GitHub Copilot functions in Visual Studio especially and how it boosts your efficiency.

We just published “Using GitHub Copilot Chat in Visual Studio”, the third short video in this series, to guide you through leveraging GitHub Copilot Chat effectively within Visual Studio.

Exploring code with GitHub Copilot ChatIn the video, my coworker Bruno Capuano demonstrates how to populate an array with random numbers. Arrays are nice, but C# has more to offer and has other classes that can be used to make lists, with different features. GitHub Copilot Chat is a useful tool for this kind of investigations.

Make sure to have GitHub Copilot installed, refer to the documentation to learn how to install GitHub Copilot Chat for Visual Studio.

GitHub Copilot Chat can help you understand the difference between arrays and Lists. For example, it can list some of the differences, such as:

  • The size (an array has a fixed-size structure while a List can change its size at runtime).
  • The performance, a very important factor (arrays are usually more efficient than Lists because they don’t have to deal with dynamic sizing).
  • The functionality (a List has more methods than an array, allowing for data manipulation)

Also, it can show you some code examples that show how to create an array and a List, and how to add one element.

You don’t need to tell Copilot chat that you are using C# and .NET. It can figure that out from the solution and the file you are working on. This is similar to how you would talk to another coder when you are pair-programming.

Converting codeIn the following example, Bruno wants Copilot Chat to change his code, which uses arrays at first, to use Lists instead. A very handy feature that I personally find very useful is the preview feature. You just need to click the Preview button, and the code will be displayed inline in the code file, in a nice “diff” view that looks like what you see when comparing code changes, for example after a GitHub commit.

I think it’s a great way to see exactly what code will be modified, and most importantly, to check the code generated by Copilot before applying the changes. As we always remind you in this series, this is a Copilot, but you are the Pilot in Command!

I followed the example that Bruno demonstrated, and here is the code that Copilot Chat suggested to me before and after the changes:

Before

// fill an array with 10 random numbersint[] numbers = new int[10];Random random = new Random();for (int i = 0; i < numbers.Length; i++){ numbers[i] = random.Next(1, 100);} After

// fill a list with 10 random numbersList<int> numbers = new List<int>();Random random = new Random();for (int i = 0; i < 10; i++){ numbers.Add(random.Next(1, 100));} Asking Copilot to convert the codeThe proposed solutionThe Preview featureConclusionNow that you have successfully installed GitHub Copilot in Visual Studio, you can now enjoy the benefits of AI-powered coding assistance. GitHub Copilot can help you write code faster and you can also learn from the suggestions and examples that GitHub Copilot provides. To learn more about GitHub Copilot and how to use it, check our collection with resources here or via our full-length video.

Additional Resources

  • Code Faster and Better with GitHub Copilot’s New Features: Slash Commands and Context Variables
  • Announcing the GitHub Extension for Visual Studio

The post How to use GitHub Copilot Chat in Visual Studio appeared first on Visual Studio Blog.

View Details

GitHub Copilot your AI-powered coding companion is now seamlessly woven into your Visual Studio IDE, enhancing your everyday tasks and bringing you the latest AI-driven coding experiences. Copilot is designed to elevate your efficiency, by offering personalized code suggestions, crafting your git commit messages, answering coding-related queries, and much more.

We’re thrilled to introduce the new, unified Copilot experience in Visual Studio 17.10, now available in Preview 3 (General availability in May). This combines the features of Copilot and Copilot Chat into one convenient package. Eliminating the need to install two separate extensions and bringing you more deeply integrated AI experiences in the future. Activate your GitHub Copilot subscription today, by signing in to GitHub or start a free trial for the latest AI experience.

| See Copilot in action |

note: Copilot in now in the top right side of your Visual Studio

What is GitHub Copilot?Copilot is your AI-powered coding companion designed to enhance your IDE experience. It helps you in the following ways:

  • Speeding up your coding tasks with Copilot generated snippet, methods, and even entire programs.
  • Improve your code quality with Copilot’s optimization feature “/optimize” in Copilot Chat to improve your code’s performance, readability, and security.
  • Learn new coding patterns, languages, and frameworks by getting explanations and documentation for the suggested code from Copilot.
  • Focus on more satisfying and creative work by allowing Copilot to handle the repetitive, boilerplate, or tedious code, and conserving your mental energy and flow.

GitHub Copilot offers an interactive experience throughout Visual Studio, through chat both in a separate window and directly in your code, allowing you to start a conversation or simply begin typing. Copilot provides context-aware code completions, suggestions, and even entire code snippets. It’s like having a pair programmer who can help you, write commit messages, debug your code, generate your unit tests and more. GitHub Copilot serves as a valuable resource for information and answers about your code, including documentation, definitions, references, error explanations, and best practices.

Accessing CopilotIf you are a customer in Visual Studio 17.10 Preview:

  1. If you are using Visual Studio 17.10, GitHub Copilot is included right out of the box as a recommended component and will be installed on update or install.
    • If you need to install GitHub Copilot later, you can do so from the Visual Studio Installer by search for the “GitHub Copilot” component in the “Individual Component” tab. Note: If you prefer not to use Copilot installed in your Visual Studio, you have the option to hide the feature by selecting the GitHub Copilot badge and choosing “Hide Copilot”.
  2. For Versions 17.8 to 17.9 you will still be able to download “GitHub Copilot Chat” and “GitHub Copilot Completions” via Extension Manager, however, to get the latest Copilot features update to 17.10.

Get Visual Studio 2022 17.10 PreviewGetting StartedTo use the new Copilot extension, you’ll need a GitHub Copilot subscription. GitHub Copilot is free for verified students and for maintainers of popular open-source projects on GitHub. If you’re not a student or a maintainer of a popular open-source project, you can try GitHub Copilot for free with a one-time 30-day trial. After the free trial, a paid subscription is required for continued use.

Once you have Copilot installed, you can easily sign in and manage your Copilot directly from the top right corner of the title bar in Visual Studio 17.10.

Using CopilotCode CompletionsStart writing in the editor and Copilot will suggest code as you type.Tip: press "tab" to accept a suggestion.https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2024/03/Completions-for-blog-1.mp4Inline ChatUse Inline Chat will help you write your methods, classes, unit tests by converting your prompts to code. Open Inline by right-clicking in your text file and selecting “Ask Copilot” or `Alt + /``

Tip: Use"/" to state your intent or "#" to refer to your files(s). Like "/test for #filename"

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2024/03/Recording-2024-01-11-072251.mp4Chat WindowAsk questions about your solution or files. Open from the Copilot Badge or CTRL + /, C.

Tip: Use #solution to refer to your active solution (only for C#) in Visual Studio

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2024/03/solution-wide-view-1.mp4We Value Your FeedbackWe hope you find the new Copilot experience beneficial for your development needs. Your feedback and suggestions for improvement are always welcome. You can reach out to us through this survey or submit for feature requests here: Developer Community (visualstudio.com).

Happy coding!

The post Introducing the new Copilot experience in Visual Studio appeared first on Visual Studio Blog.

View Details

A step-by-step guide to use comments as prompts in GitHub Copilot for Visual Studio

Introduction to GitHub Copilot for Visual StudioGitHub Copilot is a programming assistant that uses AI (Artificial Intelligence) to help you increase efficiency in your daily programming tasks. It is compatible with various IDEs (Integrated Development Environments), text editors, and more. In this series, we will focus on demonstrating how GitHub Copilot can help you become more productive in Visual Studio.

One way to get code suggestions from GitHub Copilot is by leveraging code comments. However, we know sometimes even coming up with a comment can be a little cumbersome.

What is great about GitHub Copilot for Visual Studio is that it is not only capable of suggesting code but can also provide completions for your comments.

In the second short video in this series, my colleague Bruno Capuano will highlight how to use comments to prompt GitHub Copilot to produce code directly within the current file.

Make sure to have GitHub Copilot installed, refer to the documentation to learn how to install GitHub Copilot for Visual Studio

How to use a Comment to Prompt GitHub CopilotLet us start by writing a comment. In the example, Bruno is typing a comment that looks like this:

// function to get the year of birth As we can see in this example, GitHub Copilot quickly springs into action, proposing to complete the comment as follows:

// function to get the year of birth *from the age* This feature can be particularly useful, for example, when you are writing documentation.

(Note: in this example I added stars around the suggested code. In the Visual Studio IDE, the suggestion would appear greyed out).

To accept the comment completion suggestion and incorporate it into your code, simply press the Tab key. Following that, pressing Enter prompts Copilot to offer a code suggestion based off the comment. The suggested code will appear inline and greyed out. You can also accept this suggestion by pressing the Tab key.

Additional examples can be found here in Using GitHub Copilot for code completions and suggestions

Validating the output of GitHub CopilotThe key principle to remember when working with AI assistants is that you should always verify the output. You have the chance to review the Copilot output either before accepting, when the code appears greyed out inline or after you have accepted the suggestion with the Tab key. I frequently accept the suggestion first and then revisit the generated code. If I need to make any changes, I will do so before moving on.

GitHub Copilot is not a compiler!

This means that the code produced by GitHub Copilot can indeed fail to compile and/or be incorrect. It is your responsibility to review, resolve, and improve the suggested code, as necessary.

Disabling GitHub Copilot completionsYou might not always want Copilot to suggest completions in your code files. Deactivating it is straightforward, whether for all code files, or even just for specific files such as markdown or C#. Simply click on the small Copilot icon on the Visual Studio taskbar and then select the appropriate option.

ConclusionNow that you have successfully used a comment to GitHub Copilot in Visual Studio, you can continue to leverage this practice in all your projects. This is just one of the ways that GitHub Copilot can help you write code faster and be more productive. To learn more about GitHub Copilot and how to use it, check our collection with resources here or via our full-length video.

Additional Resources* Code Faster and Better with GitHub Copilot’s New Features: Slash Commands and Context Variables * Announcing the GitHub Extension for Visual Studio

The post How to use Comments to Prompt GitHub Copilot for Visual Studio appeared first on Visual Studio Blog.

View Details

A step-by-step guide to enable the AI-powered coding assistant within Visual Studio

Introduction to GitHub CopilotGitHub Copilot is a new tool that helps you write code faster and smarter with the help of artificial intelligence. It can suggest code completions, generate code snippets, and even write entire functions for you. GitHub Copilot works with a variety of languages and frameworks, and it can learn from your own code and preferences. In the following video short, Bruno Capuano shares how to install GitHub Copilot in Visual Studio. Visual Studio supports many programming languages, such as C#, VB.NET, C++, Python, and more. By installing GitHub Copilot in Visual Studio, you can leverage the power of AI to enhance your coding experience and productivity.

PrerequisitesBefore you can install GitHub Copilot in Visual Studio, you need to have the following:

  • A GitHub account. You can sign up for free at GitHub.com.
  • An active GitHub Copilot subscription (Individual, Business, or Enterprise).
  • Visual Studio 2022 17.6 or later installed.

GitHub Copilot InstallationHow you install GitHub Copilot in Visual Studio is changing. Sarting in the 17.10 in the Preview channel GitHub Copilot is a recommended component that can be installed from the Visual Studio Installer. The instructions below still apply to the 17.9 version of Visual Studio in the release channel.

You can learn all about the upcoming changes to GitHub Copilot in this blog: Introducing the new Copilot experience in Visual Studio – Visual Studio Blog (microsoft.com).

Once you have the prerequisites, you can install GitHub Copilot in Visual Studio by following these steps:

  1. Open Visual Studio and go to the Extensions menu. Select Manage Extensions.
  2. In the Manage Extensions window, search for GitHub Copilot in the online tab. Select the GitHub Copilot extension and click Download.
  3. After the download is complete, close Visual Studio and run the installer for the GitHub Copilot extension. Follow the instructions to complete the installation.
  4. Open Visual Studio again and go to the Tools menu. Select Options.
  5. In the Options window, go to the GitHub Copilot tab. Click Sign in with GitHub and authorize the extension to access your GitHub account.
  6. After you sign in, you can start using GitHub Copilot in Visual Studio. You can access the Copilot panel from the View menu or by pressing Ctrl+Alt+C.

What is the difference between GitHub Copilot and GitHub Copilot Chat?GitHub Copilot and GitHub Copilot Chat are both AI-powered tools designed to assist developers, but they serve different purposes and are used in different contexts:

  • GitHub Copilot harnesses AI to help you write code faster and with fewer errors by providing suggestions for whole lines or blocks of code directly within supported integrated development environments (IDEs) like Visual Studio.
  • GitHub Copilot Chat is a chat interface that allows you to interact with GitHub Copilot in a conversational manner. You can ask coding-related questions and receive answers within GitHub.com and supported IDEs like Visual Studio and is useful for getting explanations, generating code snippets, and understanding best practices.

GitHub Copilot focuses on code completion within IDEs like Visual Studio, while GitHub Copilot Chat provides a conversational interface for coding assistance and explanations. Both aim to enhance developer productivity but do so through different interfaces and interactions with the user.

ConclusionNow that you have successfully installed GitHub Copilot in Visual Studio, you can now enjoy the benefits of AI-powered coding assistance. GitHub Copilot can help you write code faster and you can also learn from the suggestions and examples that GitHub Copilot provides. To learn more about GitHub Copilot and how to use it, check our collection with resources here or via our full-length video.

Additional Resources

  • Code Faster and Better with GitHub Copilot’s New Features: Slash Commands and Context Variables
  • Announcing the GitHub Extension for Visual Studio

The post How to Install GitHub Copilot in Visual Studio appeared first on Visual Studio Blog.

View Details

Visual Studio LIVE! Chicago 2024

April 29 – May 3 | Swissôtel, Chicago

Join us for Visual Studio LIVE! Chicago for a focused, deep dive into the latest .NET Microsoft Platform developments. You pick the package you want, 3, 4 or all 5 days! This year, we’re at the Swissôtel Chicago, with sessions covering Microsoft Visual Studio 2022, .NET 8, Azure, DevOps, Generative AI (GitHub Copilot and more), MAUI, JavaScript, TypeScript, Blazor, modern data processing, and more.

Why Attend?

  • Relevant Keynotes by Microsoft Visionaries:
    • Zero to Cloud Hero with Visual Studio (04/30): Tim Heuer and Scott Hunter will show how Visual Studio and .NET 8 can expedite your cloud development journey.
    • Developing Modern Data Applications Using AI with Azure Databases (05/01): Justine Cocchi, Davide Mauri, and Bob Ward will explore building AI-driven applications using Azure Databases.
  • Comprehensive Learning: From seasoned developers to software architects and engineers, enrich your skills with the latest in technology and software development.
  • Live Experience: Move beyond the digital and engage directly with leading experts and peers in a live, interactive setting.
  • Broad Learning Opportunity: Over 70 sessions and more than 30 speakers, including 11 from Microsoft and GitHub, are planned.
  • Networking: Meet and exchange ideas with fellow Visual Studio developers. Enhance your skills in Visual Studio, GitHub, Azure Data, and more.

Special Offer for Blog Readers:

Use the priority code “MSCHI” to receive a $900 discount off the standard rate for the 5-day, and 4-day packages. Discount are reflected on the bottom of the 2nd registration step. This is their best discount and offers a remarkable opportunity for you to join us at a reduced cost. Act quickly—our room block is rapidly filling up!

VS LIVE! Chicago is where learning meets application—join us to sharpen your skills and connect with the community. There are several resources available to help you decide if you want to attend or send members of your developer team including: Event Details, Sessions, Speakers & Email your boss.

We’re excited to collaborate with VS LIVE! to present this array of events and seminars designed to maximize your proficiency with Visual Studio, GitHub, and Azure. This partnership underscores our commitment to supporting the developer community’s growth and success. We eagerly anticipate welcoming many of you to Chicago at the end of April. Together, let’s make this an unforgettable experience of learning, networking, and innovation. Have questions? Ask here.

The post In 4 Weeks: Visual Studio LIVE! Chicago 2024 appeared first on Visual Studio Blog.

View Details

MSBuild is a fundamental part of the .NET development experience, but it can be challenging to new and experienced developers alike. To help developers better understand their project files and access advanced functionality that requires editing the project file directly, we’re releasing an experimental MSBuild editor that has a much richer understanding of MSBuild files than the current XML schema allows. Based on feedback, we hope to make it available by default to all .NET developers. If you work with MSBuild files at all, please try it and let us know how it goes.

Who is this for?Although Visual Studio provides a rich UI for managing your project and its settings, you may need to edit your csproj file directly to access certain advanced features that are not exposed in the UI. You may also need to edit csproj files directly when merging changes from source control, or you may be writing targets and props files for local use or for publishing in a NuGet package. If any of these scenarios apply to you, we’d like your feedback on the new experience.

Understand your project fileThe new MSBuild editor provides Quick Info not just for XML elements in MSBuild files, but also for properties, items and metadata in MSBuild expressions. The Quick Info popup is richer, and has deep links to relevant documentation, as well as hyperlinks to references in other files that may help you understand how that property or item is used by the underlying targets.

If you’d like to understand how a property or item is used, you can use Ctrl-Click or the Go to Definition command to go to where it’s defined. You can also use the Find References command to perform a precise search across all imported files:

Code without leaving the editorEven as an experienced MSBuild author, I often used to open the documentation to find the exact names and allowed values of MSBuild properties, items and metadata. I do that far less when using the MSBuild editor, as it provides IntelliSense almost everywhere in the file, with documentation powered by its schemas:

It has special support for NuGet packages, allowing you to search for the package ID, and see the package description and a link to its NuGet.org page:

Other types also have special handling, for example culture names:

And there is IntelliSense within MSBuild expressions, including property functions and item functions:

The editor isn’t limited to those properties and items defined in its schemas. It scans all imported MSBuild files, and provides inferred completion for any properties, items, metadata and targets it finds in those files as well. Even better, the tooltip has a hyperlink to the property or item is used in:

Catch problems earlyThe MSBuild Editor’s validations go beyond just XML validation. It overlays a type system onto MSBuild, so you will get errors about malformed values such as URLs or version strings. Its understanding of the MSBuild expression format means you can catch malformed conditions and expressions without having to run your build.

There are even a few Roslyn-style analyzers and code fixes.

Enhance the MSBuild editing experienceThe MSBuild Editor is powered by a new MSBuild-specific json-based schema format that allows defining documentation and type annotations for MSBuild properties, items, item metadata, and targets. It includes built-in schemas for the .NET SDK and other commonly used targets and SDKs.

However, you can also write schemas for your own MSBuild targets to allow the MSBuild editor to provide a richer experience when editing or consuming them. If you’re an author of a NuGet package that contains build targets, you can ship that sidecar schema in the NuGet package to provide a better MSBuild editing experience for consumers of your package.

Q&AQ. The extension has a GitHub repository – can I build from source and contribute?

A. Absolutely! Just clone the repository and its submodules, open in Visual Studio, and hit F5.

Q. Why do the extension repository, namespaces and assemblies have “MonoDevelop” in the name?

A. MSBuild Editor is a descendant of an extension I originally created for the MonoDevelop IDE in March 2015. Although it evolved a lot over the years, including porting to Visual Studio, I kept the internal name for nostalgia’s sake.

Q. Can I use the extension in Visual Studio Code?

A. Not yet! I’m currently porting the extension to LSP (Language Server Protocol) so it can be used in a Visual Studio Code extension. While LSP would be the obvious choice for a new extension, this codebase goes back to before Visual Studio Code was released.

We want your feedback!If you’d like to give the extension a spin, you can find it by searching for “MSBuild Editor” from within Visual Studio extension manager or download it from the Visual Studio Marketplace. The extension is currently only available for Visual Studio, but work is in progress on porting it to Visual Studio Code.

If you run into any problems with the extension, please post them on its GitHub issues page. The extension is open source and contributions are welcome. Please also let us know about your experience by filling out this survey. We appreciate your feedback, and it will help guide how the experiment develops and whether the MSBuild Editor becomes an officially supported part of the .NET development experience.

The post A new MSBuild editing experience appeared first on Visual Studio Blog.

View Details

We just shipped preview support for viewing your GitHub and Azure DevOps pull request comments directly in your working file in Visual Studio in 17.10 Preview 2. As one of the most highly requested Git tooling feature suggestions on Developer Community, we need your help to make sure we’re on the right track!

Download the Latest Visual Studio Preview and let us know what you think!

Get Started with Pull Request Comments1. Make sure you’re on version 17.10 Preview 2 or later and have logged in with your GitHub or Azure DevOps account in Visual Studio. You may need to enable the feature in Tools > Options > Preview Features > Pull Request Comments. 2. Checkout a branch that has an active pull request on it and wait a moment for the “Show comments in files” infobar. Or choose Git in the top-level menu > GitHub or Azure DevOps > Show Comments in Files * 3. You’ll now be able to see your comments in the active file and navigate between them from the comment itself or the toolbar. * * * Please note, you cannot view deleted files or any file types that are not supported by Visual Studio Solution Explorer. Additionally, we’re tracking a known bug where @mentions in comments render the id guid instead of the users’ name.

Request for Your FeedbackThis preview release is just the first step towards all the suggestions in the Developer Community ticket, and we need your feedback to continue to drive this forward. Some future steps to look forward to:

  • Viewing the comments in a diff view
  • Adding comments and managing a review
  • Navigating comments via a list that supports search and filter

Please share your thoughts on the feature, and what you’re looking forward to the most in this survey.

Take the SurveyKeep in TouchWe appreciate the time you’ve spent reporting issues/suggestions! Please continue to give us feedback on what you like and where to improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community. Report any bugs or issues via report a problem and share your feature suggestions.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

The post See Your Pull Request Comments with the Latest Preview appeared first on Visual Studio Blog.

View Details

We are thrilled to announce the launch of SQL Server Data Tools (SSDT) for Visual Studio in ARM64. This enhancement comes with the exciting release version 17.10 Preview 2. Release of SSDT for Visual Studio on arm64 adds SQL development to the capabilities of Visual Studio on arm64. This latest development brings a host of features tailored to enhance your database development experience on ARM64 devices.

Download Visual Studio PreviewKey Features: * SQL Projects (Open, Build, Publish): Dive into your SQL projects seamlessly with the ability to open an existing project, and build and publish projects directly from Visual Studio on ARM64. * Schema Compare: Ensure data consistency and easily identify changes with the schema compare feature, allowing you to visualize and synchronize schema differences effortlessly. * Data Compare: Facilitate swift and accurate comparison of data between databases. * Query Editor: Craft and fine-tune your SQL queries directly in Visual Studio with the intuitive query editor optimized for ARM64 architecture. Use GitHub Copilot to assist you in your database development by translating natural language into T-SQL code. * Table Designer: Design and modify tables using the table designer GUI, offering a user-friendly interface for creating and managing database tables. * Database Properties Editor: Tailor your database settings using the database properties editor, allowing you to configure various aspects of your database. * Object Refactoring: Streamline database development process with object refactoring capabilities, enabling you to efficiently reorganize and optimize your database schema.

Feature List

| Feature | SSDT in AMD64 | SSDT in ARM64 | | --- | --- | --- | | Opening a SQL Project | | | | Building a Project | | | | Publishing a Project | | | | Schema Compare | | | | Data Compare | | | | Query Editor | | | | Table Designer | | | | Database Properties Editor | | | | Object Refactoring | | | | SQL Server Object Explorer | | | | Development using localdb | | | | IntelliSense in Query Editor* | | | | Debugger | | |

Steps for Installing SSDT in VS for ARM641. Download the Visual Studio Installer from Download Visual Studio Tools – Install Free for Windows, Mac, Linux (microsoft.com) 2. In the Available options, find 17.10.0 Preview 2. (Enterprise / Community / Professional) 3. Click on the Installation button, which opens the Installation dialogue box for 17.10.0 Preview 2. Go to Individual Components and search for SQL. 4. Select SQL Server Data Tools. It would automatically select all the SQL components. 5. Select the other components / workloads as necessary and click on Install. 6. Open Visual Studio and create SQL Server Database Project.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2024/03/ARM64-install.mp4Conclusion With the launch of SSDT for ARM64 architecture in Visual Studio 17.10 Preview 2, we aim to provide a robust environment for SQL Server database development. Explore the exciting features now available and stay tuned for upcoming releases.

UpdateWe have added the IntelliSense feature in the query editor in Visual Studio 17.10 Preview 3 (ARM64).*

Get started today by downloading:

Your feedback is super important to us, please share any feedback related to SSDT at https://aka.ms/ssdt-feedback .

We appreciate the time you’ve spent reporting issues/suggestions and hope you continue to give us feedback when using Visual Studio on what you like and what we can improve. Your feedback is critical to help us make Visual Studio the best tool it can be! You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.  

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn. 

The post Announcing SQL Server Data Tools (SSDT) for ARM64 Architecture in Visual Studio 17.10 Preview 2 appeared first on Visual Studio Blog.

View Details

Join us on Wednesday, March 20th, 2024, at this year’s Game Developers Conference in San Francisco for a special session on using Visual Studio and GitHub Copilot. In this session, you will learn how to leverage these tools to increase your productivity and modernize your game development workflow.

David Li, Visual Studio Game Developer Product Manager, and Greg Denton, Principal Product Manager at Xbox, will showcase the latest features made for game dev, including Unreal Engine integrations to see Blueprint references, tools to help you optimize build times, and useful design time features such as Memory Layout view. See firsthand how GitHub Copilot can become your AI-powered pair programmer that allows you to free up your creativity, regardless of your source control system.

To learn more about Copilot, visit https://aka.ms/CppCopilot. To learn more about the latest Visual Studio 2022 game dev features, visit https://aka.ms/VSYearInReview23.

The post Visual Studio and GitHub Copilot at GDC 2024 appeared first on Visual Studio Blog.

View Details

In today’s world, it is imperative for IT administrators and organizations to manage security effectively and embrace security best practices. One common best practice involves implementing appropriate permission levels to ensure that only authorized accounts can access sensitive data and functionality.

The post Balancing User Updates with Security Best Practices appeared first on Visual Studio Blog.

View Details

Visual Studio has been supporting external sources debugging and decompilation for some time now. However, with the release of Visual Studio 17.6, the debugger took a significant leap forward by introducing Auto-decompilation for .NET libraries making the external code debugging in Visual Studio much more streamlined and effortless. Its integrated decompiler, it decompiles external code in real-time and seamlessly incorporates it into the debugger as needed.

In this article, we’ll investigate the Auto-decompilation feature of Visual Studio, highlighting its significance in debugging and engineering external code.

Exploring Auto-decompilation and Its Inner WorkingsVisual Studio’s debugger leverages the ILspy decompiler engine. It helps to transform compiled binary code (machine code) back into a higher-level programming language, such as C#. This means developers can examine, troubleshoot, and fix issues in the external code with ease, as if they’re working with their own code.

Imagine Auto-decompilation as a backup plan for Visual Studio’s debugger when it comes to External Source code: it first searches for local external sources on your machine, then uses Source Link or Source Server info from PDB files to load the source code. If all else fails, the debugger decompiles the code for presentation.

While the auto-decompilation feature in Visual Studio boosts productivity for debugging, .NET package authors have total control over whether they want their work decompiled. This can be accomplished by implementing the SuppressIldasmAttribute attribute within an assembly or module, effectively preventing Visual Studio from initiating the decompilation process. Although the attribute is obsolete in .NET 6+, Visual Studio honors the attribute.

Even the best things have certain limitations. It’s not uncommon to encounter restrictions when trying to decompile .NET assemblies to gain insights. If you’d like to learn more about these please see Decompile .NET code while debugging – Visual Studio (Windows) | Microsoft Learn.

Leveraging Auto-decompilation for External CodeRemember the days when loading external code in Visual Studio was a bit like solving a puzzle? You had to manually figure out how to do it from the “No Source Page “. But now, with Auto-decompilation, the debugger does the thinking for you. You can focus on perfecting your code, and the debugger ensures you have the external code pieces you need, right where they should be in the solution explorer.

Now let’s see the ways we can make the most of decompilation scenarios to boost our efficiency and productivity.

To illustrate this, let’s consider this trivial WPF application. I want to direct your attention to the call stack window located at the bottom. Currently, the call stack within this window is originating only from my local code related to the highlighted line 29 from my code.

Now, here’s where the exciting part comes in. Up at the top menu of the call stack, you will see an option labeled “show external code.” When this option is selected, the call stack will reveal not just my local code stacks but external code components as well. This external code here is mainly the framework code like PresentationCore.dll , WindowsBase.dll etc.

As I click through these call stacks from external code it’s automatically decompiling it for me in a split second. The decompiled code, although not identical to the original source, still offers insights into how various functions and components work.

Navigating and debugging through external codeContinuing our journey, this process goes beyond its initial capabilities. Let’s shift our focus to the solution explorer, where a special node called “External Sources” stands out at the very top when you are in debug mode.

This node acts as a virtual file browser, neatly organizing decompiled external code modules from different call stacks.

This setup allows me to investigate these external modules and inspect specific sections of code. I can take another significant step forward by placing breakpoints within this external code. This means that, if necessary, I can pause the code’s execution at specific points, just like I would with my own code making the external code debugging as seamless as possible.

For instance, In my WPF app, I use my “MessageLibrary” to show notifications when clicking a button. As shown in the video below, I can smoothly move through the external code, like how I’d work with my own code in the solution explorer. If necessary, I can also set breakpoints and debug through these files.

This is especially handy when you’re working with an app that relies heavily on external packages and DLLs. Imagine you’re dealing with a tough bug, and it might be hidden within those external parts. In such cases, having insight into these external pieces becomes a game-changer for effective debugging.

Auto-decompilation is quite useful and can boost your efficiency. But, if for any reason you want to turn off this automatic feature, you can easily do that through the settings option Debug > General> Automatically decompile to source when needed. (Managed only)

ConclusionTo sum it up, the introduction of Auto-decompilation in Visual Studio has completely changed the way we debug external code. We’re really curious to know what you think about this new experience. If you have any thoughts or suggestions, please share them with us on the Developer Community site. Your input is highly valuable to us!

The post Elevating Debugging with Auto-decompilation and External Sources appeared first on Visual Studio Blog.

View Details

The Visual Studio search experience is getting a new feature that allows users to find and replace text without having to worry about different casings. For example, a method parameter catalogItemId and object property CatalogItemId have the same name but different capitalization but should both be replaced by something like ‘productId’ with their respective casings. 

The post Keep your casing with Case-preserving Find and Replace appeared first on Visual Studio Blog.

View Details

Today we are announcing the retirement of the Visual Studio for Mac IDE. Visual Studio for Mac 17.6 will continue to be supported for another 12 months, until August 31st, 2024, with servicing updates for security issues and updated platforms from Apple.

The post Visual Studio for Mac Retirement Announcement appeared first on Visual Studio Blog.

View Details

Do you like watching videos to learn about new and existing Visual Studio features?  Then you should check out the Visual Studio Toolbox show!  Available on both Learn and YouTube, Visual Studio Toolbox is a show that helps you become a more productive developer in VS by highlighting tooling within the IDE and the wider Visual Studio family. 

The post Learn about new and old VS tools on Visual Studio Toolbox! appeared first on Visual Studio Blog.

View Details

Any web, desktop, or mobile developer works with images often. You reference them from C#, HTML, XAML, CSS, C++, TypeScript, and even in code comments. Some images are local, and some exist online or on network shares, while others only exist as base64 encoded strings.

The post Working with images just got easier in Visual Studio appeared first on Visual Studio Blog.

View Details

In the 17.8 Preview 1 version of Visual Studio 2022 we have updated the HTTP file editor in to enable you to externalize variables to make testing your Web APIs across different environments easier. This update also includes support to handle secrets in a secure fashion.

The post Safely use secrets in HTTP requests in Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

This March, we announced GitHub Copilot chat for Visual Studio 2022. With Chat, Copilot has moved beyond code completions, offering in-depth analysis and explanations of how code works. It supports the generation of unit tests, and even helps with proposed fixes to bugs,

The post Simplified Code Refinement and Debugging with GitHub Copilot Chat appeared first on Visual Studio Blog.

View Details

Comparing code in different files is a common need for developers, yet it often disrupts the flow of your work. We’ve heard your feedback and are excited to introduce a new compare feature in Visual Studio. This feature enables you to compare code files directly within the Solution Explorer,

The post New in Visual Studio: Compare Files with Solution Explorer appeared first on Visual Studio Blog.

View Details

The power of version control comes alive when you can visualize your Git operations with the new multi-branch graph, available in 17.7 GA. In response to your feedback, we’ve delivered an improved graph experience. Track all the branches, commits, and merges that arise in your git workflows by viewing multiple branches at the same time.

The post Multi-Branch Graph Available for General Audiences appeared first on Visual Studio Blog.

View Details

In Visual Studio 2022 v17.7, we are excited to bring you a multitude of performance tune-ups, productivity enhancements, and Unreal Engine integrations for C++ game development. In this blog post, you will learn how to take advantage of these new improvements whether you use Unreal Engine or a proprietary game engine.

The post Unleashing the Power of Visual Studio 2022 for C++ Game Development appeared first on Visual Studio Blog.

View Details

Two of my favorite features in Visual Studio happen to share a similar origin story. They were both created in deep collaboration with you, the user, and went through multiple iterations before you gave your final thumbs up. This is the story of how they came to be and why they are my favorites.

The post My favorite features in Visual Studio 17.7 appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 17.7 introduces a set of exciting performance improvements that cater to key areas like F5 Speed, Enhanced Light Bulb Performance in C#, improved memory consumption in C# spell checker, C++ Unreal Engine – IntelliSense optimization, Solution Explorer, Find in Files and much more. 

The post Visual Studio 2022 – 17.7 Performance Enhancements appeared first on Visual Studio Blog.

View Details

We want to celebrate the suggestions you’ve made and the time you have invested in giving feedback to help build Visual Studio. We’re thrilled to announce that Visual Studio 2022 17.7, which began with Preview 1 on May 16th, is now officially out of Preview and generally available!

The post Let’s Co-Create! Your Voice Matters  appeared first on Visual Studio Blog.

View Details



Hot on the heels of the General Availability of Visual Studio v17.7, (Visual Studio 2022 – 17.7 Now Available) we’re thrilled to introduce the next set of enhancements that aim to streamline your workflow and boost your productivity.

In this preview,

The post Visual Studio 2022 17.8 Preview 1 has arrived! appeared first on Visual Studio Blog.

View Details

We’re delighted to announce the General Availability (GA) of Visual Studio 2022 version 17.7 today. This release is a testament to our continued commitment to creating an enriched developer experience, powered by community feedback, and driven by the needs of the diverse developer landscape.

The post Visual Studio 2022 – 17.7 Now Available appeared first on Visual Studio Blog.

View Details

Today we are thrilled to announce a preview of the Unity extension for Visual Studio Code.

Remember when we launched the first preview of C# Dev Kit this past June? It delivers an editor-centric approach that elevates your C# development in Visual Studio Code with great features including a native Test Explorer,

The post Announcing the Unity extension for Visual Studio Code appeared first on Visual Studio Blog.

View Details

We’re excited to announce that you can now subscribe to the Visual Studio blog via email! By subscribing, you’ll get the latest updates on Visual Studio delivered straight to your inbox. And let’s be honest, who doesn’t love getting fun and exciting emails?

The post Subscribe to the Visual Studio Blog via email appeared first on Visual Studio Blog.

View Details

In Visual Studio 2022 17.6 and 17.7 we added a ton of new features in Parallel Stack Window that can take your multithreaded debugging to the next level.

But what can the Parallel Stack Window do for you? The answer is simple –

The post Rock Your Debugging Game: Parallel Stack Window Tips You Need to Know! appeared first on Visual Studio Blog.

View Details

When you have lots of tabs open in Visual Studio, your horizontal screen resolution determines how many will fit the Tab Well. The remaining document tabs won’t be shown unless you enable multi-row tabs. But what if you don’t want to lose the coding space multi-row tabs take up,

The post Too many tabs open? No problem! appeared first on Visual Studio Blog.

View Details

The Visual Studio Marketplace is filled with incredible extensions that let you customize your IDE, boost your productivity, and integrate with your other development tools. We’ve heard feedback from developers like you that it can be difficult to find important information like ratings and full-length descriptions when browsing the Marketplace with the Extension Manager.

The post Introducing a powerful new Extension Manager appeared first on Visual Studio Blog.

View Details

Last month, we released the first preview of C# Dev Kit, a lightweight, editor-first experience that augments your C# development in Visual Studio Code with a Solution Explorer, native Test Explorer, AI-powered code authoring, and more.

Today, we’re excited to announce the first preview of the .NET MAUI extension,

The post Announcing the .NET MAUI extension for Visual Studio Code appeared first on Visual Studio Blog.

View Details

Today, we’re excited to announce that Microsoft Dev Box is now generally available. Below we’ll highlight a few significant features of Dev Box for Visual Studio users. Read the announcement blog to learn more about our journey to Microsoft Dev Box and what the service means for Visual Studio subscribers.

The post Get the most from Visual Studio with Microsoft Dev Box–now generally available appeared first on Visual Studio Blog.

View Details

The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling in and out of Visual Studio.  Our latest episode of VS Toolbox (available both on Learn and YouTube) features Drew Noakes from the .NET team.

The post Visual Studio Toolbox: Accelerate your builds of SDK-style .NET projects appeared first on Visual Studio Blog.

View Details

We heard from you that you can do 90% of your development workflow in Visual Studio, but then need to rely on the web to create your pull requests. We’re continually bringing productivity enhancements to Visual Studio and are excited to announce that as of 17.7 preview 2 release.

The post Announcing Create a Pull Request in Visual Studio appeared first on Visual Studio Blog.

View Details

Visual Studio global policies are now included in the Microsoft Endpoint Manager (Intune) settings catalog! It’s easier for administrators to configure their organization’s devices now that the Visual Studio software policies are readily accessible in the Device Configuration Profile UI.

A few months ago,

The post Configure Visual Studio policies using Microsoft Endpoint Manager (Intune) appeared first on Visual Studio Blog.

View Details



Welcome to the Public Preview 2 of Visual Studio version 17.7! Hot on the heels of our recent Preview 1, we’re thrilled to roll out another collection of upgrades tailored to empower developers like you. Preview 2 pushes the boundaries further,

The post Visual Studio 2022 17.7 Preview 2 is here! appeared first on Visual Studio Blog.

View Details

We’re happy to announce that starting with Visual Studio 2022 version 17.6, Visual Studio layouts are available to install from an internal intranet website! 

Enterprise customers have long been able to download a particular version of Visual Studio, host it on a private network file share,

The post Installing Visual Studio from an Internal Website appeared first on Visual Studio Blog.

View Details

TL:DR GitHub Copilot and Visual Studio’s built-in AI assistance features are now better together. With the latest version of GitHub Copilot, changing your selection in Visual Studio’s IntelliSense list steers the GitHub Copilot with additional context about your code, so you can easily explore the single and multi-line code completions to get just the code you need.

The post Visual Studio’s IntelliSense list can now steer GitHub Copilot code completions. appeared first on Visual Studio Blog.

View Details

We are thrilled to announce the preview release of C# Dev Kit, a new Visual Studio Code extension that brings an improved editor-first C# development experience to Linux, macOS, and Windows.

The C# Dev Kit is designed to enhance your C# productivity when you’re working in VS Code.

The post Announcing C# Dev Kit for Visual Studio Code appeared first on Visual Studio Blog.

View Details

We are delighted to announce the new release of SQL Server Developer Tools for Visual Studio 17.6 released on May 16th, 2023. The major focus areas for this release are:

  • Support for Ledger tables
  • Stability improvements with Visual Studio 2022
  • Performance improvements
  • Github Copilot

SQL Server Developer Tools (SSDT) is a database tool within Visual Studio that lets users develop, build, test and publish their databases from a source-controlled project. It lets the users start from scratch with a new Database Project or import an existing database with a few clicks. SSDT is not available as a standalone installer but comes in the package with Visual Studio.

Download SSDTWe have added support to SQL Server 2022 from SSDT version 17.5 and with 17.6, we have brought the advanced functionalities that are provided by SQL Server 2022.

Ledger in SQL Server for SSDTUsing ledger, the data in SQL is verifiable using the same integrity benefits seen in blockchain technology, while keeping the flexibility, efficiency, and performance of a traditional database. The data is centrally managed, and you can cryptographically attest to other parties, such as auditors or other business parties, that your data is trusted and isn’t tampered with.

Ledger tables can be used to streamline audits since they provide cryptographic proof of data integrity to auditors. It also provides nonrepudiation regarding the integrity of the system’s data. Ledger tables can also find its applications in Multiple-party business processes. We are adding Ledger functionality in SSDT like in Azure Data Studio and SSMS.

The use cases of Ledger provided in SSDT are as follows:

Viewing Ledger Tables & Views in SQL Server Object Explorer (Object Explorer)If you have created ledger tables using applications like SSMS or Azure Data Studio and want to import the Ledger tables into SSDT, then this capability is supported in SSDT. You can connect to these databases and view the ledger tables from the object explorer in SSDT. The tables would be visible in the Object Explorer with a unique icon distinguishing the ledger table from others.

Creating Ledger Tables, Views from Object ExplorerLedger Tables can be created by right-clicking on the Tables option in Object Explorer.

Creating a sqlproj with Ledger TablesLedger tables can be added from the Solution Explorer as a New Item in a Project. The target platform needs to be set to SQL Server 2022* or Azure SQL Database or Azure SQL MI*** to make the ledger options available.

Build and publish the ledger tables to a SQL Database.A SQL project containing ledger tables can be build and published to an existing or new database in the same way you publish a regular database.

The Enable Ledger checkbox enables the ledger functionality at the database level. This will make all tables in this database updatable ledger tables (unless the append only option is enabled for a table). This option cannot be changed after the database is created. If you do not select this option now, you can still create ledger tables (updatable or append-only) using T-SQL. After enabling the ledger functionality for a table, you cannot disable it. If a SQL project is to be published to an existing database, this setting needs to match the one in the existing database.

Other EnhancementsSome of the other mentionable enhancements that were made are as follows:

  • We have initiated Direct API calls to MS.Build to facilitate faster build of the process.
  • We have made performance improvements in the Editor and SSDT

Github CopilotSSDT in Visual Studio also supports Github copilot and you can get assistance while writing your SQL codes in our editor. Support for In-line prompt is also available. As the copilot evolves, we wish to see how it revolutionizes the way database development works.

In addition to those updates, recent advances to Visual Studio have improved git merge dialog, and enhanced code search.

Github Copilot for SQL in SSDT

Github Copilot for SQL in SSDTThe Road AheadWith enhanced security and accountability using ledger and improvements in the latest release and many more to come, we encourage you to download Visual Studio 2022, and use SSDT for your database development. Your feedback is always appreciated and can be filed using the guidelines mentioned in the Visual Studio feedback hub.

The post What’s New in SSDT 17.6: Ledger, Performance, Copilot appeared first on Visual Studio Blog.

View Details

One of Visual Studio’s goals is to help you quickly ‘get to code.’ We’ve recently experimented with Welcome Experience in Preview that helps you get to the code and tasks that you care about, right within the Visual Studio shell. Take a look at the original Welcome Experience design and its motivations in the previous blog post. Developers like you shared a lot of great feedback for that experience, so we’ve iterated once more. Read on to learn about the design and functionality changes we made to the Welcome Experience. To give this experience a try, please install the latest Visual Studio Preview build:

Download PreviewOne of the main issues that many of you pointed out in the original Welcome Experience was how the design felt empty or small for developers with larger screens. We’ve addressed this by designing a layout that uses more horizontal space for larger screens, and we’ve made the elements more space-efficient by adjusting margins and removing one of the headers. This means that the design is now responsive, so the elements will stack nicely on a small screen too.

We’ve also received feedback that the “Most Recently Used” (MRU) section of Visual Studio no longer meets the needs of modern developers. Some developers had over 50 items on the list, while others had items that had been deleted from disk. Now, you can remove individual items, missing items, or all items from the list. This means that your Welcome experience will only show you the most useful information, and it will always be up to date.

Let us know what you think!We understand that your Welcome impacts how you begin your workflow, and we’re excited to hear your thoughts on this new Welcome. If you’d like to give it a try, download the latest Visual Studio Preview today and let us know what you think on this Developer Community ticket!

The post Iterating on your Welcome Experience feedback appeared first on Visual Studio Blog.

View Details

Boost your developer journey by easily creating front ends for your web APIs.

Low-code tooling is becoming increasingly popular among developers because it allows them to create applications faster and with less code. In Visual Studio 2022 17.6 preview 2, you can now connect to the Microsoft Power Platform via connected services and create custom connectors based on your ASP.NET web API. You can download the latest preview at Visual Studio Preview.

In today’s blog post, we will cover prerequisites, how to create the custom connector from within Visual Studio and how to quickly build a front-end using Microsoft Power Apps.

Prerequisites* Visual Studio 2022 version 17.6 Preview 2 or later with the ASP.NET and web development workload installed. You need to be signed into Visual Studio to create and use dev tunnels. The feature isn’t available in Visual Studio for Mac. * An ASP.NET Core Web API project * A Microsoft Power Platform environment. More information: Create a developer environment.

How-to create a custom connector for Microsoft Power Platform1. For our connection to work, we will have to use or create an NET Web API project in Visual Studio. For my example, I am using the generic ASP.NET Web API weather template: 2. In Solution Explorer double click on Connected Services and click on + in Service Dependencies. 3. Next, I am adding Microsoft Power Platform as a Connected Services. The connection will ask you to define the following configurations: * + Select a Power Platform environment. Note: If you don’t have a Power Platform environment available, you can easily create a developer environment to get started with. + Select or create a new custom connector + Create or select a dev tunnel with the following configurations: - Tunnel type: Persistent - Access type: Public

Note: Visual Studio leverages dev tunnels feature to expose your local running API to a public endpoint. It means you can use Power Apps with your API running in your local environment.

After you hit the Finish Button, you are now Connected to the Microsoft Power Platform. As soon as you hit F5 or the Play Button, a custom connector will be created in the Power Platform environment you selected earlier. Go to Microsoft Power Apps to see your custom connector and create a front end.

Note: As soon as you close the solution and reopen it, you should enable the tunnel again.

Create a mobile app by using Power Apps and integrate with your ASP.NET web APIWith your web API running locally, you are now able to quickly create a Power App using Microsoft Power Apps:

  1. Open Microsoft Power Apps and select your environment where you created your custom connector in:
  2. Next, we will + Create a new Blank Canvas App and select Phone as our layout.
  3. Then, we will add our custom connector to our Power App via the Add data button and search for our custom connector name.
  4. We will continue by inserting a Button. In the menu, select Insert > Button. Drag and drop the button to the bottom of the form. Change the Text to Load Data.
  5. Add the following formula to the OnSelect property:ClearCollect(weatherCollection, WeatherSample_Connector.GetWeatherForecast())
  6. In the menu, select Insert Vertical Gallery. Select the weatherCollection as the data source. Change the layout to title and subtitle.

Run the app and you are now able to see the results while running your web API locally. Once the web API is running in your development environment, you can debug in real time and even Hot Reload your code.

What’s next?For detailed documentation, check out Visual Studio connected service (preview) – Power Platform | Microsoft Learn and Create a canvas app front end for your ASP.NET web API (preview) – Power Platform | Microsoft Learn. In the future, we will work on an integration with your CI/CD pipeline and Azure API Management. Let us know if you have any feedback or future support requests.

FeedbackMost of the updates that we will deliver in the future will be inspired by feedback. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

You can also leave a comment here or reach out to ppdevtools@microsoft.com. Or you can reach out to Julia on LinkedIn @jukasper.

Happy coding.

The post Create a Microsoft Power App for your ASP.NET Core Web API appeared first on Visual Studio Blog.

View Details

In a hybrid and cloud-based world, we want to make it easy for you to configure Visual Studio to your preferences whether you’re working on a laptop from home, on your desktop in the office, or using a Dev Box or Azure VM. Unified Settings reimagines how you personalize your IDE with a modern UI that reacts to changes immediately, has portable storage, and offers full control over what is shared between different project workspaces and Visual Studio installations.

Unified Settings helps you set up your environment with both individual and team/workspace settings in Visual Studio. The settings sync to the cloud, so that setting up a new environment can take minutes, not hours. You’ll have access to all your settings in a JSON file in case you want to review or share with a team mate. We’ve created a new Developer Community Ticket detailing the current prototype video as well as open questions, and we invite you to share your feedback as we iterate. We look forward to incorporating your feedback into the design and development process.

An optimal environment is personalized with both individual preferences like colors and themes, custom tabs, keyboard shortcuts, and extensions, as well as team preferences like debugger and git settings. Today, we hear about many barriers and pain points to applying settings from developers like you. We’ve learned that this leads to many options never being used or even discovered. Below, we’ll discuss the challenges with today’s Tools Options and how we’re improving that experience with Unified Settings.

Consistency and ApplicabilityToday, each page in Tools Options has its own UI. This results in Tools Options:

  1. Not respecting your theme
  2. Not handling monitor resolution scaling consistently
  3. Often showing UI that looks different for seemingly similar settings, which adds confusion

With Unified Settings, we aim to improve the overall experience by enabling each settings page to respect your theme and offer consistent UI controls that adjust to your monitor resolution.

ScopingWhen you change a setting in Tools Options today, you’ll typically change the behavior for that specific Visual Studio installation. Sometimes, however, you’ll want to control settings around coding conventions, and those are best applied to specific repositories. Many teams use folder-scoped settings, which include .editorconfig and .gitconfig files, but these don’t modify Visual Studio settings.

We’re introducing “scopes” to Unified Settings to bring you more flexibility and control over your environment. Scopes describe the layers of settings which work together to configure your environment based on your context, and any setting may be controlled at either scope.

Visual Studio will offer the following scopes to begin with, where the later scopes override earlier scopes:

| Scope | Description | Typical examples | | User Scope | Applies to all projects and solutions for a given Visual Studio installation. | Generally include personal settings like theme, fonts and colors, and debugging settings. | | Workspace scope | Applies to a specific project or repository. You may choose to commit these to the repository so everyone on a team can have the same settings or keep these private as your own repository settings. If you have a custom theme for a specific project, for example, you might not want to share this in the repository.Note that industry-standard folder-scoped settings like .editorconfig, .gitconfig, and .nugetconfig, will still be supported and respected by Visual Studio. | Might include special debugging preferences, custom tab appearance. |

Sharing and syncing settingsToday, it’s impossible to control which settings sync between different Visual Studio installations and because you can’t export a complete list of settings, when you’re configuring a new installation, you still need to manually update setting that wasn’t sync’d.

With Unified Settings, we’ll make it easier and faster for you to share and export all your Visual Studio settings. Unified Settings are stored in a human-readable JSON file, so you can share settings with a teammate or manually edit settings values. You’ll also be able to choose to sync all or some settings.

DiscoverabilityTools Options has pages upon pages of settings, and the search experience is lacking, so it’s often difficult to find the setting you need. We’ve heard from developers like you that the search experience doesn’t always show full results and the results are difficult to parse.

In Unified Settings, when you search for a term, all search results will be shown in one view. You’ll be able to edit each setting directly in that view. We also changed the way that search works, so that the results will become more accurate.We added a filtering capability so you can view categories of settings that you care about, such as “Performance” and “Accessibility,” even if the setting isn’t normally organized into that category. And once you change a setting, you’ll be able to see which settings have been modified from the default and easily revert them, so that mistakes can’t break your environment.

ConclusionWe have included a video of the current prototype as well as some open questions on this Developer Community item. Please let us know what you think about Unified Settings or if there is a pain point with Tools Options that we have not addressed by participating in the discussion on the Developer Community thread. Thank you!

The post Unified Settings: Share Your Feedback! appeared first on Visual Studio Blog.

View Details

The All-In-One Search experience was first introduced in 17.2 Previews, and we’ve been refining its quality since. The new search merges code and feature search capabilities into one UI, so you can go to one place to find the things you need. Real-time results and a preview of the results speed up the process to get you to the right place. You can learn more from this previous blog post.

Now we’re ready to share it more broadly in the 17.6 release of Visual Studio! We’d appreciate any feedback you can provide on this Developer Community ticket.

The new search experience is gradually rolling out so it may not initially be on for you. To enable this feature, go to: “Tools > Options > Environment > Preview Features > New Visual Studio Search Experience”.

After doing that, and restarting Visual Studio, you’ll now see the new search button appear in the title bar, as shown in the screenshot below.

You can use the button to open search, or just remember Ctrl+T for code search and Ctrl+Q for feature search.

To quickly get a filtered experience, you can type the corresponding prefixes before your query or use the corresponding keyboard shortcuts to open the search with the filter selected.

| Filter | Prefix: Add this before your query. | Keyboard shortcut:Open the search window with the corresponding filter selected. | | files | f: | Ctrl+Shift+T | | types | t: | Ctrl+1, Ctrl+T | | members | m: | Alt+\ |

Download Visual Studio 2022New in 17.6Based on feedback from previews and 17.5, we’ve made some updates to the search experience.

  • Results on 2 lines: Long paths and matches would get cut off, making it hard to compare results. Each result now has more breathing room by taking up 2 lines of space.

  • Preview at bottom: Showing the preview on the right side of the window doesn’t give enough room to see the code. The default preview layout is now set to the bottom, providing ample horizontal room to see each line.

  • Saved size, location, preview state: It’s tedious to change the layout of the search window for each session. The window size, location, and selected preview state (off, right, bottom) persist from the last session of Visual Studio. You can set up the window to fit your work style.

Let us know what you think!Share your ideas and feedback on the new search experience on this Developer Community ticket.

Download Visual Studio 2022The post All-In-One Search available in 17.6 appeared first on Visual Studio Blog.

View Details

Performance has always been one of our key investment areas for developer tooling in Microsoft. We understand that it’s important for developers to have a fast workflow. That’s why we’re excited to share with you the support of Dev Drives in Visual Studio! Dev Drive for Visual Studio has just been released to help you optimize your workflow and increase your productivity. With Dev Drive, you can create a separate volume on your PC that will improve performance for disk-bound operations such as cloning, building, copying files, and package restore. We measured average improvements in these operations around of 25%! Take a look at the documentation here.

A Dev Drive volume uses ReFS instead of NTFS and is optimized specifically for developer workflows. We also recommend turning Windows Defender to “Async” for most scenarios for optimal perf gains.

Dev Drive is currently available for people who are using the Dev Channel for Windows Insiders. To get started with Dev Drive, create a volume using this documentation and clone or move your source folders to it. Depending on your toolchain, see this section for additional configuration recommendations. For example, we recommend moving the NuGet global-packages folder to this volume for optimal perf gains.

One optimization that Dev Drive provides through the ReFS filesystem is Copy-on-Write (CoW) linking, or block cloning. Instead of fully copying a file, CoW creates a metadata reference to the original data on-disk, so that disk space can be saved and less actual data is copied. You can use this capability to speed up your build by configuring your solutions to use the CopyOnWrite extension for MSBuild. Take a look at this blog post for additional details.

In the future, Dev Boxes will come pre-configured to use Dev Drives so that teams who develop in the cloud will realize these perf gains automatically. Dev Boxes are an Azure service that gives developers access to ready-to-code, project-specific developer environments. Learn more about Microsoft Dev Box here.

If you already have a Dev Drive created on your Windows machine, Visual Studio 17.7 will recognize it when you’re creating a new project and pick that filepath by default. So, not only will Dev Drive make your development tasks faster, but it will also streamline your workflow by integrating with Visual Studio.

ConclusionDev Drive is a new feature in Windows that helps you code more and wait less. Give it a try today and see the difference for yourself! Let us know what you think by sharing your feedback in a Developer Community feedback ticket or the Windows feedback hub.

The post Dev Drive for Performance Improvements in Visual Studio and Dev Boxes! appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 17.6 introduces exciting performance enhancements in several key areas. These improvements aim to enhance the overall software development experience by boosting productivity, reducing wait times, and providing a smoother workflow.

The performance enhancements in Visual Studio 2022 17.6 include:

  • Solution Open
  • Solution Close
  • Git File History
  • Git Branch Switches
  • Lightbulb Improvements
  • Performance Profiler stop collection.

You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following instructions on the Update Visual Studio page.

Download VS2022 17.6Solution OpenSignificant enhancements have been made to Solution-Open performance and Solution Filters, particularly for larger projects. Testing with the Chromium repository, which consists of 11000 projects, showed a remarkable 8x faster cached project load time, saving 3.5 minutes in Solution Load time. The cached Chromium solution now loads in approximately 30 seconds. Additionally, for a Solution Filters scenario with 63 projects, Chromium loads in just 20 seconds, which is 3x faster. These enhancements greatly benefit larger projects, enhancing productivity and reducing loading times.

Solution Close Enhancements have been made to the Solution-Close process, which notably accelerates closing a solution with C++ projects. These improvements provide a 20% to 50% speed boost in closing solutions, depending on their size, with the most significant performance gains observed in larger projects (1000+ projects). For instance, in Chromium projects, the improvements result in a 50% acceleration, saving around 20 seconds of time.

Git File History We are pleased to announce that the Git History feature in Visual Studio has been enhanced to provide faster loading times for file and folder scenarios. Git repositories with longer history and more time between commits will see greater speed improvements. We’re excited to share that our measurements indicate a 42% improvement in the Git public repository.

Git Branch Switches We’ve further reduced the time it takes to switch between git branches in Visual Studio by optimizing file system changes detection and processing. Additionally, we’ve enhanced the way Visual Studio handles calls to git for this specific case.

Lightbulb Improvements The lightbulb/code actions have been greatly improved through comprehensive redesign of the diagnostics and code analysis architecture. We have focused on optimizing all components involved in bringing up a lightbulb through a combination of low/medium/high level fixes.

  • Low-level fixes included limiting tree walks, improving string handling, optimizing source text handling, reducing allocations, and optimizing data structure-level optimizations in the diagnostics code paths.
  • Medium-level fixes included cancelling background diagnostics (squiggles) when computing Lightbulb diagnostics, optimizing background indexing, limiting analyzers that are applicable per document, addressing inefficiencies in several 1st party/2nd party analyzers like PublicAPI analyzer, and improving our caching model.
  • High-level fixes included a complete overhaul of the diagnostics pipeline to answer span-oriented questions, infer which analyzers are applicable to run on specific spans, and deprioritize slow analyzers based on historical run.

Before

After

We have made substantial enhancements to the performance of both the CPU and memory, specifically when dealing with extensive source files. We have successfully minimized the number of progress bar cycles required for the Lightbulb scenario in a large source file. Previously, it took approximately 8 to 17 cycles, but now we have reduced it to less than one cycle, as illustrated in the above gif.

Performance Profiler Stop CollectionThe stop collection feature of the Performance Profiler has undergone performance improvements recently. These enhancements include implementing parallel NGEN PDB creation, parallel C# metadata scraping, and NGEN PDB caching in the symbol cache. As a result, metadata loading time and debug symbol loading time for NGEN PDBs have significantly decreased.

The stop collection now runs approximately 3.5 times faster when generating and almost 15 times faster when using cached values (which are always used if available). We’ve tested this using a 10-second trace in Visual Studio, and version 17.6 demonstrates a considerably faster performance than previous versions 17.5 and 17.4.

Tell us what you think!

We hope these performance enhancements make your development work efficient and enjoyable. Feedback from developers like you is very important for us to improve the product and meet your expectations. We welcome your feedback on Visual studio performance. The preferred approach is using the Report-a-problem tool. You can also leave comments below.

The post Visual Studio 2022 – 17.6 Performance Enhancements appeared first on Visual Studio Blog.

View Details

Microsoft Dev Box is a managed service that enables developers to create on-demand, high-performance, secure & ready-to-code workstations in the cloud. It gives companies the ability to pre-configure the development environment with all the tools needed to build, test, and deploy applications making developers more productive, regardless of their skill and experience level.

In this blog post, we’ll explore how Visual Studio 2022 can be optimized to maximize developer productivity and streamline the overall development workflow when used in combination with Microsoft Dev Box.

Download Visual Studio 2022 PreviewStarting with the 17.7 previews, Visual Studio 2022 includes several new features designed to make it easier to onboard to a dev box and boost your overall Visual Studio performance.

An experience that revolves around your identityAs soon as you launch Visual Studio on a Dev Box, you’ll notice that you longer need to enter your credentials. That’s because Visual Studio automatically signs you in based on the identity you used to create and login into the Dev Box.

Not only will Visual Studio automatically sign you in, but soon after all your roaming settings such as theme colors, will be applied without needing any input from you.

Unified Settings will make it easier than ever to set your environmentWe understand it is critical for your productivity to have your development environment set up just the way you like. With that in mind, I’m happy to share that we are working on a new and improved settings functionality, which we are calling Unified Settings.

With Unified Settings, you’ll be able to easily consume and share all your personal and team Visual Studio settings. Not only will the settings roam across your Dev Boxes, making the initial setup a breeze, but they’ll also be eligible for sharing and exporting in a human-readable JSON file. This will help simplify how you share or edit settings between installs or amongst your team.

We’ll share more details later this week, but in the meantime, please send any feedback or questions via Developer Community.

Identity improvements beyond Visual Studio streamline your Dev Box experience!We understand you need multiple tools to accomplish your development tasks. Because of that, we are collaborating with teams and projects outside of Visual Studio to build together a cohesive identity experience for you.

While some of these improvements are still in the planning phase, I’m happy to give you a quick preview of the identity improvements the GCM (Git Credential Manager) project is currently working on and plans to make available around June.

With this improvement, you’ll be able to leverage your signed-in Windows identity to seamlessly provide credentials when accessing Azure DevOps repositories.

We are excited about the opportunity to further improve the identity space and hope to hear your feedback and requests via Developer Community.

The fastest out-of-the-box Visual Studio yetWhen working on large projects, it can sometimes take a considerable amount of time for Visual Studio to load and allow you to get started with your work. That’s because Visual Studio needs to index files and generate metadata to enable the full suite of IDE capabilities.

However, with Dev Box we can now pre-generate this data and make it available to Visual Studio even before you log in to a new Dev Box. This allows Visual Studio to open your solutions much faster and give you access to your favorite IDE features sooner.

Not only will you be able to load things faster, but you’ll also have a faster experience with search, incremental builds & unit testing thanks to the pre-computed cache being available right from the start. In addition to those improvements, we are working towards speeding up git-related operations by pre-generating the commit graph.

Together these improvements will allow you to have a more productive and fully optimized developer session with each new Dev Box you create.

We’ll share more about these optimizations in the upcoming weeks, but in the meantime, please send any feedback or questions via this Developer Community ticket.

Azure Marketplace Image ImprovementsA couple months ago we announced new developer focused images for the Azure marketplace. These Visual Studio images can be used in standalone Azure VM instances, and they are also compatible with the Dev Box service.

Thanks to your feedback, we’ve refined the Visual Studio 2022 & Visual Studio 2019 offers, and the latest updates will provide a more focused developer experience by removing apps, features and services that are not relevant or divert system resources away from your development activities.

In addition to those improvements, we recently released a new developer focused Windows client image. It contains all the same optimizations from the Visual Studio images, but it does not have Visual Studio pre-installed. This new offer provides a clean slate for developers who might want to customize the Visual Studio installation or have different needs.

Visit this repository to learn how to leverage our image offerings to create your own custom images. Lastly, please send any suggestions or general image related feedback via this Developer Community ticket.

Let us know what you think!For those of you attending the BUILD conference, you’ll be able to learn more about Dev Box and the Visual Studio optimizations during the Develop in the cloud with Microsoft Dev Box session. We also encourage you to check out today’s announcement, covering the most recent features and developments around Microsoft Dev Box.

As always, we invite you to share your thoughts, as well as any requests or suggestions to improve the Visual Studio experience on Dev Box via Developer Community.

The post Turbocharge your Visual Studio experience with Microsoft Dev Box appeared first on Visual Studio Blog.

View Details

When coding in a long file, it’s easy to lose track of the method or block you’re writing in. Or when scrolling through an unfamiliar codebase, it can become disorienting where you are in the code.

Sticky Scroll can help you stay in the right context by sticking helpful scopes, including namespaces, classes, methods, loop initialization statements, and conditionals. Multiple code formats are supported, including C#, C++, XAML, and JSON. With a single click on a line in the Sticky Scroll header, you can quickly navigate directly to that line of code. Learn more about it from the previous blogpost.

We first released Sticky Scroll in 17.5 Preview 2 and it’s now moving into the latest 17.6 release! Since our last update, we’ve added a new option to stick inner scopes so you can easily track the scopes that are closer to what you’re working on.

Download Visual Studio 2022Let us know what you think of Sticky Scroll in Visual Studio on this feedback ticket.

New: Choose between outer or inner scopesWe’ve heard feedback about how sticking outer scopes isn’t helpful. Oftentimes, the namespace and class name match the file name. It can feel wasteful to give up two lines of vertical space for info that is often obvious. Instead, it’d be more useful if lines that are likely to be different are shown instead.

In Options, you can configure whether outer or inner scopes are prioritized with “When number of scopes exceeds the maximum”.

“Prefer outer scopes” is set by default, which shows the higher-level scopes that come from the top of the file. The new option “Prefer inner scopes” shows lower-level scopes by pushing out higher-level scopes as you scroll through deeply nested code.

“Prefer outer scopes” shows top-level scopes:

“Prefer inner scopes” shows lower-level scopes:

Try Sticky Scroll in Visual Studio 2022 17.6Enable it in Tools > Options > Text Editor > General > Sticky Scroll by toggling the checkbox for “Group the current scopes within a scrollable region of the editor window.” But if you need to quickly turn it off, you can right-click on the Sticky Scroll area and click “Sticky Scroll”.

Please Share Your FeedbackLet us know what you think of Sticky Scroll in Visual Studio on this feedback ticket and report any issues you face so we can improve the experience.

Update:

Sticky Scroll requires Block Structure Guides to be enabled for some languages (e.g., C#). If Sticky Scroll is not working, try enabling the following options in Tools > Options > Text Editor > C# > Advanced.

| Option | Description | | Show guides for declaration level constructs | Affects namespaces, classes, method initializations | | Show guides for code level constructs | Affects conditionals, loops |

The post Sticky Scroll: Stay in the Right Context appeared first on Visual Studio Blog.

View Details

If you don’t have access to YouTube, click here.Welcome to the Visual Studio Public Preview 1 of version 17.7! Following our recent General Availability (GA) release of v17.6, this exciting update offers a wide range of productivity enhancements tailored to the diverse needs of developers. Experience the cutting-edge improvements of Visual Studio and discover what lies ahead in this Preview release before it becomes widely available.

Download Visual Studio 2022 PreviewDiscover the array of new capabilities and enhancements we’ve introduced in this release, including a multi-branch graph visualization, a refined All-in-One search experience and several .NET and C++ enhancements. These improvements aim to optimize your workflow and boost productivity. With something for every developer, browse this comprehensive list of enhancements and let us know which of these enhancements is your favorite:

| Area | Enhancements | | Productivity | * Comparing Files (community suggestion) * Multi-branch Graph & Git Repository Improvements (community suggestion) * Copy and Trim Indentation ( community suggestion) * All-in-One Search Enhancements ( feedback ticket) | | .NET and cloud development | * IntelliTest Support for .NET 6+ and NetStandard ( community suggestion) * Publish Blazor WebAssembly to Azure Static Web Apps | | C++ and game development | * Unreal Engine Macros Formatting for C++ (community suggestion) * Unreal Engine Naming Convention Checker for C++ |

Our team is excited to share some of their favorite features in this release. Be sure to explore these highlights, and don’t hesitate to share your thoughts on this blog post to help us polish the experience before reaching General Availability (GA). Additionally, you can delve into the complete list of enhancements by checking out the Visual Studio 2022 17.7 Preview 1 Release Notes.

ProductivityComparing FilesIn response to this highly upvoted ticket in Developer Community, you can now compare files in Solution Explorer. You can right-click a file in Solution Explorer and use the context menu option “Compare with…” to open File Explorer to select an item for comparison. Alternatively, you can use the context menu option “Select for Compare,” then right-click on another item in Solution Explorer and select “Compare with the selected file.” Either option will launch our compare view.

Compare files in Solution ExplorerThis is just the start of improvements we’re planning to make for diffing experience, so please share your feedback about this feature here.

Multi-branch Graph & Git Repository ImprovementsThe power of Git really comes alive when you can see multiple branches at the same time to understand how the branches are related and inform operations. We’ve implemented the first version of this suggestion, to enable visualizing multiple branches in the same graph, along with other Git Repository improvements. When opening the Git Repo window, you start in the single branch view, and you can click on any branch to add that branch and its commits to the graph. In the below scenario, you can easily visualize new-branch-3 in order to cherry pick the bug fix commit onto New-branch-2, the currently checked out branch. You can also use the hover eye icon to toggle multiple branches on and off in the graph.

Visualize multiple branches and execute cross branch operations.Additionally, you can:

  • Get more space to view the graph and history table by collapsing the Branches panel using the highlighted collapse icon in the upper right corner.
  • Maximize your commit details using the highlighted expand icon in the upper right corner.
  • See avatars for your author in Azure DevOps repos.
  • See the graph updates more smoothly when switching which branches are in view.

New Git Repo window lets you collapse selectors & expand commit details.Known limitations: When you toggle a new branch on in the graph, the branch head may not be immediately visible. However, you can scroll to the branch head by selecting between items that have already been toggled on.

This feature is on in preview under the flag “Git Repository multiple branch history” in Tools > Options > Preview Features, and we have many improvements on the way. Please let us know what you think in this survey.

Copy and Trim IndentationIf you’ve ever copied code from Visual Studio to another program (Outlook, Teams, Slack, etc), you’ll like this feature. Visual Studio now automatically fixes indentation for you when you copy code from Visual Studio and paste it in another program.

Copy and Trim IndentationTry out this feature by enabling it in Tools > Manage Preview Features > “Copy and Trim Indentation”. If you have feedback to share with us about this feature, let us know here.

All-in-One Search EnhancementsWe’ve tackled known accuracy and performance issues resulting in several enhancements including:

  • Exact matches are now prioritized higher in the results list.
    • Exact file name matches
    • Prioritizing file name over path
  • The results list now accurately updates as you type.

All-in-One Search EnhancementsTry out the All-In-One Search experience by enabling it in Tools > Manage Preview Features > “New Visual Studio Search experience (restart required)”.

If you have feedback to share with us about this feature, let us know here.

.NET and Cloud developmentIntelliTest Support for .NET 6+ and NetStandardNow available in Preview, once enabled, the editor context menu “IntelliTest (Preview)” will be enabled in net6 and netstandard code files.

IntelliTest Support for .NET 6+ and NetStandardCreate Project will create a compatible test framework project into which generated tests can be saved and subsequently run using Test Explorer or through the CLI. This will create stubs of methods, but not actually probe your code to create asserts. This can be useful by itself to create a lattice into which you would inject your own code, but typically it’s a placeholder and provides a preview of all the methods supported in your code file. It’s not necessary to create a project before generating tests.

Generate Tests can be run for a single method or an entire class. This process will build and probe the target assembly. The Z3 Solver leverages symbolic execution to recommend testing parameters. Subsequently test code is emitted and profiled to capture and retain all test cases that increase coverage of the target code. The test set is continually deduped to retain parameters that maximize coverage and minimize repetition. The IntelliTest results window displays probing status and the list of tests created with inputs, outputs, and assertion results. These tests can be saved to the created projects or to new projects as desired. Saving test provides the choice of an existing project or creating a new project into which the tests are saved.

Try out the IntelliTest Support for .NET 6+ and NetStandard by enabling it in Tools > Manage Preview Features > “ IntelliTest support for NetFx and Net6 using Z3 v4 (restart required)”.

Learn more at https://learn.microsoft.com/en-us/visualstudio/test/intellitest-manual.

Publish Blazor WebAssembly to Azure Static Web AppsIn this release we have added the ability to publish ASP.NET Core Blazor WebAssembly (WASM) projects to Azure Static Web Apps. When you publish a Blazor WASM project after you select Azure as the target, you will now see an option to select Azure Static Web Apps. See the image below.

Publish Blazor WebAssembly to Azure Static Web AppsYou may be interested in publishing your Blazor WASM project to Azure Static Web Apps to take advantage of its built-in capabilities as well as a potentially lower cost versus publishing to a compute-based Azure service. Some of the built-in capabilities include global hosting, integration with backends like Azure Functions and much more.

C++ and game developmentUnreal Engine Macros Formatting for C++In response to this Developer Community ticket and community feedback, we have added an option to use special indentation rules for Unreal Engine macros. Available as a preview feature, Visual Studio will detect and use indentation and formatting rules for your Unreal Engine reflection macros.

Unreal Engine Macros FormattingTo turn on Unreal Engine specific formatting, search “Unreal Engine” in Options or go to Tools -> Options -> Text Editor -> C/C++ -> Code Style -> Formatting -> Unreal Engine and check “Apply special formatting for Slate declarative syntax and Unreal Engine reflection macros.”

Once enabled, Visual Studio will properly indent code on lines after reflection macros and use special rules for the Slate declarative syntax.

Enable Unreal Engine Macros FormattingUnreal Engine Naming Convention Checker for C++Visual Studio will now give you hints when your symbols are not conformant to the Unreal Engine coding style. After adding an .editorconfig file to your Unreal Engine project, Visual Studio will display naming convention warnings in the Error List and provide a Quick Fix option upon right-clicking.

Unreal Engine Naming Convention CheckerWhile this results from Unreal Engine developer feedback, the feature is not specific to Unreal Engine. You can customize your own .editorconfig file for Visual Studio to follow.

This feature is on-by-default. To change whether Visual Studio should treat the checks as Warnings or Suggestions, go to Tools -> Options -> Text Editor -> C/C++ -> Code Style -> Linter and change “Naming Convention (experimental)”. Ensure that you have .editorconfig file.

Naming convention settingsShare your feedback and stay connected with Visual Studio!As you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Visual Studio 2022 17.7 Preview 1 is here! appeared first on Visual Studio Blog.

View Details

In the sprint to the BUILD 2023 conference, we’re thrilled to announce the general availability of Visual Studio version 17.6 today. This latest release delivers a range of powerful tools and features designed to empower you in crafting cutting-edge applications and experiences. The user-friendly environment, along with essential features like code completion, debugging, refactoring, and version control, caters to both experienced and novice developers striving to achieve their software development objectives, solidifying its position as the go-to IDE for millions of developers worldwide.

Download Visual Studio 2022We’ve committed to you to enhance Visual Studio across a set of familiar themes that are enduring throughout each of our Visual Studio releases. Visual Studio 2022 version 17.6 represents the culmination to date for these big rocks:

  • Level Up Your Productivity
    • Performance Improvements
    • Editor Enhancements
    • Debugging & Diagnostics Capabilities
    • Git Collaboration Tools
  • Build Modern .NET Apps
  • Streamline Game Development
  • Bring Your C++ Cross-platform Codebases
  • Enterprise Management

You’ve also given us feedback and we listened. Many new features come straight from your feedback and suggestions, with this release completing 22 suggestions. Here are some of your most up-voted suggestions:

  • Arm64 support for .NET MAUI
  • .natstepfilter and .natjmc to be included as part of a project (vcxproj)
  • “Sync with active document” now works in CMake Target View
  • Creation of breakpoint groups

In this release, we’ve introduced significant performance enhancements to streamline your development experience. You’ll find improved performance for Git File History, faster opening and closing times for large solutions like Chromium, as well as large speed-ups in Performance Profiler ‘s stop collection operation.

We’ve made updates to the All-In-One Search UI, allowing you to search code and Visual Studio features in one spot. Additionally, both Brace Pair Colorization and Sticky Scroll are now available in the editor to help increase code readability, and our newly enhanced Spell Checker now supports C#, C++, and Markdown files, ensuring that your spelling is accurate throughout your project.

This GA release is all about productivity as it also brings language-specific productivity improvements, such as the C++ Member Function feature that enables you to quickly create C++ constructors and equality operations, and the C# IntelliCode API Usage Examples that help you find relevant, practical examples of API usage.

If you’re still chasing down a few bugs in your code, Visual Studio version 17.6 answers the call with new debugger & diagnostics capabilities. The Visualizer Support for .NET Unix remote debugging, Live Graph in the WSL Profiler, breakpoint groups, and the newly enhanced Call Stack Window, now with search and highlighting complement a seamless debugging experience across all supported platforms.

We’re constantly improving the git integration and, in this release, you can stage changes while building, unstage at line level, and the merging UI brings more control over your merges, increasing agility and collaboration with your dev team.

Beyond individuals, Visual Studio continues to offer features that better support dev teams at scaleLastly, this release also has the distinction of being a long-term servicing release (LTS). To learn more about LTS releases, check out Visual Studio Product Lifecycle and Servicing | Microsoft Learn.

And if you are a .NET or cloud-native developer, writing C++ cross-platform code, or you are a game developer, you can also dive deeper by reading the .NET Blog post on What’s New in .NET 8 Preview 4 or the C++ Blog post on Visual Studio 2022 version 17.6 for C++ Developers.

Level Up Your ProductivityWith Visual Studio 2022, our goal is to help you get more done in less time throughout all your development tasks inside the IDE, and in this release, we have improved the performance in several core experiences based on your feedback.

Performance ImprovementsWe made significant improvements to the Solution – Open scenario and in Solution Filters for Chromium developers. Cached project load of the full Chromium solution (11K projects) is 8x faster, which translates to saving 3.5 minutes of Solution Load. With these improvements the generated Chromium solution loads cached in about 30 seconds. With Solution filters loading Chromium with 63 projects, this improvement translates into 3x, saving about 20 seconds of cached or uncached load time. As with large-scale performance improvements in general, for smaller projects, the wins will be much smaller.

We made improvements to the Solution – Close scenario, which makes closing a solution containing C++ projects faster. The overall perf improvements can make closing a solution in some cases from 20% faster for small codebases, to 50% faster in some cases for large solutions (1000+ projects). We expect the wins to be more noticeable in large projects. For Chromium, the improvements are typically 50%, saving 20 seconds of time.

The Git History feature now loads files and folders faster for repositories with long history and less frequent commits. For example loading files have improved the performance by 42% in the Git public repository.

We have made significant improvements in the performance of the Performance Profiler’s stop collection feature. The stop collection now runs approximately 3.5 times faster when generating and almost 15 times faster when using cached values (which are always used if they are available). We’ve tested this using a 10-second trace in Visual Studio and as seen in example version 17.6 is significantly faster than previous versions.

Editor EnhancementsNew features are available in this release to help you enhance your productivity across different aspects of the development process. Let’s dive into these features.

Sticky Scroll keeps relevant headers in view, making it easier to navigate and understand your codebase. Now you can maintain context in your code while working with long classes and methods. Learn more about Sticky Scroll.

All-in-one search makes it easy for you to quickly find a Visual Studio menu feature (Ctrl+Q) or files, types, and members in your code (Ctrl+T). With this release you will see each result on 2 lines of space, default preview is at the bottom and the window size and location is persisted between sessions. These improvements are based on your suggestions (1, 2) so please keep the feedback coming. Learn more about All-in-one search.

Brace Pair colorization helps visually distinguish each set of opening and closing braces for your code making it easier to see your code’s scope or find any missing braces. Brace pair colorization is supported for C#, C++, TypeScript, JavaScript, Visual Basic, and Razor. You can enable or disable colorization by going to Tools > Options > Text Editor and checking “Enable brace pair colorization”.

Spell Checker will check your C#, C++, and Markdown files for incorrectly spelled words. It can be enabled with the Edit > Advanced > Toggle Text Spell Checker menu command, or with the Toggle Text Spell Checker button on the main toolbar. By default, the spell checker will look for misspelled words in comments, identifiers and strings in the open document, and mark any unknown words as messages. Learn more about Spell Checker and how to configure it.

This release also brings language-specific productivity improvements, such as C++ Member Function enables you to quickly create C++ constructors and equality operations, and the C# IntelliCode API Usage Examples help you find relevant, practical C# examples of API usage for 100k common APIs right within Visual Studio.

Debugging & Diagnostics CapabilitiesThere is no better feeling that being able to catch and fix an elusive bug, and to be as effective as possible in doing so, this Visual Studio release brings you new enhancements to the best-in-class tools for the job.

Breakpoints Groups allows you to quickly and easily manage breakpoints in organized groups making debugging, testing and troubleshooting more efficient. This feature, built based on your suggestion , enables you to create, switch between, and manipulate groups of breakpoints, improving your debugging workflow.

There are more suggestions in the debugging space that we have addressed this release, as Visual Studio now supports .natstepfilter and .natjmc as part of the C++ project (suggestion ), and searching and highlighting in Call Stack window (suggestion ).

.NET Remote Debugging now supports visualizers for IEnumerable and DataSet to inspect your variables/objects when debugging .NET on Unix via SSH, Docker, or WSL.

Visual Studio Profiler shows live graphs now when collecting in WSL from dotnet-monitor. The WSL live metrics are available for .NET object allocation, CPU usage, and the .NET counter tool. Learn more about the .NET memory usage analysis.

Instrumentation in Visual Studio Profiler has been significantly improved, now using less resources, you can use the flame graph to identify you Hot Path in your program, and provides better error handling and scoping. Learn more about the latest improvements in the Visual Studio Instrumentation Profiling.

Git Collaboration ToolsTo make the best of your collaboration with your dev team, you will want to get familiar with the latest enhancements provided by Visual Studio’s git integration:

Improve Merge Dialog provides more information and control over your merges, helping you avoid merging from incorrect branches and reducing the risk of conflicts

Git Line Unstaging allows you to unstage changes line by line, offering more granular control over your staged changes.

Based on a suggestion , now you can also stage your changes and commit while building rather than having to wait for the build to finish.

Link to GitHub Issues gives you easy access to GitHub issues that you can reference directly from within Visual Studio, streamlining your issue tracking and collaboration efforts.

Build Modern .NET and Cloud Native AppsElevate your .NET development experience with powerful new tools and enhancements designed to streamline the creation of modern applications for a diverse range of platforms and devices.

Android Manifest Editor streamlines your Android development process by making it easier to set available APK properties and request device-specific permissions.

There are more suggestions coming from you that we have addressed in this release: you can now build on and target Windows ARM64 devices when developing your .NET MAUI application (suggestion ). The JS/TS editing experience also benefits from your suggestions, with two suggestions completed (suggestion 1, suggestion 2 ):

CodeLens in JS/TS editors enables you to quickly discover references to JavaScript and TypeScript symbols and quickly navigate between them.

JS/TS Syntax Highlighting elevates code readability in Visual Studio, streamlining your JavaScript and TypeScript development process. Learn about the benefits of JS/TS Syntax Highlighting.

Web API development with ASP.NET Core is getting easier than ever with a number of updates for developing APIs, including Endpoint Explorer and .http file support to test APIs. This enhances your overall API development workflow when combined with API scaffolding, Entity Framework tooling, and developer tunnels. Read more in our latest blogpost about Web API development in Visual Studio 2022. If you want to see all this in action, checkout this short video:

Streamline Game DevelopmentVisual Studio 2022 version 17.6 is a must-have whether you are an indie game developer or an AAA game developer. The enhanced capabilities of Visual Studio in every aspect of the developer inner loop will make game development faster, more productive, and more enjoyable. In this release, you can now stream Unreal Engine logs directly in Visual Studio, and benefit from an improved HLSL editing experience.

Unreal Engine Log Viewer enables you to view Unreal Engine logs without leaving Visual Studio. To open the log window, click View > Other Windows > Unreal Engine Log. You can also filter your logs based on “Categories” or “Verbosity”. After opening the UE log window, logs will automatically streamed when you start the Unreal Editor with F5. You can also press the red Record button if attaching the debugger to your UE process is not feasible.

HLSL Tools Extension by Tim Jones, now available as part of Visual Studio, boosts your HLSL (High Level Shading Language) development productivity. Enjoy features like syntax highlighting, statement completion, and go-to definition for an improved shader development experience.

Learn more from our latest blogpost about game development integrations in Visual Studio 2022. To see these features in action, check out this Visual Studio Toolbox episode:

Bring Your C++ Cross-platform CodebasesVisual Studio provides industry-leading development tools for C++ for any platform you’re targeting, integrating with a variety of tools from different vendors. You can rest assured that you will not trade-in flexibility in how you’re developing your C++ projects once you start using Visual Studio. In this release, Visual Studio adds new workflows for CMake, SSH, STM32CubeIDE and vcpkg:

CMake Debugger allows you to debug your CMakeLists.txt files within Visual Studio for any CMake project. Set breakpoints, step into, over, or out of them, and even pause or continue the currently executing scope. With an intuitive call stack display and variable watch functionality, the CMake Debugger streamlines the process of troubleshooting and refining your CMake projects. Learn more about the CMake Debugger.

Remote File Explorer for Unix enables you to browse, upload, and download files to your remote Unix-based machines listed in the Connection Manager. Following up on a suggestion , the Remote File Explorer can now be installed through the Linux and Embedded Development workload and offers a seamless and efficient way to manage files and directories on remote systems. Discover more about the Remote File Explorer.

If you use STM32CubeIDE projects, you can import them directly in Visual Studio by selecting File > Open > Import STM32CubeIDE project, when you have the Linux and Embedded Development workload installed. Learn more about how to work with STM32CubeIDE projects.

Vcpkg, the C++ package manager, now ships with Visual Studio and its commands can be run from a Developer Command Prompt or Visual Studio’s Integrated Terminal. More details are available in the vcpkg April update.

Enterprise ManagementWe’re introducing features that make it easier to scale your enterprise development environment and simplify the deployment and management of Visual Studio for IT administrators and developers.

Organizations can now host and deploy Visual Studio layouts on an intranet website in addition to a file share. This simplifies layout maintenance and improves installation performance, particularly for organizations using multiple global network file shares. Refer to the online documentation about http layouts for more information.

We’ve updated the logic on the installer’s “Available” tab to better reflect what products customers are most likely to want to install. You will now always have access to the latest Previews, as well as the latest major versions of SKUs you may already have installed. It’s also possible for enterprises to disable the Available Tab altogether across their organization as requested by your suggestion. Keep watching this space for additional improvements in the future.

The Visual Studio installer is independent from the Visual Studio product, and it governs multiple versions of Visual Studio all the way back to Visual Studio 2017. Starting now, every future release of Visual Studio 2017, Visual Studio 2019, and Visual Studio 2022 will ship the latest installer. This means that all of these products will automatically be able to take advantage of the bug fixes and new features we add to the installer without needing to do anything special other than having the latest version of the product on the client machine.

Per your suggestion , we’ve also enabled the ability for clients to rollback an update if the product was sourced from a layout. IT administrators are expected to keep the older versions of the product packages available in the layout to facilitate the client’s ability to facilitate this.

Multiple .vsconfig files at any location in your repository are now supported, with the aid of an open-source tool called the Visual Studio Configuration Finder that can help you consolidate them when needed. Visual Studio’s VSConfig is a useful configuration tool that gives you the ability to export and import workload and component selection to a Visual Studio installation configuration file. For more information regarding VSConfig, please visit Import or export installation configurations | Microsoft Learn.

Your SuggestionsAs you use Visual Studio, continue to let us know what you love, what you live, and where you’d like us to improve the product next. You can share your feedback with us via Developer Community by reporting any problems or sharing your suggestions for new features or improvements to existing ones. Your feedback is critical to help us make Visual Studio the best tool it can be!

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

On behalf of the whole Visual Studio team, Happy Coding!

The post Visual Studio 2022 – 17.6 Now Available appeared first on Visual Studio Blog.

View Details

Are you geared up for Build 2023? Microsoft’s flagship developer conference is just a week away, and we have an incredible lineup of Visual Studio sessions that you simply cannot afford to miss!

This year, Microsoft Build goes hybrid, offering you the best of both worlds – virtual and in-person experiences in Seattle, Washington, from May 23-25! Can’t make it to Seattle? No worries! You can access a plethora of live sessions online for free, right from the comfort of your office. Immerse yourself in keynotes and sessions on Visual Studio, AI development, and the latest advancements in C# and .NET!

What’s more, we’re offering live chat during most of the keynotes, breakouts, and discussions, giving developers like you the opportunity to connect with peers from around the world and participate in these sessions together. This truly makes Build 2023 one of the largest and most connected developer conferences on the planet, with tens of thousands of participants joining online!

Don’t let the opportunity slip by; the Session Builder is live now! Curate your personalized event calendar today and ensure you’re a part of all the fantastic events at Build 2023. Remember, it’s not too late to register and attend the event online, so secure your spot and join us for an unforgettable experience filled with insights, innovations, and global connections!

Must See Keynotes at Build 2023: * Microsoft Build Opening Keynotes: Satya Nadella shares how Microsoft is creating new opportunities for developers across our platforms in this new AI era. * The era of the AI Copilot: Join Microsoft Chief Technology Officer Kevin Scott to explore how Microsoft and OpenAI’s full-stack AI platform, fueled by Azure, the world’s supercomputer, can empower developers, startups, and entrepreneurs to innovate and develop the next generation of AI apps and tools that will make the impossible possible. * Next generation AI for developers with the Microsoft Cloud: Join Microsoft’s Scott Guthrie, EVP Cloud + AI, as he discusses how Microsoft is making AI innovation real for developers today with experiences like GitHub Copilot, Azure’s OpenAI Service, and the Microsoft Cloud platform and tools you need to produce next-gen, AI-infused applications.

Visual Studio Sessions at Build 2023: Browse all the Build sessions online, but here’s a sampling of some of the Visual Studio sessions that will offer an in-depth look into what we’re currently developing and enhancing, with a strong technical focus.

  • Inject the power of the cloud and AI into your development workflow: Join Amanda Silver and friends to see the exciting new advancements in developer tooling that will enable your team to onboard new developers faster and equip them with everything they need to get coding, and be more productive while writing code. See how you can use Dev Box and Deployment Environments, along with Visual Studio, Visual Studio Code, and GitHub Copilot to supercharge your productivity.
  • Advanced developer tips and tricks in Visual Studio: Discover the latest features, preview updates, and insider tips to optimize workflows, automate tasks, and sharpen your coding skills. Learn about intelligent code navigation, GitHub actions, accelerated debugging, profiler techniques, dev tunnels, and more.
  • Develop in the cloud with Microsoft Dev Box: Explore how Microsoft Dev Box offers on-demand, task-based workstations in the cloud, preconfigured by dev teams and secured by central IT. Streamline your workflows with cloud infrastructure, centralized security, and deep Visual Studio integrations.
  • Development with accessibility in mind, Q&A: Join the Visual Studio PM team to discuss the value of accessibility and inclusive development practices. Learn how features such as audio cues and spell checkers revolutionize experiences for users with disabilities and engage in a conversation to gain insights from our customer-driven journey.
  • Five tips to increase your productivity in Visual Studio: A happy developer is a productive developer. Learn some tips and tricks to increase your productivity in Visual Studio so you can code faster and spend less time doing boring redundant work. This is a quick-paced demo with tips you can use right after you leave the session.
  • Pragmatic techniques to get the most out of GitHub Copilot: Explore how GitHub Copilot works, best practices, and what AI can realistically do for developers. Understand that AI is only as good as the developer who wields it and how curiosity, creativity, and critical thinking can maximize the benefits of AI-assisted coding.

Hangout with Scott Hanselman, a fan favorite!

Developer joy with Scott Hanselman and friends 

Join Hanselman and friends to explore the past five years of developer innovation in Windows and get a sneak peek into upcoming features that will make Windows even more powerful for developers of all skill levels.

Register Today! Ready to join tens of thousands of developers at Build 2023? Don’t miss out on these exciting sessions and more! Click the link below to register today and secure your spot to experience Build 2023 virtually, alongside a global community of developers. Embrace the opportunity to learn, connect, and grow at this incredible event!

Register for Build 2023 and Join Us Online for Free!

Stay Informed and Connected! Keep up to date with the latest news and announcements by following us on YouTube, Twitter, LinkedIn, Twitch, and on Microsoft Learn.

The post Get Ready for Visual Studio at Build 2023:
Join Tens of Thousands Online! appeared first on Visual Studio Blog.

View Details

You want to quickly select some text and surround it with quotation marks. So, you select your text and hit the quotation mark key on your keyboard, only to find that the selected text now has been replaced by a single “. What you hoped would happen was that the selected text would be surrounded by an opening and closing quotation mark like in the animation below. Let’s do something to fix this.

In this experiment, we want to test if we can create a general feature for all languages that makes it easy to surround the selection. In fact, multiple developers have requested this feature, so remember to vote for it if you agree.

Our hypothesis is that a feature like this is language agnostic and doesn’t need to be customized per language. But we need your help to help test that hypothesis and, potentially, help improve the feature design. We’ve created an extension for Visual Studio called Surrounder that we’ll be using for this experiment.

The extension is very simple to use. Any time you have a selection and type one of the supported characters, the selection will be surrounded by that character and its closing equivalent, as shown in this table:

| Opening | Closing | | --- | --- | | “ | “ | | ‘ | ‘ | | | | | ( | ) | | [ | ] | | { | } | | < | > |

To participate in this experiment, install the Surrounder extension and let us know how it works for you. Either by commenting in this blog post, or by opening issues or pull requests on the GitHub repo.

There is currently an open feature request for us to implement this behavior in Visual Studio, so make sure to go vote for it.

The post Surround selection experiment appeared first on Visual Studio Blog.

View Details

In Visual Studio 2022 one of the main scenarios for web developers is creating Web APIs with ASP.NET Core. In the latest preview of Visual Studio 2022, 17.6, we have added a number of updates to be more efficient when developing APIs. In this post we will go over a sample scenario of developing a new API from scratch and point out the new features along the way. To get started download the latest preview of Visual Studio 2022 with the link below.

Download the latest Visual Studio 2022 PreviewSome of the new features that we will cover in this post include.

  • HTTP editor with integrated client
  • API Endpoints Explorer
  • Scaffolding
  • Entity Framework tooling in Visual Studio

In this post we are going to show a full end-to-end for starting with a new project to developing a full Web API. Below is a brief outline of this post.

  • Getting started – creating a new API project
  • Adding models to your project
  • Generating APIs using scaffolding
  • Exploring APIs with Endpoints Explorer
  • Exercising APIs with the HTTP editor

All of the code is available for you at sayedihashimi/RestaurantService: Sample ASP.NET Core Web API (github.com).

Video overview of new featuresTake a look at this video from Mads Kristensen covering some of the new updates that we will cover in this blog post.

Getting StartedTo get started developing a Web API in Visual Studio the first step is to create a new project. In Visual Studio 2022 you can create a new project using the New Project dialog. In this post we will create an ASP.NET Core Web API for a fictitious take-out restaurant. To follow along this tutorial, create a project named MyRestaurantService with the following options selected in the Additional Information page.

In this sample we are using API endpoints instead of Controller based APIs, but you can follow along with Controllers. For more info on the difference between Controller based APIs and Endpoint APIs, see this doc Choose between controller-based APIs and minimal APIs. The steps for API endpoints and Controller based APIs are the same, just chose the Controller options instead of Endpoints when applicable.

Now that the project has been created, the first thing that we want to do is to add some model classes for the objects that we want to expose with our API. We will need to add the following classes/enums to the project. In the table below you’ll see the list of objects to create as well as a link to the source for each file.

| Name | Description and link | | Contact | This class will capture represent the customer who is placing the order. Source file. | | MenuItem | Represents a menu item that’s in the restaurant menu. Source file. | | MenuItemCategory | Enum that represents the category for the menu item. Source file. | | MenuItemOrdered | Represents an item which has been added a customer order. Source file. | | OrderStatus | Represents the status of the order submitted. Source file. | | PaymentMethod | Enum that represents the payment method used for the order. Source file. | | TogoOrder | Represents an order that has been placed. Source file. |

The files added are either standard POCO classes or enums. For example, below is how the Contact class is defined.

Contact.cs

namespace MyRestaurantApi; public class Contact { public int Id { get; set; } public string? Name { get; set; } public string? Email { get; set; } public string? Phone { get; set; }} These objects represent a set of data that can be used to display a menu to end-users as well as submit Togo orders. Now that we have added these model classes the next step is to use scaffolding in Visual Studio to create the API endpoints and connect the Entity Framework DbContext. There are 4 sets of API endpoints that we will need to create.

  • Contact
  • MenuItem
  • MenuItemsOrdered
  • TogoOrder

For each model class we will use scaffolding to handle the hard work of generating the initial API endpoints. Let’s get started with that.

Scaffolding in Visual StudioTo get started with scaffolding, right click on the ASP.NET Core web project, MyRestaurantApi, and select Add > New Scaffolded Item. See the image below.

Once you invoke this menu item, the scaffolding dialog will appear. On this dialog we will select the type of scaffolder that we want to run and then configure it. For this project, we will use the API with read/write endpoints, using Entity Framework scaffolder.

After selecting this option, you will see a new dialog which prompts for you to configure the scaffolding options. The main options are summarized in the table below.

| Option | Description | | Model class | The model class which will be used for scaffolding. Scaffolding will generate the API to read/write values for the selected model class. | | Endpoint class | The class where the new endpoints should be written to. If you select an existing class, the endpoints will be added to that class. You can also create a new class with the + button. | | DbContext class | The Entity Framework DbContext which will manage the read/write operations to the database. You can create a new DbContext with the + button. | | Database Provider | The database provider to use, this will be determined by the database where you want to store this data. |

We are going to start with scaffolding the Contact model. In this case we will specify the Contact class as the model class, create a new endpoints class as well as a new DbContext. We are going to use Sqlite for this sample, but you can select any of the providers listed based on your needs. Below is the dialog with these options configured.

When this was populated the + button was used to create a new endpoints class as well as the DbContext. You can use the default value that is provided when you click the + button for both of these. The next step is to click the Add button. After clicking Add, the scaffolding tool will be installed using NuGet and then it will be invoked to generate the new files. The files that were added or modified are listed below.

Project file – the project file is modified to add package references needed to support the changes as well as one for the scaffolding tool itself.

Program.cs – the Program.cs file is modified to add the EF DbContext as well as registering the new endpoints class.

appSettings.json – The appSettings.json file is modified to add the connection string.

ContactEndpoints.cs – This is a new class that is added which handles the API request/response.

Below is the code which has been generated to the ContactEndpoints class.

using Microsoft.EntityFrameworkCore;using Microsoft.AspNetCore.Http.HttpResults;using Microsoft.AspNetCore.OpenApi;using MyRestaurantApi.Data;namespace MyRestaurantApi;public static class ContactEndpoints{ public static void MapContactEndpoints (this IEndpointRouteBuilder routes) { var group = routes.MapGroup("/api/Contact").WithTags(nameof(Contact)); group.MapGet("/", async (MyRestaurantApiContext db) => { return await db.Contact.ToListAsync(); }) .WithName("GetAllContacts") .WithOpenApi(); group.MapGet("/{id}", async Task<Results<Ok<Contact>, NotFound>> (int id, MyRestaurantApiContext db) => { return await db.Contact.AsNoTracking() .FirstOrDefaultAsync(model => model.Id == id) is Contact model ? TypedResults.Ok(model) : TypedResults.NotFound(); }) .WithName("GetContactById") .WithOpenApi(); group.MapPut("/{id}", async Task<Results<Ok, NotFound>> (int id, Contact contact, MyRestaurantApiContext db) => { var affected = await db.Contact .Where(model => model.Id == id) .ExecuteUpdateAsync(setters => setters .SetProperty(m => m.Id, contact.Id) .SetProperty(m => m.Name, contact.Name) .SetProperty(m => m.Email, contact.Email) .SetProperty(m => m.Phone, contact.Phone) ); return affected == 1 ? TypedResults.Ok() : TypedResults.NotFound(); }) .WithName("UpdateContact") .WithOpenApi(); group.MapPost("/", async (Contact contact, MyRestaurantApiContext db) => { db.Contact.Add(contact); await db.SaveChangesAsync(); return TypedResults.Created($"/api/Contact/{contact.Id}",contact); }) .WithName("CreateContact") .WithOpenApi(); group.MapDelete("/{id}", async Task<Results<Ok, NotFound>> (int id, MyRestaurantApiContext db) => { var affected = await db.Contact .Where(model => model.Id == id) .ExecuteDeleteAsync(); return affected == 1 ? TypedResults.Ok() : TypedResults.NotFound(); }) .WithName("DeleteContact") .WithOpenApi(); }} This uses the ASP.NET Core minimal API support, as mentioned earlier if you prefer Controller based APIs a new Controller would have been added to the Controllers folder.

Now that we have generated the API endpoints for the Contact class, we need to do the same for the remaining three model classes. We are going to repeat the same steps with one difference. Instead of choosing to create a new DbContext, we will select the DbContext which was created in this step to be reused for the other three. Since you’re going to select the existing DbContext, the Database Provider option will be disabled because it’s already configured in the DbContext. Now you can scaffold the API endpoints for the classes; MenuItem, MenuItemsOrdered and TogoOrder.

When you have completed scaffolding for those three files, your Solution Explorer should look similar to the image below.

At this point it would be a good idea to build the solution to ensure that there are no issues. In this step we have used Visual Studio scaffolding to create a set of API endpoints that are connected to an Entity Framework database. The next step is to get the database setup.

Now that we have a DbContext, we want to add some initial data to the database, this is commonly referred to as Data Seeding. In our case we need to populate the list of items which customers can order (the MenuItems) as well as the Contact table. We can do this by customizing the DbContext class that was generated during scaffolding. We will add two methods to return the data and we will override the OnModelCreating method to register the data with the database. The methods that we will add to return the initial data are GetSeedDataMenuItems and GetSeedDataContacts. These methods just return an array of MenuItems or Contacts, respectively. Then we call those methods in the OnModelCreating method. The code should look like the following now.

public class MyRestaurantApiContext : DbContext { public MyRestaurantApiContext(DbContextOptions<MyRestaurantApiContext> options) : base(options) { } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<MenuItem>().HasData(GetSeedDataMenuItems()); modelBuilder.Entity<Contact>().HasData(GetSeedDataContacts()); } public DbSet<MyRestaurantApi.Contact> Contact { get; set; } = default!; public DbSet<MyRestaurantApi.MenuItem> MenuItem { get; set; } = default!; public DbSet<MyRestaurantApi.MenuItemOrdered> MenuItemOrdered { get; set; } = default!; public DbSet<MyRestaurantApi.TogoOrder> TogoOrder { get; set; } = default!; private MenuItem[] GetSeedDataMenuItems() => new MenuItem[] { new MenuItem { Id = 1, Name = "Hamburger", Price = (decimal)3.68, Description = "It's a cheese burger without the cheese", Category = MenuItemCategory.Lunch }, new MenuItem { Id = 2, Name = "Hamburger - double", Price = (decimal)5.70, Description = "It's a cheese burger without the cheese, with two beef patties", Category = MenuItemCategory.Lunch }, new MenuItem { Id = 3, Name = "Cheeseburger", Price = (decimal)4.09, Description = "A hamburger with cheese", Category = MenuItemCategory.Lunch }, new MenuItem { Id = 4, Name = "Cheeseburger - double", Price = (decimal)5.09, Description = "A hamburger with cheese, with two beef patties", Category = MenuItemCategory.Lunch }, new MenuItem { Id = 5, Name = "Mushroom & Swiss burger", Price = (decimal)4.59, Description = "Mushroom & Swiss burger", Category = MenuItemCategory.Lunch }, new MenuItem { Id = 6, Name = "Mushroom & Swiss burger - double", Price = (decimal)6.09, Description = "Mushroom & Swiss burger, with two beef patties", Category = MenuItemCategory.Lunch } }; private Contact[] GetSeedDataContacts() => new Contact[] { new Contact { Id = 1, Name = "Sayed Hashimi", Email = "sayed@example.com", Phone = "555-111-2222" }, new Contact { Id=2, Name = "Mads Kristensen", Email = "mads@example.com", Phone = "555-111-3333" }, new Contact { Id=3, Name = "Eline Barstad", Email = "elineb@example.com", Phone = "555-111-4444" }, new Contact { Id=4, Name = "Theodore Lamy", Email = "theol@example.com", Phone = "555-111-5555" }, new Contact { Id=5, Name = "María Zelaya", Email = "mariaz@example.com", Phone = "555-111-6666" }, new Contact { Id=6, Name = "Kubanychbek Sagynbek", Email = "kubans@example.com", Phone = "555-111-7777" }, new Contact { Id=7, Name = "Denise Bourgeois", Email = "deniseb@example.com", Phone = "555-111-8888" }, new Contact { Id=8, Name = "Robin Danielsen", Email = "robind@example.com", Phone = "555-111-9999" } };} Now we have done everything that is needed to get the DbContext and the data model to support this application. We can now move on to get the database itself ready, thus far we have just defined some code but not applied any of that to any database. We will use some new support for Entity Framework in Visual Studio to simplify this.

Entity Framework Support in Visual StudioBefore we can exercise the API endpoints, we need to get the database configured. In the scaffolding step, the EF DbContext was defined in the code, but the database still hasn’t been configured to store the data that the DbContext represents. To do this we need to perform two operations.

  1. Add an EF migration
  2. Update the database

In the past you would have had to use the dotnet ef command line utility to perform these two steps. In Visual Studio we have added support so that you are not required to use the command line for these operations. The support has been added in the Connected Services tab for ASP.NET Core projects. To get started double click on the Connected Services node in Solution Explorer under the web project MyRestaurantApi. When you enter that page, it will look like the following.

Since we configured scaffolding to use Sqlite, we will be using some options available in the menu to the right of the Sqlite (local) entry in the Service Dependencies. When you click on that menu, you should see the following options.

First, we need to create a new Entity Framework migration. We will use the Add migration context menu option shown above. When you click on that option, the Entity Frameworks Migration dialog will appear. Before entering this menu, ensure that the project is not running. The dialog will kick off a build and if the project is running, you’ll receive an error. When you enter this dialog, it should look similar to the following image.

On this page there are two inputs, the name of the migration to create as well as the DbContext class to use. There is always a default name for the migration which you can use, or you can apply a specific name if you prefer. This will be the name of the file that is generated when the migration is added. For the DbContext, it should automatically select the DbContext that was created during the scaffolding step. For projects which contain more than one DbContext, you should select the specific DbContext that you’re targeting. Now we can click Finish to get the migration added. After clicking Finish, the migration will be created and added to the project. The next step is to update the database by running that migration.

To update the database, we are going to use the Update database menu option. When you click on that entry, a dialog will appear where you select the target DbContext. In this sample it should default to the context created in the previous steps. That’s shown in the following image.

From here we simply need to click Finish, which will run the migration in the previous step on the database. After clicking Finish the database has been configured and is ready to use. If you’re using source control, this would be a good time to create a new commit. After making any further changes to the model classes, you should repeat these two steps to get the database updated. Let’s move on to see how we can now use the APIs which were scaffolded. We will use the new Endpoints Explorer to get started.

Endpoints ExplorerThe Endpoints Explorer is a new preview feature that we are working on to enable you to view and interact with the API endpoints defined in the solution. Since this is a Preview Feature, it needs to be enabled so that we can view it. To enable this new Tool Window, go to Tools > Options > Environment > Preview Features and then check the Web API Endpoints Explorer. You can use the search text box in that dialog to limit the choices. See the image below.

Now that you’ve enabled the Endpoints Explorer, you can open it by going to View > Other Windows > Endpoints Explorer. After opening that window, you should see content similar to what’s shown in the following image.

In this window you can see all the API endpoints that were generated using scaffolding in Visual Studio. It has created 5 endpoints (Get/Post/Get specific/Put/Delete) for each model class that we used during scaffolding. In this view, you can view all the endpoints that your solution contains. If you add API endpoints to your project you may need to use the Refresh button at the top of the Endpoints Explorer to refresh the view. On each request you can view the code that handles the request as well as generating a new request to that endpoint. You can see these options in the context menu when you click on an entry. This is shown in the next screenshot.

Here if you invoke Generate Request and HTTP file will be generated with the request. For the /api/MenuItem/ request here is the result after invoking that context menu.

After clicking that the following has occurred:

  1. Create an HTTP file and add it to the project (if an HTTP file was open when the request was generated it would be added to that file instead).
  2. Add a variable to the HTTP file that contains the web address to the web project.
  3. Add the request to the file

The HTTP file is a new file type that has been added to Visual Studio. Let’s go over the support for HTTP files now.

HTTP EditorWe have added support for .HTTP (.REST) files in Visual Studio 2022. This support was inspired by the great VS Code Extension REST Client. This extension has become popular in VS Code, and the file format now has support in other tools as well. When we added support for HTTP files in Visual Studio, we initially wanted to directly integrate this extension, but the extension is implemented by calling directly into the VS Code extensibility APIs, so that wasn’t an option. We have developed a new HTTP editor in Visual Studio to support this file type. Currently the REST Client extension has syntax that is not supported yet in Visual Studio, but we are working to close that gap. Now that we’ve discussed the origin of this new editor, let’s explore its features.

The primary purpose of the HTTP editor is to enable you to declare one, or more, HTTP requests and to enable you to view/inspect the response that is produced when the request is sent. Let’s take a closer look at the code that was generated for the /api/MenuItem/ endpoint. The code is below.

@MyRestaurantApi_HostAddress = https://localhost:7020Get {{MyRestaurantApi_HostAddress}}/api/MenuItem/### Let’s go over every line here.

**`@MyRestaurantApi_HostAddress = https://localhost:7020`** The first line declares a variable named MyRestaurantApi_HostAddress and assigns its value to https://localhost:7020. The URL comes from the project where the HTTP file was added to. The syntax to declare a new variable is:

**@VariableName = value** These variables can be declared anywhere in the HTTP file. You can use the values after the declaration in the HTTP file. Let’s look at the next line to see how to use a variable.

**Get {{MyRestaurantApi\_HostAddress}}/api/MenuItem/** This represents an HTTP request. When defining an HTTP request the first value is the HTTP request method, GET in this case. Followed by the URL. In this case we are using the variable declared in the previous line. To get the value for a variable use the syntax {{VariableName}} in the HTTP file. On this line, if you needed to specify a specific HTTP version to use you can add that after the URL. For example, for the same request, if we wanted to use HTTP 1.1 the line would look like the following.

Get {{MyRestaurantApi_HostAddress}}/api/MenuItem/ HTTP/1.1 Now let’s move on to the last line in this file.

**###** This denotes the end of an HTTP request. You can add additional HTTP requests to this file after that. Now let’s look at an example that also contains a body and some headers to the request.

The example that we looked at was a simple GET request with no headers or body added to the request. Having a body and headers are very common for HTTP requests, so let’s see what that looks like. In this case we can generate a request in the Endpoints Explorer and then add the body and headers.

Earlier we saw that we have a MenuItem API endpoint to get/create/edit menu items that are available to order. Let’s say that we want to add a new MenuItem, to do that we need to create a POST request to add a new MenuItem. We can use the Endpoints Explorer to help generate that request. Right click on the POST for /api/MenuItem/ and then click on Generate Request.

In the current version of Endpoints Explorer this will generate the following to the HTTP file.

Post {{MyRestaurantApi_HostAddress}}/api/MenuItem/### In a future version we are hoping to provide a stub for the JSON body that is needed for this request. From here we want to add the JSON body as well as a header so that we can demonstrate how those are used. The JSON that we need to add to the body should represent the JSON for a MenuItem with the values set accordingly, excluding the id field which will be set by the database. The updated request is shown below.

Post {{MyRestaurantApi_HostAddress}}/api/MenuItem/Content-Type: application/jsonAccept: application/json{ "name": "All-beef hotdog and soda", "price": 1.50, "description": "An all-beef hotdog and soda with a permanent fixed price.", "category": 1}### Let’s describe the syntax of this request in more detail. The syntax for a request is to have the first line be the HTTP method followed by the URL and an optional HTTP version as discussed earlier. After the request line you can specify each header on its own line immediately after the request line (no blank lines in between). When specifying a header, the syntax is HeaderName: Value, where HeaderName is the name of the header being passed in, and Value the value you’re specifying for it. In this case we are specifying two headers, Content-Type and Accept. These headers are not needed for this request since these are the defaults, but they are being show here to demonstrate how to pass in headers. After the headers, or request line if there are no headers, you should add a blank line followed by the body of the request. And finally, we add ### at the end to indicate the end of the request.

In this request we are going to add a new MenuItem which will be available for ordering. We are adding a new “All-beef hotdog and soda combo”. First, we want to ensure that the API is running by starting it from Visual Studio. After you have started the Web API, you can send the request with the green play button to the left of the request line. The result should be similar to the following in Visual Studio.

Here we can see that the request to add the “All-beef hotdog and soda” has successfully been added to the database. It was assigned the id value of 7 from the database. Now we can create a request to add a new togo order. Before we can submit a new TogoOrder we need to modify the TogoOrderEndpoints class where the POST method is being handled. When a TogoOrder is submitted, the OrderCreated value should be set to the current date/time if it’s null, and we also want to fill in details of the MenuItemOrdered from the MenuItem values. Below is the updated code for the TogoOrder post handler. The updated code is below.

group.MapPost("/", async (TogoOrder togoOrder, MyRestaurantApiContext db) =>{ togoOrder.Customer = await db.Contact.FindAsync(togoOrder.Customer!.Id); if (togoOrder.OrderCreated == null) { togoOrder.OrderCreated = DateTime.Now; } if (togoOrder.ItemsOrdered != null && togoOrder.ItemsOrdered.Count > 0) { foreach (var item in togoOrder.ItemsOrdered) { var menuItem = await db.MenuItem.FindAsync(item.MenuItemId); item.Name = menuItem!.Name; if (item.Price is null || !item.Price.HasValue || item.Price.Value < 0) { item.Price = menuItem.Price!.Value; } if (item.Category is null || !item.Category.HasValue) { item.Category = menuItem.Category!.Value; } } } db.TogoOrder.Add(togoOrder); await db.SaveChangesAsync(); return TypedResults.Created($"/api/TogoOrder/{togoOrder.Id}",togoOrder);}).WithName("CreateTogoOrder").WithOpenApi(); The code which needed to be added is what appears before db.TogoOrder.Add(togoOrder). It’s pretty self-explanatory. When the request is submitted values for OrderCreated will be populated if it’s empty and then any values from MenuItem which is missing will be filled in from the corresponding MenuItemId. The MenuItemId is the only required value for each MenuItemOrdered which will be created.

First, we will generate the stub request with the Endpoints Explorer, by right clicking on the POST /api/TogoOrder/ and select Generate Request. Then we will need to add the JSON body to the request. After adding the JSON body the request should look like the following.

Post {{MyRestaurantApi_HostAddress}}/api/TogoOrder/Content-Type: application/json{ "itemsOrdered": [ { "menuItemId":1 } ], "subtotal": 3.50, "tax": 0.8, "total": 4.30, "paymentMethod": 1, "customer": { "id": 2 }}### In this request we use the POST method to add a new TogoOrder entry. As mentioned, we can list the items ordered, and the only required field is the menuItemId. The code we added to the Post method will fill in the missing fields. We also assign the dollar amounts in the TogoOrder object. We can send this request by pressing the green play button to the left of the request line. After invoking that, the response should be similar to the following.

{ "id": 1, "orderCreated": "2023-04-27T14:14:48.3785278-04:00", "itemsOrdered": [ { "id": 1, "menuItemId": 1, "togoOrderId": 1, "name": "Hamburger", "price": 3.68, "category": 1 } ], "subtotal": 3.5, "tax": 0.8, "total": 4.3, "paymentMethod": 1, "customer": { "id": 2, "name": "Mads Kristensen", "email": "mads@example.com", "phone": "555-111-3333" }} Now that we have added a TogoOrder to the database, let’s verify that we are getting the correct results by making a GET request to list all the TogoOrders that are in the database. We can generate that request with the Endpoints Explorer by selecting Generate request in the context menu for the GET /api/TogoOrder/ endpoint. After invoking that, the following request is added to the HTTP file.

Get {{MyRestaurantApi_HostAddress}}/api/TogoOrder/### To send this request, click the green play button. After doing that, the result in the response view should be similar to the following.

[ { "id": 1, "orderCreated": "2023-04-27T14:22:53.2117889", "itemsOrdered": null, "subtotal": 3.5, "tax": 0.8, "total": 4.3, "paymentMethod": 1, "customer": null }] We have successfully received the result, but here itemsOrdered is null. If we were to inspect the database, we would see that all the correct entries have been created and all the relationships are correct as well. The issue here is that Entity Framework has not loaded the related data automatically. For more info on how EF loads related data see the doc Loading Related Data – EF Core. In this case, when a TogoOrder is returned we always want to load the data for the itemsOrdered field. We need to make a simple edit to the generated GET request to satisfy this need. In this case, when a TogoOrder is returned we always want to load the data for the ItemsOrdered field. We need to make a simple edit to the generated GET request to satisfy this need. The method handling this request is in the TogoOrderEndpoints class. We need to add an include statement for EF to hydrate the ItemsOrdered property. The modified method is below.

group.MapGet("/", async (MyRestaurantApiContext db) =>{ return await db.TogoOrder .Include(order => order.ItemsOrdered) .ToListAsync();}) After adding this, we will restart the Web API project and resend the GET request to list all the orders. The result should be like the following snippet.

[ { "id": 1, "orderCreated": "2023-04-27T14:22:53.2117889", "itemsOrdered": [ { "id": 1, "menuItemId": 1, "togoOrderId": 1, "name": "Hamburger", "price": 3.68, "category": 1 } ], "subtotal": 3.5, "tax": 0.8, "total": 4.3, "paymentMethod": 1, "customer": null }] Now we can see that the request has returned the TogoOrder object with the items ordered value populated. We have now successfully built an ASP.NET Core Web API to handle togo order requests. Let’s move on to discuss the syntax that is supported in the HTTP files.

HTTP File SyntaxPreviously we have mentioned that the HTTP Editor and its related support was inspired by the Visual Studio Code REST Client extension. That extension supports a broader syntax in the HTTP files than what Visual Studio supports today. As we proceed, we will be adding more support to close that gap. In this section we will discuss the syntax that is currently supported in Visual Studio.

In this section the requests will use httpbin.org, which is free third-party Web API that everyone can use. You can send request to it, and it will echo the request back to you. Let’s explore the syntax that is currently supported in Visual Studio.

CommentsComments are lines that start with either a # or //. These lines will be ignored and will not be included in the request.

VariablesAs mentioned previously, you can define variables that can be reused in subsequent request. You can define any number of variables that are needed. Variables can be defined using values of other variables that have already been defined. For example, see the following snippet.

@searchTerm = some-search-term@hostname = httpbin.org# variable using another variable@host = https://{{hostname}}@name = Sayed@phone = 111-222-3333 Here we have defined several variables, including the host variable which uses the value for another variable named hostname. Below is a sample request using one of these variables.

GET {{host}}/anything HTTP/1.1User-Agent: rest-clientContent-Type: application/json### Request lineFor the Request line, we mentioned earlier that the format for the request line is

HTTPMethod URL HTTPVersion

Here HTTPMethod is the HTTP method to use, for example GET, POST, PUT, PATCH, etc. The URL is the URL that the request will be sent to. This URL can also include query string parameters like the following example request. The optional HTTPVersion is the HTTP version which should be used. Below are some sample requests.

GET https://httpbin.org/get###GET https://httpbin.org/get?name=Sayed?☎=111-222-3333###GET https://httpbin.org/get?name=Sayed?☎=111-222-3333 HTTP/1.1### There is some support that the Visual Studio Code REST Client extension supports that we don’t have support for today. Those include.

  • Optional HTTP Method. The REST Client has support for not specifying the HTTP method. In those cases, GET is the default HTTP method.
  • Request URL spans more than one line. In the current implementation in Visual Studio, the request line must be on a single line.

We are hoping to add support for these in a future release.

Multiple requests in the same fileAs shown above, an HTTP file can have multiple different requests listed. They need to be separated with ### at the end of each request.

HeadersTo add one, or more, headers add each header on its own line immediately after (no blank lines) after the request line. Below are a few different examples.

GET https://httpbin.org/get?name=Sayed?☎=111-222-3333 HTTP/1.1Date: Wed, 27 Apr 2023 07:28:00 GMT###GET https://httpbin.org/get?name=Sayed?☎=111-222-3333Cache-Control: max-age=604800Age: 100###POST https://httpbin.org/post HTTP/1.1Content-Type: application/jsonAccept-Language: en-US,en;q=0.5{ "name": "sample", "time": "Wed, 21 Oct 2015 18:27:50 GMT"}### If you are calling an API which can authenticate with headers you can specify those in the headers as well. If you do this, be careful to not commit any secrets to your repository. We will be working on ways to supports secrets in a secure manner.

Now that we’ve gone through some of the supported syntax, in the next section we will list some features that the REST Client has which Visual Studio doesn’t currently support. If you’d like to see support for any of these features, please leave a comment below or send some feedback to the team (see the closing section below). This list is in no particular order. For more info on any of the items listed below, see the Visual Studio Code REST Client extensionv.

Not currently supported in the Visual Studio HTTP Editor* Optional HTTP Method * Request line that spans more than one line * Named Requests * Dynamic variables * Environment files * Specify file path as body of the request * Mixed format for body when using multipart/form-data * GraphQL requests * cURL request * Copy/paste as cURL * Request history * Save response body to file * Certificate based authentication * Prompt variables * System variables * Customize response preview * Per-request settings

Now that we have covered what is, and what is not, supported in the Visual Studio HTTP Editor, let’s move on to discuss what will be coming next for ASP.NET Core Web API developers in Visual Studio 2022.

What’s NextIn this post we have discussed the end-to-end flow of developing an ASP.NET Core Web API project including some new tools for those developers including the Endpoints Explorer and the HTTP Editor. This is the beginning of a long journey for us, we are planning to continue investment in this space for a significant amount of time. Some of the features and capabilities that we are investigating to add support for include. This list below is not in any particular order. The list below are some ideas that we are exploring, we are not making a commitment to deliver all these features at this time.

  • Add a stub for the body of a request – for request that require a body, today Visual Studio doesn’t add any content for the body of the request. We are looking at ways that we can add a stub for the body to make it easier to complete that request.
  • Add more support for the syntax of the HTTP file – we only support a subset of the syntax that the REST Client supports. We will be working to close that gap, we may not be able to support 100% of the features, but we are going to get as close as we can. Some of the top items that come to mind here include support for; Named Requests, environment files, support for mixed responses in a multipart/form-data request and copy/paste as cURL.
  • Improved Response View – the response view is very basic at the moment. We are planning to make a more structured response view to make it easier to read the results coming from the web server.
  • Show HTTP files in the Endpoints Explorer – currently the Endpoints Explorer only shows API endpoints in the solution. We would also like to surface HTTP files that are in the solution or opened in Visual Studio. This will enable you to inspect and explorer those files in a simpler manner.
  • Request history – we would like to provide support for you to be able to view requests that have been previously sent, and then to resend those requests. Editing a previous request is also a feature we would like to add support for.
  • UX to simplify making a request – currently to create a request you must type in the request manually. Some users would prefer to work with a graphical user interface to author that request.
  • Save response body to a file – after we improve the response view, we would like to add the ability for you to save the response body to a file.
  • Testing – we would like to find a way to simplify testing Web API projects. We don’t have any specific plans here yet, but this is an important area for us.

In the next section, I’ll describe the different ways that you can provide feedback regarding these scenarios. If there are features in the list above that you feel is very important, please share that feedback with us. We can only create incredible features with your help, your feedback is very important to us.

ClosingMost of the updates that we delivered in this release were inspired by feedback from users like yourself. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones. You can also leave a comment here or reach out to Sayed on twitter at @SayedIHashimi.

The post Web API development in Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

Over the last 12 months, we made many improvements to the JavaScript and TypeScript developer experience in Visual Studio so that you can run both your front-end and back-end together within one click in one place. You might have seen the updates but in this blog post we will detail the new and improved features now available when working with JavaScript and TypeScript in Visual Studio. We will focus mainly on the productivity improvements including the JavaScript and TypeScript project type, project templates, code editing, dependency management and compatibility with the VS Code debugging.

All the features and updates in this blog post are available in our latest version.

Download Visual Studio 2022 PreviewJavaScript and TypeScript Project TypeIn Visual Studio 2022, we created a separate project type for JavaScript and TypeScript with the project file extension .esproj. If you have JavaScript and TypeScript assets from other project types, you might consider using our standalone JavaScript and TypeScript project type. It provides you with the following benefits:

  1. We added support for referencing JavaScript and TypeScript projects via MSBuild, meaning you can now also reference them from ASP.NET projects.
  2. Npm package management is available to help you manage your dependencies, and it will be discussed in detail in a later section.
  3. Modern JavaScript frameworks including React, Angular and Vue are supported, and the new project creation will be based on your latest locally installed version of each CLI respectively..
  4. Compatibility with VS Code and standard JavaScript practices including launch.json and package.json etc. It will also be discussed in detail in a later section.

Project TemplatesIn Visual Studio 2022 version 17.5, we created new, combined templates for React, Angular, and Vue, together with ASP.NET Web backends. Using these combined templates, you can now create a multiple-project solution with a JavaScript or TypeScript front-end project and an ASP.NET Web API back-end project. This is a step towards making the development process more user-friendly.Before this update, developers had to use separate templates for front-end and back-end project types which were hard to set up properly. With this new update, you don’t have to add more configurations after creating the combined projects – they work with each other right out of the box and gives you a boost on getting things working seamlessly the first time you press F5.This improves on the existing .NET React and Angular single project templates by completely separating the front-end and back-end so they can be built, tested and deployed separately.

| Template Type | Link | | ASP.NET Core with React | https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-asp-net-core-with-react?view=vs-2022 | | ASP.NET Core with Angular | https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-asp-net-core-with-angular?view=vs-2022 | | ASP.NET Core with Vue | https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-asp-net-core-with-vue?view=vs-2022 |

Code Editing ExperienceIn Visual Studio 2022 version 17.6, we revamped the JavaScript and TypeScript code editing experience and brought some of your favorite code editing features from VS Code to Visual Studio – including syntax highlighting! Code lens is also now available in JavaScript and TypeScript files, so you can easily locate references to your code elements throughout your project. For more information please refer to this blog post.

Before:

After:

Dependency ManagementWe enabled the npm dependency management experience in Visual Studio using an interactive UI. Dependency management is an essential task for modern JavaScript frameworks and npm is the most popular dependency management tool for JavaScript. We brought npm to Visual Studio with a dialog to search and select the packages that you would like to install with description and version information available. It’s a richer and more productive experience compared with the CLI based approach because you know exactly what you would like to install. You will also see the prompts when newer versions are available to be installed.

Compatibility with VS Code DebuggingAs part of our commitment to compatibility with VS Code, we expanded support for launch.json, the launch configuration settings file for VS Code. You can now preserve all your debugging configs between these two platforms. Additionally, projects created by Visual Studio’s new project dialog can be opened in VS Code without friction. You can also open projects created by different JavaScript framework CLIs and projects configured to work in VS Code, within Visual Studio’s Solution Explorer using the JavaScript Project System, provided you include a project file (.esproj).

What’s NextPlease try out our latest JavaScript and TypeScript experience with the productivity enhancements in Visual Studio! Please let us know if there are features that you are looking for by Suggest a Feature for Visual Studio.

Now we have a good set of ideas of what’s next for JavaScript and TypeScript development in Visual Studio, but also want your feedback on these:

  1. Adding support for JavaScript and TypeScript linked editing, when changes in JSX tags mirror each other
  2. Improving npm UI to help dependency management, in both JavaScript and ASP.NET projects
  3. Improving helping to get your apps to Azure easier with continued integration with ASP.NET apps
  4. Running JavaScript and TypeScript inline unit tests using CodeLens
  5. Adding tools to help you easily open and import JavaScript and TypeScript projects in Visual Studio
  6. Further improvements to MSBuild integration for JavaScript and TypeScript projects so that it’s easier for you to include or exclude them from your build process

Please share your feedback with us so we can better tailor our efforts to the needs of our community of developers.

The post Exploring JavaScript and TypeScript Development in Visual Studio appeared first on Visual Studio Blog.

View Details

Syntax highlighting, aka colorization, is one of Visual Studio’s essential features; it uses colors and styles to help guide our brains when reading code. Following this Developer Community suggestion, we decided to work on improving the JavaScript and TypeScript experience!

Starting from 17.6 we improved existing colorization and expanded it to new areas including control keywords, strings in tags, escape characters, JSDocs, and more.

This post walks you through these changes and how you can configure and personalize your own!

OverviewSyntax highlighting is a Visual Studio feature that differentiate various parts of the code according to their meaning, such as keywords, variables, and comments. This makes your code easier to read and understand by visually distinguishing the elements of the source code.

To increase the efficiency of your code maintenance, we have remapped the TypeScript and JavaScript source code into new Display items. With this change, Visual Studio is now able to apply more granular styles and higher personalization. You can read more about Display items here.

ExamplesLook at these screenshots from before and after this change:

  • Control keywords are mapped to the Keyword – Control display item.

  • Types are mapped to the Type display item. You can also distinguish between HTML tags and React components!

  • Variables are mapped to the User Members – Locals display item. You can distinguish them better inside JSX as well, check {count} for example!

  • Escape characters are mapped to the String – Escape Character display item, making them distinguishable when within a string.

  • Parameter names are mapped to the User Members – Parameters display item. Values are assigned with their correct classification as well!

  • Methods are mapped to the User Members – Methods display item.

  • JSDoc tags are mapped to the Keyword display item.

Personalize the syntax highlightingAll the different parts of the source code are mapped to a Display item that defines the style of the editor. Visual Studio provides an effortless way to personalize them.

To access these settings, go to Tools > Options > Environment > Fonts and Colors and select Text Editor from the Show settings for dropdown. Select the Display item and set the Item foreground, Item background, Font, and Size to the options you want.

For example, if you want variables to be White, you can choose the display name User Members – Locals and change the Item foreground to White:

Let us know what you think!We hope you like the new experience. If you found an issue or would like to suggest a change, follow this link to Visual Studio Feedback and fill out a feedback ticket. We will be happy to hear about it!

The post Improving the Syntax Highlighting of JavaScript in Visual Studio appeared first on Visual Studio Blog.

View Details

We’re excited to share productivity and quality of life improvements available to the Git experience in Visual Studio version 17.6 Preview 2. Download the latest Visual Studio Preview and watch our recent Visual Studio Toolbox Live session to check out the following new Git features.

Download Visual Studio Preview

| New Feature (Links to the section of the post) | Description | | Improved Search for Related GitHub Issues and Azure DevOps Work Items | Find all your related issues and work items from your commits with better search results. | | Merge Conflict Warning | Know when to expect merge conflicts – before you merge. | | Stage and Commit During Build | Avoid waiting for the build to end to commit your changes. | | Git History Perf Improvements | See your history results faster. | | New Branch and Tag Naming Enhancements | Avoid errors when creating new branches and tags. | | Line unstaging | Catch irrelevant code changes before you commit them. |

Improved Search for Related GitHub Issues and Azure DevOps Work ItemsDuring this release, we’ve improved on the Issues and Work Items integration in the commit message we introduced in 17.6 preview 1. You now get better search results when querying for items that you haven’t updated recently. You also can view items that aren’t related to you but are part of your project or repo without needing to know the id. The search works by matching complete strings in your items’ names. This can help minimize copy-pasting item ids between the browser and Visual Studio.

Merge EnhancementsWe improved the merge dialog to give you more information and control over your merges. You now know how many files are being affected during a merge, which can help you avoid merging from the incorrect branch. Additionally, we’ll warn you if there might be conflicts.

The checkbox also allows you to configure whether you’d like to automatically commit changes after the merge for each merge, instead of having to toggle that option in settings.

Stage and Commit During BuildWe heard feedback that not being able to complete certain git operations during the build process hurt productivity. As a start, we’ve enabled staging your changes and committing your staged items while you’re waiting for the build. Committing directly is a risky operation since the build may add temporary files to your solution. To ensure you’re not accidentally committing any unintended changes, you can now stage them first, verify your files are correct, and then commit them.

Git History Perf ImprovementsGit Log Demo (Roslyn)

Improvements to our Git History now load previous commits faster, allowing you to dig into your file and folder history quicker than before. Time gain will vary based on how recently a file has been changed.

New Branch and Tag Naming EnhancementsImprovements to the New Branch and New Tag dialogs automatically replace spaces with dashes to avoid invalid characters in the name. This makes copy-pasting issues names and numbers into branch names, a common flow for developers using issue tracking, much easier. No more fixing up the whitespace characters.

Line UnstagingAs we incrementally improve our line-staging (aka interactive staging) feature that we GA’d in version 17.3, we’ve added unstage. You can now use the hover option to unstage changes, line by line, as requested here.

Known issue: You’ll need to have current unstaged changes in your working directory to try this feature out.

Keep engaging with usThese productivity updates would not have been possible without your suggestions and feedback, so keep engaging with us on Developer Community to suggest new features for Visual Studio.

The post Git Tooling Preview Features to Enhance Productivity appeared first on Visual Studio Blog.

View Details

SummaryWith the release of Visual Studio 2022 version 17.6 we are shipping our new and improved Instrumentation Tool in the Performance Profiler. Unlike the CPU Usage tool, the Instrumentation tool gives exact timing and call counts which can be super useful in spotting blocked time and average function time. To show off the tool let’s use it to improve performance in Visual Studio.

Wait, I thought Visual Studio already had an Instrumentation tool?If you were thinking, “Doesn’t Visual Studio already have an Instrumentation Tool” then you were thinking right! So, what’s… new? Well, a whole list of things

  • Faster and less resources: The tool is significantly faster and uses less disk space, clone the repo and check out the measurements for yourself.Sample App: ScabbleFinderDotNet
  • Enhanced targeting for .NET: The tool has better targeting for .NET scenarios so you can scope your instrumentation all the way down to specific functions to lower overhead and get better data.
  • Flame Graph: The flame graph helps you graphically see where the most amount of time is spent in your application and quickly narrow on areas to improve.
  • Better error handling: The tool helps with common issues such as missing the “/profiler” linker flag for C++ projects. If you do hit issues that you can’t figure out, we are ready to help over at Developer Community.

Let’s go mine for performance!To start, I have a console application called AnalyzerBench which takes in a diagsession from the Performance Profiler and runs our analysis backend on it then exits. This lets me have a repeatable benchmark that I can measure and see the effects of my changes. The diagsession I have is from tracing every allocation of Visual Studio startup, over 4.3 million allocations, with the .NET Object Allocation tool. Running the Instrumentation tool from the Performance Profiler (Alt+F2) I get the following dialog:

This lets me select what projects I want to instrument, allowing me to target my instrumentation to reduce overhead. In my case I want to see our analysis for the .NET Allocation tool, so I select our DataWarehouse and the DotNetAllocAnalyzer projects but not AnalyzerBench since I don’t care about that. If you are unsure of what you want to profile, the CPU Usage tool is great for getting a general idea of where time is being spent and then you can investigate deeper with the Instrumentation tool targeting specific areas. After running the tool, I see the following:

The top functions show us which functions are taking the most amount of time and the hot path shows us the most expensive code path. My go-to is to open the details panel and switch over to the flame graph which shows the following.

Looking at the flame graph I see a System.Threading.Monitor.Enter taking ~20% of the time which is interesting. By right clicking on the node, I can cross reference to where this is happening in the call tree.

Turns out our Monitor.Enter function is showing as a hot function and its parent ImportDataSource is taking ~17% of the total time. In the call tree you’ll notice there are a few new columns with more hidden in the context menu of the header. Since the instrumentation tool gives us exact call counts, we can calculate stats like min, max, and average function time. Not only does Instrumentation give us exact call counts, but it also measures wall clock time. This lets us see non-CPU bound issues like contention. In this case, based on the call count we can see that there are three calls to ImportDataSource and they spend about 5s on average waiting on the lock. What is really happening is that the first call gets the lock and the other two wait ~8s for the first data source to complete before they can import. This means 2 thread pool threads are synchronously blocked and can’t do any work which could lead to thread pool starvation.

To fix this we could investigate using some parallel data structures so that the lock isn’t needed or change the method signature so that it is async and use SemaphoreSlim.WaitAsync so that we at least don’t block thread pool threads. As both changes are a bit more involved, we can add a TODO to the code and come back later.

Switching back to the flame graph, the next thing jumping out at me is List.Sort, from a glance it looks like we are spending ~20% of our time sorting some data. Again, right-clicking on the node and cross referencing over to the call tree we can see our details stats. This shows we are calling sort over 24K times, spending 20 seconds sorting data!

In this code we are sorting the allocations for each unique type which is needed to quickly filter when selecting time ranges on the graph in the profiler. For the most part, though these allocations should be sorted as we get a callback for each allocation and write it to our diagsession file. If there are many allocations at the same time on different threads they might be out of order, but this is probably something we can check for when adding to the list and then only sort the unsorted lists here. Making this change and rerunning the instrumentation tool we can see that now we have nearly removed all the time spent here, and in the case of this trace we didn’t have to sort anything as all of the allocations were already sorted in the file.

/// <summary>/// Add an allocation instance to the current type/// </summary>/// <param name="allocationObject">allocation object</param>internal void AddAllocation(AllocationObject allocationObject){ if (this.Allocations.Count > 0) { this.allocationsSorted &= allocationObject.AllocTimeNs >= this.Allocations[this.Allocations.Count - 1].AllocTimeNs; } this.Allocations.Add(allocationObject);}/// <summary>/// Finalizes the data for fast retrieval/// </summary>public void FinalizeData(){ if (!this.allocationsSorted) { this.Allocations.Sort(TypeObject.comparer); this.allocationsSorted = true; }} A small change to track the sort state of the lists here has trimmed 20 seconds off a 110 second trace resulting in ~20% performance improvement.

ConclusionThe new Instrumentation tool is awesome (at least I think so ) and a little performance investigation can go a long way. In less than an hour of profiling and poking at the code I improved load performance of the .NET Allocation tool by ~20%. Let me know what you found while profiling your code and what factor of improvements you were able to achieve with the new Instrumentation tool!

Talk with usThe post Improving Visual Studio performance with the new Instrumentation Tool appeared first on Visual Studio Blog.

View Details

The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling in and out of Visual Studio. Our latest episodes of VS Toolbox (available both on Learn and YouTube) feature Mark Downie and Ramkumar Ramesh from the Visual Studio Diagnostics team. They demonstrate how you can use the Threads and Tasks views of the Parallel Stacks window in VS 2022 to debug your multithreaded applications.

When debugging multithreaded applications, understanding the relationship between threads is important for properly designating and negotiating resources between them. In the Debugging Threads with the Parallel Stacks Window episode, Mark and Ram use a demo app containing deadlocked threads. They show how you can use the Parallel Stacks window to see a visual representation of all the threads in a process. This can help you find out where and why the deadlock has occurred.

The async/await programming model is used by lots of developers, who use it to unlock the benefits of parallel programming. In the Debugging Tasks with the Parallel Stacks Window episode, Mark and Ram show an example of two tasks waiting on each other. The tasks are in a cycle or a deadlock. They use the Parallel Stacks window to find the problem and understand how to solve it.

If you are building multithreaded applications, check out these episodes to see how you can discover your threading and tasks issues faster and easier!

The post Visual Studio Toolbox: Debug Threads & Tasks with Parallel Stacks appeared first on Visual Studio Blog.

View Details

The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling both in and outside of Visual Studio. The show is available both on Learn and YouTube. Our latest episode features C++ program manager David Li, who shows how you can use the new Unreal Engine Integrations in Visual Studio 2022 17.5 to be more productive and build games faster with C++ and the Unreal Engine.

David first talks about how Visual Studio helps you avoid the losing your focus by having to bounce back and forth between environments. He then shows how to install the Unreal Engine extensions and take advantage of their new features. In the rest of the episode, David shows how to work with UE Blueprints, enable code analysis on your game code, view UE logs, expand UE macros and add UE classes, all from within Visual Studio!

If you are a game developer using the Unreal Engine, check out this episode to see how you can boost your productivity!

The post Visual Studio Toolbox: Integrated C++ Game Development appeared first on Visual Studio Blog.

View Details

GitHub Copilot has become a trusted AI-assisted pair programmer helping to auto-complete comments and code more productively. That’s just the beginning though! We’ve been working to evolve Copilot to move beyond code completion and provide enhanced AI assistance that you can access throughout your development lifecycle, whatever task you happen to be doing at the time.

Copilot chat in Visual StudioWe’re bringing fully integrated AI-powered Copilot chat experiences to Visual Studio. This is no ordinary chat! With tight integration in Visual Studio, it understands what you’re working on. That means it can quickly help you get in-depth analysis and explanations of how a code block works, generate unit tests, and even find and get proposed fixes to bugs, or explain exceptions. Check out the video below to see what we mean. And this is just the start. Watch out for more AI assistance across your whole lifecycle as we continue to develop Copilot. Already excited? Sign up for the private preview below.



With GitHub Copilot chat, if you find yourself needing more information, you can ask it to explain the code you’re working on. When you hit an error, ask Copilot to help fix it and generate unit tests. If an exception gets thrown, ask Copilot to help you figure out possible causes and even suggest fixes. By gathering the right data from Visual Studio, Copilot grasps your intent and helps you form exactly the right question to get useful answers. Using GitHub Copilot with Visual Studio gives you more time for creativity by spending less time on boilerplate manual tasks and diagnosis.

Sign up for the private previewWe’ll be sharing GitHub Copilot Chat for Visual Studio with a private preview soon – just sign up to be wait-listed.

Learn more and share your feedbackThere’s a whole set of new ways Copilot will be able to help you with your development work, from enhancing pull requests to personalized documentation and even a natural language way to run your CLI. Please check out Thomas Dohmke’s GitHub blog post to learn more.

We’re excited to see where this next wave of AI-assisted productivity takes you as you create great software, and we’d love to hear your feedback on the GitHub Copilot Community forum.

The post GitHub Copilot chat for Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

Have you ever had a situation when you are debugging a complex scenario with a huge list of breakpoints, and you find yourself scrolling and tapping in the breakpoints windows to disable/enable them individually and repetitively?

Then the new Breakpoint Groups feature in Visual Studio may be the answer for you. This feature will allow you to create named breakpoint groups with any number of breakpoints in them. This provides a way to customize the breakpoint configuration and toggle breakpoints individually or in combination making debugging, testing, and troubleshooting faster and more effective.

Breakpoint Groups is now available in Visual Studio’s 17.6 P2 and will become a staple of the debugging process for many developers.

Download Visual Studio 2022 PreviewBreakpoint GroupsBreakpoint groups can simplify and organize the debugging process by allowing you to create separate breakpoint groups that correspond to distinct aspects of the application, such as individual functions, modules, or even projects. This organization makes it easy to switch between different debugging scenarios, test different theories, and track the results of each debugging session.

Let’s see an example: I have this .NET web application where users can browse through merchandise and purchase items they like. While working on the application, I discovered that the basket/cart feature is not showing all the items that users have added. To investigate, I added several breakpoints in my BasketViewModelService.cs file.

I also had a lot of breakpoints from my last session that I may need later for different scenarios, so I ended up with this long list of breakpoints. (As shown in the image below). Once I started debugging and stepping through the code to investigate the new basket/cart scenario, all of my other breakpoints started triggering as well. The only solution I had was to disable all of the breakpoints I didn’t need individually, which was a tedious process.

Create and manage Breakpoint Groups Now let’s see how I can simplify this scenario using Breakpoint Groups. With this feature, I created a Breakpoint Group named “Basket”. You can create a new breakpoint group using the “New” dropdown in the breakpoints window or using the Debug > New Breakpoint menu on the top.

I added all the breakpoints I need to debug my current issue in the “Basket” Group using the “Add to Breakpoint Group” right-click option. You can also simply drag and drop breakpoints into the desired group. I created some other groups for my prior breakpoints. This is how my breakpoint window looks now.

For my scenario, I only kept the breakpoints from the “Basket” group enabled and disabled everything else. This way, I was able to quickly step through the code only focusing on the “Basket” scenario to find the root of the issue. I can still toggle other breakpoints individually or in groups as needed. In addition, all my breakpoints were organized in a hierarchical structure which made it much easier to locate them.

To sum it up, breakpoint groups can play a pivotal role in software development since they allow developers to quickly narrow down sources of issues and bugs and enable the seamless working of multiple projects and investigations simultaneously.

Coming up, we have several exciting enhancements such as dependent breakpoint groups, breakpoint group import/export, and others. Keep an eye out for upcoming Preview releases for these!

We want your feedback!The Breakpoint Groups feature in Visual Studio is a game-changer for both experienced developers and those new to the platform. As the feature continues to evolve, we invite you to test it out in 17.6 Preview 2 and provide your feedback on the Allow creation of breakpoint groups ticket on Developer Community.

Additionally, you can easily report bugs, offer suggestions, ask questions, and share your thoughts on other Visual Studio features by using Developer Community.

The post Streamlining your Debugging process with Breakpoint Groups appeared first on Visual Studio Blog.

View Details

TL;DR – A deep learning model will now help provide starred completions for custom methods in the IntelliSense list. All users of Visual Studio 2022 will receive this improvement automatically.

With original IntelliCode, a custom trained model was previously useful for ranking custom methods in a user’s code.When IntelliCode first shipped in Visual Studio, it used a simple Markov-chain model to rank methods in the IntelliSense list. This model couldn’t rank custom methods that are specific to your code, so we enabled developers to train repository-associated team & personal models to rank custom methods specific to your code in the IntelliSense list.

Deep learning enables IntelliCode in Visual Studio 2022 to rank custom methods in the IntelliSense list out of the box. Since the Visual Studio 2022 release (version 17.0+), custom methods are ranked with the help of a neural encoder model.This deep learning model ranks candidates provided by static analyzer to provide the following benefits to developers:

  • Provide completions even on unseen libraries – for instance, private user code which is not present in the training set.
  • Completions tailored to your code – all without the need to train a personal / repository associated team completions model.
  • All your code stays local – the model runs right on your computer, so there’s no need to transmit code to a remote server for custom model training.This is enabled by our machine learning system design, which led to dramatically reduced memory footprint and improved inference speed.

In fact, the deep learning model provides better suggestions over time by observing the following context:

  • The specific programming language being used, libraries and frameworks, and other contextual information.
  • The user’s editing history to dynamically update the ranking model based on the user’s recent code changes.

Real world telemetry shows that the deep learning model provides a better IntelliSense experience and improved productivity for developers in Visual Studio.While users were still able to access the repository-associated team & personal models in Visual Studio 2022, the team wanted to conclusively prove that the deep learning model was better even for custom code.

With the confidence from telemetry in hand, the option to train a custom model is now disabled.

All Visual Studio 2022 users will automatically switchover to using the improved deep learning model – including those who had previously trained custom repository-associated team & personal models.

Thanks for being a part of the IntelliCode journey.The post Upgrading from IntelliCode custom team completions models to deep learning. appeared first on Visual Studio Blog.

View Details

A central theme across Visual Studio releases is ‘get to code’ quickly. Over the years, we’ve tried many approaches to accelerate start up, project selection or creation, and restoration of previous state. In Visual Studio 2019 we created the modal ‘start window’ experience that optimized for getting to the primary action most developers take when starting the shell. Since that release, there’s been mixed feedback. Much of the critical feedback revolved around the modality interruption when switching between solutions. That has led us to reconsider other options for “get to code.”

With your feedback in mind, we started experimenting with a new Welcome Experience. We’re only just starting our initial investigations in this area, and we know there’s a lot of work we need to do here to ensure a great experience. Read on for more information on what we’re thinking and download Visual Studio 17.6 Preview 2 today to give it a try and share your feedback:

Download PreviewOnce you update to Visual Studio 17.6 Preview 2, you’ll get a sneak peek at some of our first attempts at improving the experience on launch of Visual Studio, informed by the previous start page versions, while leveraging the performance and UX improvements that were made for the start window. You’ll encounter an in-IDE Welcome tab instead of the modal Start Window, allowing you to jump right into the shell.

The Welcome page presents all the options you’re used to accessing from the Start Window as a tabbed document window in the IDE itself. These include:

  • Your most recently used project list
  • A search box for recent projects
  • Quick links for creating a new project, opening an existing project, opening a folder, and cloning a repository

You’ll also find a new tile linking to the “What’s New” page, which shows information on some of the new features shipped in Visual Studio. If you’d like to free up some space on the Welcome tab, you can close the What’s New tile. This is a first step toward bringing additional customization to the page. Be sure to let us know what else would be useful to you for customizing your Welcome experience.

Visual Studio WelcomeLet us know what you think!Give the new Welcome page a try and let us know how it works for you. Let us know if there are any tiles or customizations you’d like added, or whether there’s anything we can improve about the already existing experience. We’ve created an item in Developer Community to serve as a hub for discussing the early work around this experience. Please join in the conversation there!

If you’re interested in seeing Developer News in the Welcome page, please upvote this item. If you have any other feedback, please feel free to share in Developer Community!

The post Help us investigate a new Welcome Experience in Visual Studio 17.6 Preview 2 appeared first on Visual Studio Blog.

View Details

Welcome to our latest blog post about the spell checker feature in Visual Studio 17.6 preview 2! We’re excited to share with you the latest improvements we’ve made to this feature, which was first introduced in the Visual Studio 17.5 preview releases for C#, C++, and markdown files. We’ve received an overwhelming amount of valuable feedback from developers like you, which has helped shape and refine this feature before its release to the release channel.

If you’re new to the spell checker feature, check out our earlier blog post for an introduction. Otherwise, let’s dive into the exciting enhancements in Visual Studio 17.6 preview 2!

Programming Language Specific DictionariesThe biggest feedback we heard was concerning false positives. The spell checker uses the same dictionaries as the spoken languages that were detected. We added heuristics to compensate for how code uses those words, so constructs like HelloWorld would be properly spell checked, but developers use many words that aren’t part of our spoken languages. Words like ‘guid’ or ‘args’ are commonly found in code documents but were getting flagged as misspelled words by the spell checker.

In this update, we’ve partnered with the C++ and C# teams to add exclusion dictionaries specific to those languages that detect words are commonly used in those languages. This should significantly reduce the number of false positives, especially when commenting out pieces of code. Later in this post, we’ll discuss the switch we’ve added to editorconfig that can control this behavior, should users want to disable it.

Exclusion Dictionary EncodingAnother issue many folks ran into was around the encoding of the exclusion dictionaries used by the spell checker. Visual Studio will use the exclusion dictionary specified by the spelling_exclusion_path switch in your editorconfig file or an “exclusion.dic” file in your %localappdata%\Microsoft\VisualStudio\<Version> directory if a switch can’t be found. In either case, the spell-checking APIs required the exclusion file to have “UTF-16 with BOM” encoding to work correctly. We got multiple reports of the encoding becoming corrupted, particularly when users manually modified these files to remove excluded words.

With this update, we’ve improved the way Visual Studio works with exclusion files. UTF-16 encoding is no longer necessary, so users should be able to modify exclusion dictionaries without running into encoding issues.

Better Special Case HandlingWe also appreciate the folks who caught some cases we didn’t think of. We added additional improvements for some special cases based on this feedback:

  • Strings that contain URLs (E.g., “https://...” or ”mailto:..”.) will not be spell checked over the entire string.
  • Backslashes will omit the subsequent character from spell-checking. For instance “\nhello” will no longer be flagged as a spelling error since the ‘n’ is omitted and ‘hello’ is a correctly spelled word.
  • Recommendations that include punctuation will no longer be recommended. For instance “misc.” will no longer be recommended as it could cause code that won’t compile.

Customizing the Spell CheckerWe added the spelling_use_default_exclusion_dictionary switch for editorconfig in this update. For your convenience, here’s the full list of available options:

spelling_languages = _language_[,_language_]``(Example: = en-us,fr-fr)

  • This lists the languages for Visual Studio to use. In this example, Visual Studio would only use the en-us and fr-fr dictionaries when checking for spelling issues. Note that the fr-fr language pack must be installed on the user’s machine or Visual Studio will incorrectly flag any French words as spelling errors.

spelling_checkable_types = strings,identifiers,comments``(Example: = identifiers,comments)

  • This controls what Visual Studio should check. In this example, Visual Studio would check identifiers and comments for misspelled words but wouldn’t check inside strings.

spelling_error_severity = error OR warning OR information OR hint``(Example: = error)

  • This controls the severity Visual Studio will assign to spelling errors in the error list. In this example, spelling errors will be displayed as errors.

spelling_exclusion_path = absolute OR relative path to exclusion dictionary.``(Example: = .\exclusion.dic)

  • This allows you to create your own exclusion dictionary to specify words you consider to be correctly spelled. The exclusion dictionary is a simple text file that can be checked into source control where each line in the file contains a single word that should be considered a properly spelled word. In this example, the first time the spell checker is run against any file in the solution, Visual Studio will check for an exclusion.dic file in the same directory as the .sln file (for a C# project) or in the root directory (for a C++ directory). If no file exists, the spell checker will create one. Then, whenever you choose to ignore a word, it will be added to this exclusion.dic file. Visual Studio will consider any word that appears in this exclusion.dic file as a correctly spelled word.

spelling_use_default_exclusion_dictionary = true OR false``(Example: = spelling_use_default_exclusion_dictionary = false)

  • This controls whether the language specific exclusion dictionary will be used. When set to false, any words specified in the C++ or C# specific exclusion dictionaries will NOT be used. The default is true.

Your feedback matters!We greatly value the feedback we’ve received from our users and are thrilled with the positive reactions we’ve received. Your input has directly influenced the improvements we’ve made to Visual Studio, and we’re eager to continue evolving the product to meet your needs. We have an ambitious roadmap ahead, and your feedback will help us prioritize our efforts. Let’s keep the conversation going on Developer Community, and thank you for being an essential part of the Visual Studio community!

The post Improving the Spell Checker appeared first on Visual Studio Blog.

View Details

Preview 2 for Visual Studio 17.6 is now available! If you are a game developer, a mobile developer, or are interested in learning new tricks to better debug your code, check out this latest release. It’s as easy as upgrading your Preview channel in the Visual Studio installer.

And if you haven’t activated your Preview channel for Visual Studio yet, click the button below to install Preview 2 now. You can also check out for the complete list of new experiences coming online for 17.6. Oh, and rest assured that Previews always install side-by-side with the officially supported Visual Studio releases, so you can always switch between them as you please.

Download Visual Studio 2022 v17.6 Preview 2In this blog post, we’ve summarized the most significant changes in the latest release of Visual Studio 2022. If you’re interested in a complete list of improvements, we recommend checking out the Visual Studio 2022 17.6 Preview 2 Release Notes. We encourage you to try out all the new features and capabilities we’re actively working on for the upcoming 17.6 release. By providing your suggestions and reporting any problems you encounter, you can influence the development of these features and help us make them even better.

    • Level Up Your Productivity - Git Stage and Commit During Build - Improve Merge Dialog - Breakpoint Groups - Instrumentation Profiling for C++ - Profiler Live Graph for .NET on WSL - Create C++ Member Function
    • Streamline Game Development
      • Unreal Engine Code Analysis
      • HLSL Tools Extension by Tim Jones
    • .NET Mobile Development
      • Android Manifest Editor
    • Enterprise Management
      • Host and Deploy Visual Studio layouts from your intranet
      • Limit exposure to available products in the Installer

Level Up Your ProductivityWith Visual Studio 2022, our goal is to help you get more done in less time throughout all your development tasks inside the IDE. In this Preview, we’re introducing enhancements to make your Git, debugging/diagnostics and C++ editing workflows more efficient.

Git Stage and Commit During BuildWe responded to customer feedback, and you can now stage your changes and commit your staged items during a build. Committing directly is a risky operation since your files may change, but now you can stage them, verify your files are correct, and commit them – all while a build is running.

Improved Merge DialogUpdates to our Merge Dialog make it easier to understand how many files are being affected by the merge operation and warn you if there might be conflicts. You also have more control over when you’d like automatically commit your changes after the merge.

Breakpoint groupsThe breakpoint groups feature allows users to simplify the debugging process by organizing breakpoints into specific groups and managing them as a single entity, making debugging, testing, and troubleshooting more efficient.

Navigate to the “New” dropdown in breakpoints window and select “Breakpoint Group” to create a new group for your breakpoints.

To add a breakpoint to an existing group, right-click the breakpoint and choose “Add to Breakpoint Group”. You can also drag and drop the breakpoint into the desired group. These breakpoint groups can be enabled, disabled, and deleted. The breakpoints can be toggled individually or in combination as needed.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2023/03/breakpoint-groups.mp4Instrumentation Profiling for C++The Visual Studio Instrumentation tool now supports C++ code, providing improved performance analysis. To access the instrumentation tool, go to Debug > Performance Profiler and select “Instrumentation” from the Profiler window that appears.

The Instrumentation Data View presents a list of functions ordered by longest-running, making it easier to identify potential bottlenecks. Additionally, the Hot Path section displays the call stack for the functions that are consuming the most CPU, providing further insight into performance issues.

To learn more about Instrumentation, check out Instrumentation in Visual Studio on Microsoft Learn.

Profiler Live Graph for .NET on WSLThe Visual Studio profiling tools now also support live graphs while collecting from dotnet-monitor for WSL. The WSL live metrics are available for .NET object allocation, CPU usage, and the .NET counter tool.

While the tool is initially collecting data from dotnet-monitor for WSL you can see the real-time graphing for live counter information, then you can stop collecting and see detailed breakdown views of memory allocation, call trees, functions, collections, and other related data.

Microsoft Learn has more information about Analyzing memory usage for .NET objects.

Create C++ Member FunctionCreate Member Function is a feature that can help you to quickly add C++ constructors and equality operators. When you have a class with fields, three dots will appear under the class name, and hovering over them will display a screwdriver icon. The drop-down from the screwdriver icon will display the new member function suggestions. Thus, you can add a default constructor, constructor with all fields, equality operator, and equality operator with all fields.

The example below shows how a constructor with all fields and equality operator with all fields can be added. The operator’s Go to def is also displayed.

https://devblogs.microsoft.com/visualstudio/wp-content/uploads/sites/4/2023/03/cpp-create-member-function-example.mp4Streamline Game DevelopmentWe’ve also been working tirelessly to ensure that Visual Studio is a great tool for building games, whether you are a single-developer indie game creator or working on a AAA title. 17.6 Preview 2 includes more improvements that help you build better games faster.

Unreal Engine Code AnalysisYou can now see warnings and errors from the Unreal Header Tool directly in Visual Studio. Available as a preview feature, the Unreal Header Tool emits warnings and errors while parsing Unreal related C++ headers. You can find these warnings in the Error List as well as see them visually denoted by purple squiggles in your editor. For more information about these warnings and errors, please visit the Unreal Header Tool Documentation page.

To try this feature, make sure the “IDE support for Unreal Engine” is selected in the “Game development with C++” workload in the Visual Studio Installer.

Since this is a preview feature, we would greatly appreciate it if you leave feedback by commenting in Code Analysis Feedback ticket. We plan on adding additional Unreal Engine specific code analysis in the upcoming previews, stay tuned!

HLSL Tools Extension by Tim JonesHLSL (High Level Shading Language) is a DirectX-specific programming language used to create shaders in game development and rendering applications. The popular HLSL Tools extension by Tim Jones is now available as part of Visual Studio. Power up your HLSL development productivity with syntax highlighting, statement completion, go to definition, and more!

To use HLSL Tools, please enable the component in the “Game development with C++” or “Game development with Unity” workload in the Visual Studio Installer.

.NET Mobile DevelopmentAndroid Manifest EditorYou can now use a visual editor for modifying Android manifest files. Double-click on your AndroidManifest.xml file from the Solution Explorer and easily set available properties and request device specific permissions.

To learn more, check out Working with the Android Manifest on Microsoft Learn.

Enterprise ManagementAdministrators want to properly enable, configure, and deploy Visual Studio within their organization. In this release, we’re continuing to make improvements with two new features described below. Watch this space for more to come.

Host and Deploy Visual Studio layouts from your intranetMany companies that want to tightly control the Visual Studio version their organizations use, or whose client machines don’t have access to the internet, currently have the option to download and store Visual Studio in a “layout” that is made available via a file network share for their developers to install and update from. Starting with Visual Studio 2022 version 17.6 Preview 2, organizations will now be able to host and deploy layouts on an intranet website in addition to a file share. Using an intranet location can simplify layout maintenance and improve installation performance, particularly for those organizations that currently use multiple global network file shares. The scenario is currently targeted for IT Administrators to remotely deploy from. Please visit the feedback site to view guidance for how to enable this experience and let us know if there’s any functionality missing that you would need.

Limit exposure to available products in the InstallerWe’ve updated the logic that controls what products are offered as available when you view the Visual Studio Installer’s “Available” tab. You should now have easy access to current Previews, as well as the ability to restrict exposure to certain products by disabling channels or using the new “HideAvailableTab” policy to disable the available tab altogether.

Your FeedbackIn addition to all the product enhancements above, also check out the recently completed suggestions that you previously shared with us:

  • Arm64 support for .NET Maui
  • Search and reference GitHub issues from the commit message box
  • Allow .natstepfilter and .natjmc to be included as part of a project (vcxproj)

Help us build a better Visual StudioAs you use Visual Studio, let us know what you like and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

Happy Pi Day!

The post Visual Studio 2022 v17.6 Preview 2 is now available appeared first on Visual Studio Blog.

View Details

We are excited to announce that Visual Studio 2022 17.5 offers a range of performance enhancements that significantly improve the speed and responsiveness of the product in the following main areas:

  • Build Acceleration for .NET SDK style projects
  • External Sources Decompilation
  • Thread Window
  • Razor & C# experience
  • Quick Add Item
  • Code Coverage

You can download Visual Studio 2022 from the Visual Studio downloads page or upgrade your existing installation by following the Update Visual Studio page.

Download VS2022 17.5Build Acceleration for .NET SDK style projects Build Acceleration for .NET SDK style projects are an opt-in feature that directs Visual Studio to only build projects that had modifications while skipping projects that were unchanged. Enabling Build Acceleration can reduce incremental build times by up to 80% for SDK-style .NET projects.

For further details and instructions on enabling/disabling Build Acceleration, please visit the link.

External Sources De-compilation You’ll also find de-compiling large modules in 17.5 is up to 10 times faster! Decompiling .NET libraries on a call stack demonstrates that it is now possible to de-compile multiple modules in less time than it took to de-compile a single module in version 17.4. These improvements would likely make debugging and troubleshooting issues more efficient.

Threads Window The performance of the threads window has been vastly improved in 17.5! The response time of the window now scales very well when debugging applications with large number of threads. This animation demonstrates the speed of 17.5 compared to 17.4 when debugging an application with around 200 threads.

Quick Add Item17.5 introduces a faster way to add files and folders to your solution! The “New Item” menu command (Or Ctrl+Shift+A shortcut) brings up a compact dialog where you provide the name and extension of the file you want to add, and a file with matching template will get added to your project. Compared to the dialog that shows all templates, the compact dialog is much faster and lets you get the job done with fewer gestures. The new dialog also allows multiple files and folders to be created with a single invocation of the dialog, giving a further boost to developer productivity!

You can learn more about the quick Add Item experience by watching a short video.

Razor & C# Experience To address the feedback about productivity and performance surrounding Razor we’ve added support for code actions in Razor files, including some helpful shortcuts like “Remove Tag,” “Encode image in Base64,” and “Insert Image height/width.”

Code Coverage We have made significant improvement to the performance of dynamic code coverage by addressing an issue related to inlining. Our investigation showed that dynamic instrumentation was globally disabling inlining. For instance, running coverage tests on the Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests project in Roslyn executes over 1 million code blocks while only around 400,000 blocks are instrumented to test code coverage. To optimize this, we now enable inlining when neither the caller nor the callee are under code coverage. This change has led to a significant boost in the speed of dynamic code coverage. Code coverage tests on the Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests project in Roslyn run over 35% faster in 17.5!

Tell us what you think!  We hope these performance enhancements make your development work efficient and enjoyable. Feedback from developers like you is very important for us to improve the product and meet your expectations. We welcome your feedback on Visual studio performance. The preferred approach is using the Report-a-problem tool. You can also leave comments below.

The post Visual Studio 2022 – 17.5 Performance Enhancements appeared first on Visual Studio Blog.

View Details

When your application has an accessibility issue, it means that some users will find it harder or impossible to use your application. This means that a percentage of your users are having a bad experience or simply can’t use your product. The implications are far reaching, because many countries have laws governing accessibility in applications for consumers, government, or educational use. Accessibility is as important as privacy or security, to ensure your application is usable by all developers and complies with legal standards.

The Integrated Accessibility CheckerThat’s easier said than done, but Visual Studio is making it easier. Visual Studio 2022 17.5 introduced the Integrated Accessibility Checker. This tool scans for several common accessibility issues in desktop applications and provides feedback on those errors directly in Visual Studio. The scan is powered by the Axe-Windows engine. This is the same engine which powers Accessibility Insights for Windows. The Integrated Accessibility Checker now brings the power of this engine directly into Visual Studio for a more streamlined experience.

Getting StartedCurrently, the Integrated Accessibility Checker works on XAML based, desktop applications, including WPF, UWP and WinUI3. This includes .NET MAUI when it’s running with WinUI3 as well as Xamarin when it’s running with UWP. To access the Checker, invoke either the “Show Accessibility Checker” button in the In-App Toolbar or the “Scan for Accessibility Issues” button in the Live Visual Tree while you’re debugging your application.

When you invoke the scan button, Visual Studio will scan the running application for any accessibility issues the Axe-Windows engine knows how to detect. Visual Studio will then display these issues in the Accessibility Checker panel at the bottom of the Visual Studio IDE.

The panel will display the Automation ID when it’s available, additional information about the rule causing the issue, a description of the issue and some information to fix the problem. Hot Reload will allow you to fix many of the issues in your XAML and push them directly to the running app. In these cases, either of the scan buttons in the In-App Toolbar or the Live Visual Tree, as well as the green triangle in the Accessibility Checker panel can rescan your application to confirm that the fix properly addressed the issue.

More to ComeThe Integrated Accessibility Checker is the first tool Visual Studio is providing for developers to build accessible applications. Our mission is to help developers have immediate access to the tools to create accessible applications. The Integrated Accessibility Checker can’t detect all accessibility issues, but it’s a start.

We’re eager to see how folks feel about the Integrated Accessibility Checker, and we’d love to hear from you. Head over to Developer Community and let us know what you think. Also, for more accessibility tools, including tools for testing web or Android apps, check out Accessibility Insights.

The post Developing Accessible Apps with Visual Studio appeared first on Visual Studio Blog.

View Details

Today, we’re very excited to announce the third public preview of VisualStudio.Extensibility, our new SDK for creating extensions for Visual Studio!

The VisualStudio.Extensibility SDK focuses on extensions that run out-of-process from the IDE for improved performance and reliability, and it features a modern API that has been streamlined and carefully engineered to maximize developer productivity.

Get Started with VisualStudio.Extensibility Preview 3This release builds on our first and second public previews, and it brings some big features like an API to query and modify project information and the ability to create incredible debugger visualizers. Please visit the VisualStudio.Extensibility repo to find docs and installation instructions. You can also use our issue tracker to report bugs and provide feedback.

What’s new for Preview 3 of VisualStudio.Extensibility?The VisualStudio.Extensibility Preview 3 release expands your ability to create powerful productivity extensions, with features including:

  • Debugger Visualizers
  • Custom Dialogs
  • Query the Project System
  • Editor Margin Extensions
  • Configure your Extension

Create custom data visualizers for better debuggingDebugger visualizers, such as the popular IEnumerable visualizer, add tremendous power to the debugging experience in Visual Studio by enabling custom views of complex data types. With this release, we’ve leveraged our Remote UI features to enable you to create debugger visualizers with VisualStudio.Extensibility!

A debugger visualizer for regex matchesWe can’t wait to see the debugger visualizers you create with this feature!

Interact with users through custom dialogsWith the last release of VisualStudio.Extensibility, you could interact with users through prompts with simple, configurable buttons. Now, you can go beyond buttons and interact with your users through dialogs featuring custom UI.

A dialog with custom UIDialogs are backed by our Remote UI features, so you can use WPF to create rich, interactive visuals, and then you can show your dialog to the user with a simple call:

public override async Task ExecuteCommandAsync(IClientContext context, CancellationToken cancellationToken){ using IRemoteUserControl content = new MyDialogControl(); await this.Extensibility.Shell().ShowDialogAsync(content, "My Dialog", DialogOption.Close, cancellationToken);} Sample code for showing a custom dialog

Query the project system for information about projects and solutionsWith the latest preview, we’ve added the ability to query the project system for projects in a solution that match a set of conditions or for information about those projects. For example, you could use this query API to detect that web projects are present in the solution before enabling web-related commands in your extension:

IQueryResults<IProjectSnapshot> webProjects = await Extensibility.Workspaces().QueryProjectsAsync( project => project.Where(p => p.Capabilities.Contains("DotNetCoreWeb")) .With(p => new { p.Path, p.Guid }), cancellationToken); Sample code for finding all the projects in a solution with a given set of capabilities.

You could also modify projects, for example by adding a project reference or creating a new file:

await Extensibility.Workspaces().UpdateProjectsAsync( project => project.Where(p => p.Name == "MyProject"), project => project.CreateFile("NewFile.txt", newFileContents), cancellationToken); Sample code for adding a new text file to a project

With these features, your extension can deliver experiences to your users that feel directly relevant to the code they’re working on!

Add valuable context with editor margin extensionsWe know developers spend most of their time in Visual Studio working with files and documents in the editor. With editor margin extensions, you can get your work in front of many users by leveraging Remote UI to create great front-and-center experiences that boost developer productivity. You could use this feature to offer simple at-a-glance features like the word count or the encoding of the open document, but you could also create custom navigation bars or headers!

An editor margin extension that adds a word count to the bottom marginConfigure your extension easily with configuration propertiesMany components defined in your extensions require you to configure how or when they appear in the IDE. For example, if you define a command, you could configure it to be a menu item in the Tools menu or an icon on the toolbar. If you define a tool window, you could configure it to be either docked or floating.

Based on feedback from user testing, we’ve completely overhauled extension configuration for better discoverability and usability. Now, you’ll be able to configure your extension with strongly-typed classes and properties, and you’ll have IntelliSense to help you discover and browse predefined options. These changes will help you get your extensions to work like you intend them to.

With the changes, configuration has gone from looking like this with attributes:

[Command("VisualStudio.Extensions.MarkdownLinter.RunLinterOnActiveDocument","Run Linter on open file",containerType: typeof(MarkdownLinterExtension),placement: CommandPlacement.ToolsMenu)][CommandEnabledWhen("FileSelected",new string[] { "FileSelected" },new string[] { "ClientContext:Shell.ActiveSelectionFileName=.+" })][CommandIcon("MarkdownIcon", IconSettings.IconAndText)]internal class RunLinterOnCurrentFileCommand : Command Command configuration using the old configuration attributes

to looking like this with configuration properties:

[VisualStudioContribution]internal class RunLinterOnCurrentFileCommand : Command{ public override CommandConfiguration CommandConfiguration => new("%RunLinterOnCurrentFileCommand.DisplayName%") { Placements = new[] { CommandPlacement.KnownPlacements.ToolsMenu }, Icon = new(ImageMoniker.Custom("MarkdownIcon"), IconSettings.IconAndText), EnabledWhen = ActivationConstraint.ClientContext(ClientContextKey.Shell.ActiveSelectionFileName, ".+"), }; ...} Command configuration using the new configuration properties

Control the placement of your commands

As seen in the configuration properties above, you can easily place your commands inside known menus, but you can also place them inside new menus and toolbars, which you can create and control:

[VisualStudioContribution]public static ToolbarConfiguration MyToolbar => new ToolbarConfiguration("%MyToolbar.DisplayName"){ Children = new[] { ToolbarChild.Command<MyCommand>(), },} Sample code for creating a toolbar with a command

Add keyboard shortcuts to your commands

Now you can set keyboard shortcuts for your commands using simple sets of keys and modifiers:

public override CommandConfiguration CommandConfiguration => new("%MyCommand.DisplayName%"){ Shortcuts = new CommandShortcutConfiguration[] { new(ModifierKey.ControlShift, Key.G), },}; Sample code for setting a keyboard shortcut for a command

We can’t do this without you!As we continue to develop VisualStudio.Extensibility, we need your help! Please give Preview 3 a try and share your thoughts with us. You can give feedback, report bugs, make suggestions, and ask questions through our issue tracker. You can also sign up here to be contacted about future user studies, which are invaluable as we work to give you the best possible experience with our SDK.

Please go to the VisualStudio.Extensibility repo for docs, code samples, and setup instructions so you can get started today!

The post Build Better Extensions with VisualStudio.Extensibility Preview 3! appeared first on Visual Studio Blog.

View Details

GitHub Copilot uses OpenAI Codex to suggest code and entire functions in real-time right from your editor. Trained on billions of lines of public code, GitHub Copilot turns natural language prompts including comments and method names into coding suggestions across dozens of languages. In Visual Studio, Copilot acts as a pair-programmer making it more joyous to code – and increases your productivity at the same time.

And an updated version of Copilot for Visual Studio was just released. It contains a lot of fixes, tweaks, and other improvements. Check out this demo video:

Together with the built-in AI in Visual Studio called IntelliCode, your AI programming partners elevate your coding to the next level. IntelliCode and Copilot complement each other and use lots of the same underlying AI/ML technology and APIs.

To get started with GitHub Copilot, make sure you are on version 17.4 or later of Visual Studio 2022. Then check out this step-by-step guide. Copilot is free for GitHub verified students and maintainers of popular open-source projects. Learn more about billing for Copilot.

This is the first blog post in a series about AI in Visual Studio, so stay tuned for more about GitHub Copilot and IntelliCode and how they can improve your coding and team productivity.

The post GitHub Copilot in Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

The first Preview for Visual Studio 2022 17.6 is now available! This release expands on the recently released 17.5 version of Visual Studio and aims at enhancing your productivity whether you’re a .NET developer, a game developer, and/or a C++ developer.

Why should you try the latest preview? Because it’s like living in the future – you get to try all the capabilities that we’re actively working on for the upcoming 17.6 release, influence their development early by providing your suggestions and by reporting any problem you encounter. And you get to do that while reliably continuing your critical work, as Previews always install and run side-by-side the officially supported Visual Studio releases.

Download Visual Studio 2022 v17.6 Preview 1This blog summarizes the top changes in this release. To explore the full list of improvements, you can check out the Visual Studio 2022 17.6 Preview 1 Release Notes.

  • IDE Productivity
    • Brace Pair Colorization
    • Git Line Unstaging
    • GitHub Issues
  • .NET
    • IntelliCode API Usage Examples for C#
    • Visualizers Support for .NET Remote Debugging
    • .NET MAUI Tooling for ARM64 Devices
  • C++ Gaming
    • Unreal Engine Log Viewer
    • Code Analysis integration – Unreal Header Tool
  • C++ Cross-platform
    • CMake Debugger
    • Remote File Explorer for Unix
    • Import C and C++ embedded STM32CubeIDE projects

IDE ProductivityBrace Pair ColorizationYou can now visually distinguish each set of opening and closing braces for your code making it easier to see your code’s scope or find any missing braces.

In addition to C++, brace pair colorization expands now to C#, TypeScript, JavaScript, Visual Basic and Razor.

You can enable or disable colorization by going to Tools > Options > Environment > Preview Features and checking “Enable Brace Pair Colorization”.

If you have feedback to share with us about this feature, please contribute to the discussion on Developer Community.

Git Line UnstagingTo continue improving our line-staging (aka interactive staging) feature, we’ve added unstage.

GitHub IssuesThe GitHub Issues integration allows you to search and reference your recent issues from the commit message box in VS, in response to this suggestion ticket.

You can reference an issue or a pull request by typing # or clicking on the # button in the lower right side of the commit message text box. If you weren’t already authenticated to access related issues, you will now be prompted to sign in to take advantage of this feature. Learn more about this feature from the blog.

.NETIntelliCode API Usage Examples for C#Ever wish you could easily access code examples for APIs you work with? IntelliCode API Usage Examples makes that a reality. IntelliCode API Usage Examples is a feature that lets you see real-world examples of how other developers have used a given function. Examples shown are from public open source repositories on GitHub.

To use the feature, hover over any supported function and click on “GitHub Examples and Documentation”.

Visualizers Support for .NET Remote DebuggingYou can now use the IEnumerable and DataSet Visualizer to inspect your variables/objects when debugging .NET on Unix via SSH, Docker, or WSL.

.NET MAUI Tooling for ARM64 DevicesPreview support for .NET Multi-platform App UI (.NET MAUI) tooling in Visual Studio is now available on ARM64 devices.

You can now enable installation of .NET MAUI from the Visual Studio installer when running on ARM64 versions of Windows. Please note that Hot Restart and Google’s Android Emulators are not supported at this time.

C++ GamingUnreal Engine Log ViewerAvailable as a preview feature, you can now view Unreal Engine logs without leaving Visual Studio.

To see the logs from the Unreal Engine Editor, click View > Other Windows > UE Log. To filter your logs, click on the “Categories” or “Verbosity” dropdowns.

Since this is an experimental feature, please leave your feedback by commenting on Unreal Engine Log Viewer – Developer Community.

Code Analysis integration – Unreal Header ToolAs we are continue building Unreal Engine integrations into Visual Studio, we frequently hear from our game developers the need to include code analysis for Unreal Engine projects. As a first step, you can now see warnings and errors generated by the Unreal Header Tool within Visual Studio. The Unreal Header Tool emits warnings and errors while parsing Unreal related C++ headers. You can find these warnings in the Error List as well as see them visually denoted by purple squiggles in your code. Follow the link to learn more about Unreal Header Tool.

While in Preview, this feature is off-by-default. To enable it, go to Options > Environment > Preview Features and check “Code Analysis with Unreal Header Tool (C++)”. Since this is a preview feature, please leave your feedback by commenting on Code Analysis Feedback – Developer Community.

In the example above, you can see Visual Studio reminding you of an incorrect spelling of a UFUNCTION specifier and a missing GENERATED_BODY macro.

To try these new features for Unreal Engine, make sure the “IDE support for Unreal Engine” is selected in the “Game development with C++” workload in the Visual Studio Installer.

C++ Cross-platformCMake DebuggerThe new CMake Debugger allows you to debug your CMakeLists.txt file for any CMake project within Visual Studio. You can set breakpoints based on filenames, line numbers or when CMake errors/warnings are triggered, and step into, over, or out of them. You can also pause or continue the currently executing scope. The call stack in the CMake debugger shows filenames and lines and you are able to set a watch on defined variables.

To start the CMake Debugger, you can select “Configure with CMake Debugging” from:

  • the context menu when right-clicking on your CMakeLists.txt file or
  • the “Project” main menu.

A Debug link will be available in Solution Explorer when CMake generation fails:

Currently, this only works with bundled CMake, and projects targeting WSL or remote machines are not supported yet. To learn more, please see “CMake debugger allows you to debug your CMake scripts and more“.

Remote File Explorer for UnixYou can now use the new Remote File Explorer to browse, upload, and download files to your remote machines listed in the Connection Manager. All you need to do is install it through the Linux and Embedded Development workload.

From the toolbar, you are also able to:

  • Toggle the target machine by using the dropdown in the Remote File Explorer
  • Refresh directory content and sync changes
  • Delete or rename files and directories.

You also can cancel any ongoing file operations using the bottom pane. You can open the Remote File Explorer from the menu View > Remote File Explorer.

Let us know what you think and share any additional features you’d like to see by commenting on Remote File Explorer – Developer Community entry.

Import C and C++ embedded STM32CubeIDE projectsYou can now import STM32CubeIDE projects for embedded development within Visual Studio. Just select File > Open > Import STM32CubeIDE project.

Importing a STM32 project generates a CMake project with device flashing and debugging settings for STLink. You must have the STM32CubeIDE installed with the support package for your board. This enables use of the compilers and supporting applications provided by ST. If your project has an .ioc file you can open the context menu and open STM32CubeMX for your project. Learn more about importing STM32CubeIDE projects.

Share your feedback and help us build a better Visual Studio!As you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Try Visual Studio 2022 v17.6 Preview 1 appeared first on Visual Studio Blog.

View Details

Your Visual Studio team is excited to announce the release of the highly anticipated “Quick Add Files & Folders” feature in Visual Studio version 17.5!

This new feature is the fastest and most convenient way to add files and create folders within your projects. Based on the feedback from the Visual Studio Developer Community, Quick Add was requested and highly voted on, making it a top priority for our development team. Yes, your votes matter!

The team has iterated on the early preview to bring you the most efficient and effective way to manage your files.

Check out this video to learn more and then try it out and see how much time you can save.

The two shortcuts to remember are:

| Ctrl+Shift+A | Opens the last-used Add New Item dialog | | Shift+F2 | Always opens the compact Add New Item dialog |

Have you tried this feature yet? Let us know what you think about it in the comments below.

The post The fastest way to add files and folders appeared first on Visual Studio Blog.

View Details

We’re excited to announce the preview release of linking GitHub Issues. With Visual Studio 2022 17.6 Preview 1 you can now mention your issues in the commit message box in the Git Changes window.

Download Visual Studio 2022 PreviewSpeed up your workflow by linking your related work items directly in Visual Studio. You can use the related items to get more context from the Git Repository window. Learn more about how to leverage this feature below.

Reference Your Related ItemsBuilding on the existing Azure DevOps work item support, we’ve enabled the same experience with GitHub. To try it out:

  1. Type # or click the ‘#’ button in the commit message box
  2. The dropdown list includes the most recently opened issues and pull requests that the current user was assigned to, commented on, authored, or was mentioned in
  3. Select the item you’d like to reference
  4. From the Related Work Items section, you can easily open the items in the web

Get Access to IssuesThe feature is on by default in Preview, and it can be toggled from the Preview Features page in settings.

Additionally, if you aren’t signed into GitHub to view the issues, a message will prompt you to sign in.

Understand the Previous Commits Better in HistoryWhen investigating past commits in the Git Repository window, you can view linked issues and pull requests in the Commit Details pane.

  • First, double-click on the commit in the Git Repository Window to open the Commit Details
  • Then, find the Related Work Items on the right side of the panel with the list of Changes

You’ll get additional context when perusing Git history to understand why changes have occurred.

If the section doesn’t show, please verify that your account setting credentials are up to date.

Engage with usWithout your great feedback and suggestions, we wouldn’t be able to deliver the features you’re looking for! Please continue letting us know how we can improve Visual Studio and let us know what you think about this feature.

Share Your FeedbackThe post Reference GitHub Issues and Pull Requests in Visual Studio appeared first on Visual Studio Blog.

View Details

Do you want Visual Studio 2022 to always stay up to date with the latest goodness with little-to-no action from your end? Then look no further, because as of now, we support the ability to “Always Update on Close”! Starting with Visual Studio 2022 version 17.5, we’ve made it easier to apply available updates when Visual Studio closes if you’ve made a one-time configuration change in Visual Studio. You can find this option in the Tools > Options > Product Updates dialog.

This setting is configurable on a per instance basis of Visual Studio 2022 and we highly encourage you to enable this feature to stay current, updated and secure. Then, you will be all set! For more information, please visit Update Visual Studio | Microsoft Learn.

Let us know your thoughts! We would love to get your feedback on this feature, so please give it a try and let us know what you think. You can share any feedback via Developer Community to help us make Visual Studio better for you!

The post Visual Studio 2022 can now Always Update on Close! appeared first on Visual Studio Blog.

View Details

As a software developer, we’ve all faced the frustration of having to leave our IDE to search for documentation, code examples, Stack Overflow, blog posts or simply trying to remember how to use a certain API. What if we told you that we have a solution for you? Now with Visual Studio 17.6 Preview, IntelliCode makes finding real-world code examples for common APIs easier than ever. With this feature, you’ll have real examples at your fingertips. See how an API has been used in real-world projects. Saving you time and making your coding even more efficient.

Under your fingertipsIntelliCode API usage examples enables you to browse open-source code examples of 100k common APIs. These code snippets represent real-world usage examples that are sourced in public GitHub repositories. Now you have these examples under your fingertips. When you hover over a known API, the documentation shows a link to start browsing examples.

How it worksWhen you hover over a method, IntelliCode checks for matching examples in its database. A link is displayed which opens a tab with examples. In this tab you can browse snippets and access documentation. On the snippet you can click through to the source-code on GitHub.

The IntelliCode API usage examples helps you to understand how a function works in real code. This enables you to use them in your project more effectively, by providing examples of how a function can be used from within the editor. No more searching for examples on the internet. However, it’s important to note that the code snippets provided by the IntelliCode are only examples and may not be the best or most up-to-date way to use a function in all cases.

FeedbackOverall, the this is a useful addition to the IntelliCode features to help you write better code more efficiently. It’s currently in public preview in Visual Studio. Install Visual Studio 17.6 Preview today and try it out! We’d love your feedback! If you run into an issue, in Visual Studio, use Help | Send Feedback to report a problem. Let us know what you think!

The post Maximizing the value of IntelliCode with API usage examples: Real-World Code Examples at Your Fingertips appeared first on Visual Studio Blog.

View Details

We’re excited to announce that Visual Studio 17.5 is now generally available. This release is full of updates that take friction out of your daily workflows making it easier for you stay in the zone while you code. Features like all-in-one search and intent-based suggestions help you move faster, while improved build and debug speeds ensure your IDE won’t slow you down.

Download Visual Studio 2022For .NET and cloud developers, we’ve focused on improving the inner-loop dev experience. New .http/.rest files make it easier to test and iterate on your APIs directly in Visual Studio, while improved Dev Tunnels help streamline the configuration and management of your webhooks. We’ve also made it easier than ever to deploy your ASP.NET apps to containers.

Game developers can now view properties from base classes modified in an Unreal Blueprint asset without leaving the IDE. Visual Studio has improved the cross-platform development experience with a new remote file explorer, Linux Console output to the Integrated Terminal window, dev container improvements, and more.

Beyond individuals, Visual Studio also has new features to better support dev teams at scale, with exportable configuration files and a persistent update toggle helping ensure everyone on your team is working from the latest version of the tool.

This blog covers several of the top new features in Visual Studio 17.5—to see some in action, watch the Visual Studio 17.5 release video. As always lot of these features come straight from your feedback and suggestions. Your feedback is critical to help us make Visual Studio the best tool it can be!

Productivity* All-in-one search * Intent-based suggestions * Debugger text visualization * Faster .NET builds and debugger features * Improved Razor and C# Experience

.NET and Cloud development* API development inner-loop * Improved Dev Tunnels configuration and management * Containers and Azure * Accessibility Checker

Modern C++ and game development* Unreal Engine Blueprint References and Asset Inspector * Macro Expansion Improvements * C11 Atomics * Native Arm64 Clang toolset

C++ Cross-platform and embedded development* New Linux Capabilities * CMake improvements * Concurrent serial port monitoring

Enterprise management* Layout configuration management * Winget integration * Always updates upon close * Accessibility Feature – Adding Sounds in the Installer!

Read on to learn more about these new features.

IDE Productivity & PerformanceVisual Studio’s new All-in-One Search, Intent-Based Suggestions, and Debug Visualizers are designed to boost your code navigation and understanding. With the emphasis on productivity, this release not only offers new functionalities but also reduces build and debug times, making your workflow faster and more efficient.

All-In-One SearchAll-in-one-search provides users with a quick and easy way to find Visual Studio files, types, and members in your code. We’ve made significant improvements to the ordering and relevancy of results in our code search while removing the results limit without compromising on speed.

Code search now has a Preview Panel that supports code results for both C# and C++! The preview will automatically show when you perform a search so you can see the context of the selected result. You can change the panel orientation or toggle it on/off by selecting the panel icons at the top right of the window.

Enable All-In-One Search by going to Tools > Manage Preview Features > “New Visual Studio Search experience (restart required)”.

AI-Powered, Intent-Based SuggestionsIntent-Based Suggestions is a new feature that provides in-line suggestions in your editor based on your recent changes. The feature uses Machine Learning algorithms to understand the structure of repeated edits you’re trying to make to your code and suggest the change right in your flow, helping you code faster and more accurately. Try it out and experience the power of intent-based suggestions in your development workflow today!

Debugger text visualizersWe’ve improved the text visualizer with additional tooling and string manipulation options. You can now do URL Encode and Decode and Base64 Encode and Decode JWT more easily, while full theming means the text visualizer window will fit the look and feel of the rest of your IDE.

Faster .NET builds and debugger featuresWe have drastically improved incremental build performance by only building projects that had modifications while skipping projects that were unchanged. With Build Acceleration you can reduce incremental build times for SDK-style .NET projects by up to 80%.

We’ve also made significant performance improvements in the debugger by improving the response times of the threads window. This window is critical in debugging today’s multi-threaded applications. In this release, the thread window automatically scales with the number of threads, helping contribute to 2X faster response times compared to Visual Studio 17.4. We’ve also improved external source de-compilation speeds by up to 10X, making .NET module troubleshooting much more efficient.

Improved Razor and C# experienceTo address the feedback about productivity and performance surrounding Razor and C#, we’ve focused on improving the Razor and C# experience, with support for code actions in Razor files, including some helpful shortcuts like “Remove Tag,” “Encode image in Base64,” and “Insert Image height/width.”

A lot of the feedback we received around Razor and C# editing focused on the Roslyn experience. We’ve prioritized improving performance in project configuration switching, speeding up code analysis recognition, and improving the typing experience to reduce UI delays.

Modern .NET and Cloud developmentAPI development inner-loopBack-end APIs and microservices play a critical part in powering modern web apps, yet for many, API development remains a pain point. Efficient development with APIs requires agility and the ability to iterate quickly. We’re on a mission to make it easier to work with APIs throughout the inner-loop lifecycle—from coding and building to debugging and testing your apps.

Our first step towards better, faster API development is the addition of .http/.rest files in ASP.NET Core Projects, along with an integrated HTTP client. These files act as terse definitions for your API endpoints, enabling you to “run” your APIs and manipulate various REST calls to iterate within parameters and see the outputs in a structured way—all from Visual Studio.

These .http/.rest files aren’t meant to replace integration and unit testing. Instead, they provide a new way to rapidly iterate on API development, as well as a common place to monitor the APIs your app may be using and investigate required inputs/outputs during development.

This is just our first step towards improving the quality-of-life for developers working with microservices in Visual Studio—stay tuned for future features in upcoming previews!

Improved Dev Tunnels configuration and managementOf course, APIs are just one way modern apps interact with each other—webhooks are also crucial for enabling information to automatically pass back and forth between different applications. Dev Tunnels play a crucial part in configuring webhooks during inner-loop processes, as they provide a way for public services to be pointed towards code that’s hosted locally on your machine. We’ve made it easier to set up Visual Studio dev tunnels by giving you more control over their configuration and creation.

This release makes it easier to manage and switch between your Dev Tunnels and specify which you want to use in any given debug session. Both features provide powerful inner-loop productivity gains for API developers in .NET, and we look forward to your feedback on them.

Containers and AzureFor .NET developers working on web apps and APIs, fast, simple container management is crucial to enabling productivity and efficiency. Visual Studio already has excellent support for deploying to services like Azure App Service and Azure Functions, but we want to extend that simplicity to container-based services like Azure Container Apps.

This release takes a significant step forward by enabling you to deploy your ASP.NET Core app to Azure Container Apps in just a few steps. Instead of relying on additional files to define your container content and build steps, you can now directly target Azure Container Apps through the Publish window and either use a pre-provisioned resource or have VS help you create one:

After creating your resource, you can leverage new .NET 7 SDK capabilities to build the container image directly using the SDK with no additional knowledge or files. This is a fast, easy way to get your code to cloud using existing, familiar tools and workflows.

Of course, with our Azure Publish capabilities, you can also choose how to deploy by selecting on-demand or have VS create a starter GitHub Actions workflow if your app is in a GitHub repository.

Accessibility CheckerVisual Studio now has an integrated Accessibility Checker that detects many common accessibility issues for XAML based desktop applications. The Accessibility Checker uses the same axe-windows engine as Accessibility Insights, which is the same accessibility testing tool the Visual Studio team uses for our own accessibility testing. The Accessibility Checker supports WPF, UWP, WinUI and MAUI (through WinUI). To access the Accessibility Checker, make sure XAML Hot Reload is enabled in the option page, then press the “Scan for Accessibility Issues” button in the XAML Live Visual Tree toolbar.

When the Accessibility Issues button is clicked, the axe-windows engine will scan the running application for accessibility issues and present them in the Accessibility Checker window. The window will list the Automation ID, Rule, Description, and a brief explanation of how to fix the issue for each item the axe-windows engine detects.

Modern C++ and Game DevelopmentWe’ve included several new productivity enhancements for C++ developers, whether you’re working on games, cross-platform, or embedded applications—including a UE Asset Inspector in Visual Studio, Hot Reload support for CMake projects, IntelliSense improvements for macro expansions, and much more. For a more in-depth overview, checkout the Visual Studio 2022 version 17.5 for C++ Developers blog post.

Unreal Engine Blueprint References and Asset InspectorFor Unreal Engine game developers, you can now view Blueprint references and associated assets directly in Visual Studio. To see Blueprint references, click on the CodeLens hints now appearing on top of C++ functions, classes, and properties. From there, you can click on the Blueprint CodeLens hint and select a reference to open the Asset Inspector. Learn more by reading our Unreal Engine Announcement Blogpost.

Macro Expansion ImprovementsWe’ve also added several improvements to IntelliSense macro expansion designed to provide more effective, appealing and easier to read macro expansions inside Quick Info. Not only have we added recursive expansion in more contexts, but you can also now copy the expansion to the clipboard or expand the macro inline through options in the IntelliSense pop-up window. In addition, Macro expansion inside quick info will now have a formatted display and monospaced font.

C11 AtomicsUsers will be pleased to learn we’ve expanded our standard library features to include C11 atomics in MSVC. Initial support is only for lock-free atomics and can be found under the /experimental:c11atomics flag, in /std:c11 mode or later.

Native Arm64 Clang toolsetWhile Visual Studio 17.4 introduced Arm64 support, we’ve expanded Arm64 capabilities with native Arm64 Clang toolset in our LLVM workload, enabling native compilation on Arm64 machines.

C++ Cross-platform and embedded developmentFor cross-platform and embedded developers, we’ve added several new features that help streamline your workflows beyond Windows.

Linux ImprovementsWe have moved the Linux Console into the Integrated Terminal to make it easier to interact with the remote Linux Machine. The integrated console window allows you to provide input as well as seeing console output.

When you’re using a Dev Container for application development, you can now run them on remote machines. We have also added the ability to open an interactive shell in the running container in the Integrated Terminal.

New CMake capabilitiesWith this version of Visual Studio, we’ve also added several new CMake capabilities to speed up compiling workflows. You can now build and test multiple CMake targets at once from the CMake Targets View in Solution Explorer. We’ve also enabled hot reload for CMake projects and added support for the latest CMakePresets.json files, making it easy to share settings across your development and CI environments while ensuring consistency.

Concurrent serial port monitoringEmbedded developers who have more than one serial device, or TCP connection with SWO traces, will be happy to find they can now open more than one serial port monitor at a time.

Enterprise managementDeploying any application across a large enterprise brings unique challenges. Visual Studio has improved the experience for creating and managing offline layouts for deploying Visual Studio. We’ve also made it easier for developers to decide and control when updates are applied on their local machine.

Customizing a Layout using a .config fileIt is now possible to use an exported configuration file to configure the contents of an offline layout. This capability was one of our top-voted Developer Community suggestions, and it requires the latest Visual Studio installer that ships with Visual Studio 17.5. To use this capability, first export a Visual Studio configuration file that you want to replicate in your layout, and run the following command:

vs_enterprise.exe –layout c:\layout –config c:\my.vsconfig –useLatestInstaller

This functionality extends all the way back to Visual Studio 2017 assuming you pass in the required –useLatestInstaller parameter. It’s also possible to add components to an existing layout. If you’ve already created a preview layout containing one workload, you can add configuration for additional components and workloads to that layout by using the exact same syntax above.

Winget integrationVisual Studio 2022 and 2019 are now supported and available on Winget, the Windows Package Manager tool. To better reflect how we ship and maintain Visual Studio, we’ve updated the existing structure on Winget. Going forward, all Visual Studio updates will now automatically be available on Winget as part of our release process. This does mean that if you have existing scripts or commands that depend on the prior Winget directory structure or package identification, you may need to make a one-time fix to align with our changes.

Always Update on CloseIt’s now possible to configure Visual Studio to automatically apply updates when it closes. This setting is configurable on a per instance basis of Visual Studio. You can, for example, set your Previews to check for updates when you close the Preview, but your regular production Visual Studio instance can continue to be updated on demand. You can find this option in the Tools > Options > Product Updates dialog. Read more about how to get the most out of updates for Visual Studio on Microsoft Learn.

Accessibility Feature – Adding Sounds in the Installer!We are continuously improving the Visual Studio customization experience to help you be more productive. Many of you are probably using the recently added audio cues in the Visual Studio editor and now we have added audio cues to the Installer! The audio cue alerts the user that the operation was finished on the installer or that there was an error by playing a sound. This includes install, update, modify, and many other operations done by installer or any error dialogs while trying requested operation. This feature is on by default, but you can turn it off by following the instruction outlined here: Disable sounds in the installer – Visual Studio Feedback.

Share Your Feedback and Stay Connected!As you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Visual Studio 2022 – 17.5 Released appeared first on Visual Studio Blog.

View Details

We are pleased to announce the release of Visual Studio for Mac 17.5. Along with the usual incremental improvements, we’ve focused on improving the Git experience for this release. Read along as we look at these improvements and the other big changes made. As always, if you want to know all the changes made during this release, you can check out the release notes.

If you are already using the Visual Studio for Mac Preview release, use the Visual Studio > Check for Updates… menu item to update. If you aren’t using it yet, download it now:

Download Visual Studio for Mac v17.5Git ImprovementsThe most noticeable new Git feature is the new Git Branch Selector in the status bar. From here, you can quickly see what branch you are on at any time and whether there are changes that need to be staged. In the branch selector menu, you can create a new branch or switch and manage existing branches and tags.

Clicking on the Changes indicator reveals the Git Changes tool window, where we have made some other significant changes.

The Git Changes tool window is now more aligned with the UI you already know on Visual Studio for Windows, helping people who switch between both environments. In addition to being a more familiar experience, the UI also makes it easier to see what changes are staged and what changes still need to be acted upon. Inline buttons allow files to be staged, unstaged, or have the changes discarded.

And if you don’t have a Git repository set up yet, we’ve added some extra guidance in dialogs to help you get started.

Hot ExitGit isn’t the only area that has seen improvements. We’ve brought another new feature to Visual Studio for Mac 17.5 called Hot Exit.

Hot Exit allows you to quickly exit the application for whatever reason when you have unsaved changes in files without having to go through the “Save Changes” dialog box. Then, when you come back to the application your changes persist as unsaved changes. Hot Exit means Visual Studio for Mac 17.5 will no longer show dialogs that prevent shutdown.

Hot Exit is enabled by default, but can be turned off in Application Preferences > Text Editor > General

Editor ProductivityWe’ve also made some improvements to make you more productive in the editor. One such improvement is to font support. Some fonts which didn’t work correctly before – Fira Code Light for example – now work perfectly.

Selection highlighting has also been added to the editor to help you find other text that matches your selection quicker and easier than before.

Unit Testing ImprovementsYou’ll also find performance enhancements in the Unit Test tool window. Its UI got some speed improvements under the hood, we made some updates to the quality of the overall experience, and unit test discovery is now better and faster at finding unit tests in your solutions.

Visual Studio for Mac 17.6 Preview 1Today, we are also shipping the first preview of our next release – Visual Studio for Mac 17.6. A large focus for the 17.6 series is improving the quality of the overall experience and general performance.

With Visual Studio for Mac 17.6 Preview 1, you’ll find a new asynchronous lightbulb/Quickfix feature that makes the experience of using the lightbulb menu much smoother and more productive. You will no longer have to wait for all the suggestions to be gathered before seeing the menu.

We’ve also introduced a new Go to capability to the Hex Editor to make it easier to navigate – press Ctrl+G and enter the byte offset. You can use either decimal or hex values by prefixing 0x.

You’ll be able to install the preview alongside the stable 17.5 release, so give it a try today:

Download Visual Studio for Mac v17.6 Preview 1Please keep sharing your feedbackPlease continue to share your thoughts and keep sending those suggestions or problem reports! You can use the Help > Report a Problem or Help > Provide a Suggestion menus to share feedback, or go to the Visual Studio for Mac Developer Community site to vote for your favorites.

The post Visual Studio for Mac 17.5 is now available appeared first on Visual Studio Blog.

View Details

The Visual Studio family leverages AI to help you stay focused on the creative tasks that get the core logic of your application built.

For Visual Studio and VS Code, IntelliCode is free and assists with writing, editing and understanding code in popular languages. With IntelliCode, models run locally, meaning that none of your code leaves your machine. This blogpost will focus on IntelliCode.

For users desiring even more AI capabilities, Copilot and Copilot for Business are also supported by Visual Studio and VS Code. Copilot’s models are cloud based.

Tips, tricks, and engineering story behind IntelliCode.

Whether you’re a newer developer or experienced, consider this blogpost your jumping off point to get the most from IntelliCode. The team is excited to share tips, tricks and engineering stories that we’ll link to below – content to come soon!

Writing code

  • IntelliSense list: Instead of exploring an unsorted list of methods and members, IntelliCode uses AI to place what we believe is most relevant to your code context at the top and places a symbol next to item.
  • Gray text: To help increase productivity and reduce errors, IntelliCode can suggest up to a whole line of code in grey text. Your code context and code style are used to help generate these suggestions.

Editing code

  • Repeated edits: Making several similar but slightly different edits? IntelliCode can detect the pattern and apply the change to other locations – saving you keystrokes and navigation.
  • Intent Detection: IntelliCode has learned to assist with common edit patterns such as creating a constructor after creating parameters, or even with editing code that’s just been pasted.

Navigating code

  • API Usage Example: Making a round trip to the browser and fiddling with search to figure out how to use an API is a common workflow. This feature can save you from that by presenting examples of how an API is commonly used.

Navigating Packages

  • Most Common NuGet Packages: This feature helps you find and use the most used NuGet packages, streamlining the process of finding and adding packages to your projects.

Reviewing code

  • The Visual Studio family is excited to explore AI-assistance for workflows that start with preparing a pull request and end with a successful merge.

The IntelliCode team is not only excited to help improve your productivity, but also to learn about your scenarios that could be improved with AI.

The post Visual Studio AI-Assistance: A Developer’s Best Friend appeared first on Visual Studio Blog.

View Details

Last week saw the release of the third preview in the lead up to the official release of Visual Studio for Mac 17.5, and in this blog post we’re going to look at some of the changes in this release – the new Git Status Bar, and some other improvements that have been made to the Test Explorer tool window.

Git Branch Selector Improving the Git experience is one of Visual Studio for Mac team’s primary areas of focus for 17.5and one of the big new features is the Git Status Bar.

When you open a solution which has a Git repository the Git Status Bar will appear in the Status Bar area at the bottom left of the main window.

From this status bar you can see the currently selected branch, the current commit, and the number of uncommitted changes that have been made. Clicking on the number of changes focuses the Git Changes tool window where you can review the changes and carry out operations on them.

One of the biggest improvements to the Git workflow so far, however, is when you click on the branch name in the lower left-hand corner of the status bar. This opens the branch selector menu and from there you can switch to a different branch or carry out branch operations such as merge, rebase etc. The branch selector menu shows the most recently used branches directly in the top level of the menu. Additionally, you can dive down into the Locals, Remotes and Tags submenus to find and switch to a specific branch.

Test Explorer The Test Explorer tool window has seen many bug fixes and improvements to both usability and performance. Test discovery is improved for projects that used wildcards in NuGet packages, and UI delays have been reduced when running tests. Additionally, tests that target multiple platforms and use .NET 6.0 or 7.0 can now be run using the test host that matches the correct chipset architecture.

Download Visual Studio for Mac 17.5 Preview 3 and try it for yourself The Git Branch Selector and the changes to the Test Explorer are just a few of the recent improvements that have been made in the lead up to the release of Visual Studio for Mac 17.5, so why not try out Preview 3 today and see for yourself

Download Visual Studio for Mac v17.5 Preview 3The post Introducing the Git Status Bar and Testing Improvements in Visual Studio for Mac 17.5 appeared first on Visual Studio Blog.

View Details

We’re continuing our video series with tips and tricks to help you get the most out of Visual Studio. This week is all about managing tool windows and documents. There are lots of options to customize how we layout the various windows, documents, and tabs that you use every day. Knowing about these features will help you optimize your usage of Visual Studio and make you a happier and more productive developer.

First up, we’re looking at how to work with tool windows and documents in this video.

Now that you know more about how to customize the windows, let’s look at how to save the layouts and how to switch effortlessly between them.

We hope these features are interesting to you and help you to get more out of Visual Studio.

Happy coding!

The post Documents and tool windows unleashed appeared first on Visual Studio Blog.

View Details

One popular way for users to optimize their efficiency is to leverage shortcuts to interact with the UI. With Git tasks, like Committing, Pulling, and Pushing being part of your daily workflow, learning how to avoid leaving the keyboard for the mouse can keep you in the zone.

| Git Shortcuts | | Open Git Changes and shift focus to the Commit Message box | Alt+G, Ctrl+C | | Open the Git Repository Window | Alt+G, Ctrl+M | | Open the Branch Picker from the status bar | Ctrl+Alt, F3 | | Open the Repository Picker from the status bar | Ctrl+Alt, F4 | | Open the network operations context menu from the status bar | Ctrl+E, Ctrl+C |

Checkout some other shortcuts on this printable keyboard shortcut cheatsheet for Visual Studio available for download.

Try out the following Git keyboard workflows to see which shortcuts you can work into your daily practice. Not only can they help you be more productive and iterate quicker, but they can be easier to access for folks who don’t want to or are unable to move the mouse.

Create a New Branch with the Status BarOften, the first action of a new bug fix or some feature work is to create a new branch. To complete this action without using the mouse:

  • Use Ctrl+Alt, F3 to open the Branch Picker from the status bar.
  • Use Ctrl+N to select the option for New Branch.
  • Type in the name of your new branch, then use the Tab key to cycle between the rest of the items (Shift+Tab cycles in the reverse direction, once the first item is in focus – meaning there’s a slim, dotted border around it, you can navigate using the Up and Down Arrow Keys).
    • For the dropdown menu tap Enter to open it, and navigate using the Up and Down Arrow Keys, using Enter to make your selection or Esc to exit the dropdown menu.
    • For the checkbox tap the Space to toggle it.
  • Use r or arrow/tab to Create and tap Enter to complete the action.

Commit Your Changes FasterOnce you update your code use Ctrl+S to save your work, then commit your changes without using the mouse:

  • Use Alt+G, C to focus the commit message text box in the Git Changes Window via the Top Level Menu.
  • Type your
    • If you’d like to review your changes before committing, see the alternative flow below.
  • Shift+Tab to back cycle to the Push icon and tap Enter to Push your changes.

Alternate Flow – Use the Diff View to quickly preview your changes

  • Tab to the document group you’d like review, use the arrow keys to focus the document, and tap Enter to open it in the Diff View.
  • Use Ctrl+F8 to view the next difference and Ctrl+Shift+F8 to view the previous difference.
  • Learn how to set your own keyboard shortcuts in the One Step Further with Customization section below, to perform actions like staging your files.

Quickly Navigate to View your Repo StatusWhenever you want to checkout manage your branches, use shortcut Alt+G, Ctrl+M to navigate quickly to the Git Repository Window. Again, using Tab and the Up and Down Arrows. Additionally, Alt+UP/DOWN arrows will allow you to navigate between sections, including the:

  • Branches (the left side selector)
  • History (the right side list)
  • Commit Details (actions for the commit, commit message)
  • Commit Diff

Learn more at Browse repos, compare branches & commits on Microsoft Learn.

Switch Active RepositoriesBack in the status bar, you can also use the shortcut Ctrl+Alt, F4 to open the Repository Picker which allows you to quickly switch active repositories, bringing up the Git Repository Window for review.

One Step Further with CustomizationTake the next step towards keyboard mastery by assigning your own Keyboard menu of the Options dialog. Get there by typing “Keyboard” into the search bar. For example, you can stage files using the keyboard, by assigning shortcuts to these commands:

  • Git.Remove – Works as a toggle. If a staged file is focused, it will be unstaged. If an unstaged file is focused, it will be staged. The name is not super friendly, so we introduced the next two.
  • Git.Stage – Stages an unstaged file. Doesn’t work in reverse.
  • Git.Unstage – Unstages a staged file. Doesn’t work in reverse.

To see all of the commands for git, type “Git” into the “Show commands containing:” search.

To learn more about how to customize key bindings checkout Identify and customize keyboard shortcuts.

Beyond Git ShortcutsThere’s a lot of content on Microsoft Learn to help you continue to make the most of the keyboard. You can start by checking out the most popular keyboard shortcuts for Visual Studio and dive deeper, including accessibility tips and tricks and learning how to use Visual Studio without a mouse. Find other productivity tips in the Productivity guide.

Thank YouThanks for checking out ways to boost your productivity with Git keyboard shortcuts. Hopefully, these flows demonstrate how to make incorporating Git into your daily coding sessions easy and unobtrusive. If you have any feedback, use Developer Community to report an issue or Suggest a Feature for Visual Studio.

The post Keyboard Shortcuts to Master Your Git Flow in Visual Studio appeared first on Visual Studio Blog.

View Details

We know developers like you take pride in your code! Many of the features in Visual Studio are designed to help you write the code you want. Visual Studio helps you ensure your code compiles and can even help with code styling. Now it can even make sure your spelling is accurate. Visual Studio 17.5 preview 3 introduces the first preview of the Spell Checker for C#, C++ and Markdown files.

Download Visual Studio PreviewThe Visual Studio Spell CheckerGetting StartedThe feature will be turned on automatically when working with any C#, C++ or Markdown file. Now, when you’re working with any document supported by the spell checker, Visual Studio will mark any words that detects as misspelled words. Visual Studio will also suggest alternate spellings, and help correct them, even doing a contextual rename when those misspellings are identifiers, so your code will still compile. The spell checker can be disabled by unchecking the “Text spell checker” feature under Manage Preview Features. The spell checker can also be enabled or disabled from the menu with the Edit > Advanced > Toggle Text Spell Checker command, or from a button on the main toolbar in Visual Studio.

How do you use it?When the caret is on a spelling error, the quick actions provide solutions for fixing the spelling mistakes. You can bring up the quick actions with either “Ctrl+.” or “Alt+Enter”. When the context menu comes up, Visual Studio provides three options to handle a spelling issue.

If any of the dictionaries provide spelling suggestions, Visual Studio will provide them. If multiple dictionaries provide suggestions, the suggestions will be grouped by dictionary. For strings and comments, choosing one of these suggestions will do a single, in-place replacement. For identifiers in a C++ or a C# document, accepting a suggestion will perform a Refactor/Rename, updating all instances of the identifier to make sure the code compiles.

Suggestions when multiple dictionaries are in useYou can also choose to ignore the spelling issue. By choosing to ignore the issue, Visual Studio will create an exclusion.dic file in your AppData directory on your local machine. Once a word has been ignored, it will be ignored across all instances of Visual Studio for you.

How does it work?If you’re interested in the details, this section will get into the specifics of how the spell checker works. Many of these behaviors can be customized, and we’ll cover that in the next section. Since C#, C++ and Markdown all use English as the language for their keywords, Visual Studio will always use the “English (United States)” or “en-us” dictionary for spell checking. Visual Studio will also ask the instance of Windows for the display language it’s using, and if it’s not “en-us”, it will use that dictionary as well.

Feedback from early users of this feature informed us that developers wanted to know about errors in the documents they were currently working with. In direct response to this feedback, the spell checker will only scan documents that are open.

This chart below shows some of the heuristics that the spell checker looks at when scanning a code document:

| What’s in the code | What Visual Studio checks | Why? | | Hello | Hello, hello | Always check for both proper and common nouns | | HelloWorld | Hello, hello, World, world | Medial capitals common are used to mark word boundaries | | Hello.World | Hello, hello, World, world | Punctuation is used as a word boundary | | _Hello123 | Hello, hello | Leading or trailing numbers or punctuation is stripped | | Hello2World | Hello, hello, World, world | Medial numbers, like punctuation, is used as word boundary | | btnWorld | World, world | Fragments of 3 characters or less are ignored | | helloworld | Helloworld, helloworld | No indicator to identify word boundaries |

Otherwise, we consider the word misspelled and flag the token as a spelling error. This will show up with a severity of “Message” in the Error List with a “SPELL” Code.

Spelling Errors in the Error ListCustomizing the Spell CheckerThe default behavior is designed to get users started and help with the initial experience. Once users are ready to start working in a collaborative environment, the spell checker has options for customizability.

We chose editorconfig for configuration to allow users to control the spell checker behavior in their repository. By configuring .editorconfig, users can establish coding standards they expect to be followed and maintain consistency that would be difficult through other methods.

Here are the switches you can configure in editorconfig:

spelling\_languages = \_language\_[,\_language\_](Example: = en-us,fr-fr) * This lists the languages for Visual Studio to use. In this example, Visual Studio would only use the en-us and fr-fr dictionaries when checking for spelling issues. Note that the fr-fr language pack must be installed on the user’s machine or Visual Studio will incorrectly flag any French words as spelling errors.

spelling\_checkable\_types = strings,identifiers,comments(Example: = identifiers,comments) * This controls what Visual Studio should check. In this example, Visual Studio would check identifiers and comments for misspelled words but wouldn’t check inside strings.

spelling\_error\_severity = error OR warning OR information OR hint(Example: = error) * This controls the severity Visual Studio will assign to spelling errors in the error list. In this example, spelling errors will be displayed as errors.

spelling\_exclusion\_path = absolute OR relative path to exclusion dictionary.(Example: = .\exclusion.dic) * This allows you to create your own exclusion dictionary to specify words you consider to be correctly spelled. In this example, the first time the spell checker is run against any file in the solution, Visual Studio will check for an exclusion.dic file in the same directory as the .sln file (for a C# project) or in the root directory (for a C++ directory). If no file exists, the spell checker will create one. Then, whenever the user chooses to ignore a word, it will be added to this exclusion.dic file. Visual Studio will consider any word that appears in this exclusion.dic file as a correctly spelled word. Note that the exclusion.dic file must be UTF16 with BOM encoding to work correctly.

What do you think?We’re really excited to hear how the spell checker is helping developers feel better about their code. Features like these come from feedback from our community and we appreciate all the feedback. We’d love to know what you think, and we invite folks to join in the conversation over on Developer Community. Let us know what improvements you feel would help make the spell checker even better. Thanks for being an important part of the Visual Studio family!

Download Visual Studio PreviewThe post Visual Studio Spell Checker Preview Now Available appeared first on Visual Studio Blog.

View Details

Visual Studio 2022 17.5 Preview 3 is out and ready to install! This release continues to bring new productivity improvements for all developers and enhances many of the capabilities that shipped in 17.5 Preview 2.

Several of these changes in this preview came from asks in the community and are highlighted below. These and many other threads on Developer community are full of discussions, design ideas. We’d love to hear your suggestions and learn about any bugs or issues using report a problem.

Download Visual Studio 2022 17.5 Preview 3General IDE Shell, Git, Editor, Debugger, and Diagnostics

  • Accessibility Checker
  • Spell checking ( Community Suggestion)
  • External Source Debugging improvements
  • Markdown now available as the default editor ( Community Suggestion)
  • VS Intent based Suggestions
  • Connect to SQL Server using Microsoft.Data.SQL.Client data provider

.NET

  • Support for HTML Code Actions in Razor Files
  • Razor and Roslyn Performance Improvements
  • Build Acceleration for faster incremental builds

C++

  • Brace pair colorization ( Community Suggestion)
  • Open Container in terminal

Setup

  • Improved support for Visual Studio Package in winget

IDEAccessibility CheckerVisual Studio now has an integrated Accessibility Checker that detects many common accessibility issues for XAML based desktop applications. The Accessibility Checker uses the same axe-windows engine as Accessibility Insights, which is the same accessibility testing tool the Visual Studio team uses for our own accessibility testing. The Accessibility Checker supports WPF, UWP, WinUI and MAUI (through WinUI). To access the Accessibility Checker, make sure XAML Hot Reload is enabled in the option page, then press the “Scan for Accessibility Issues” button in the XAML Live Visual Tree toolbar.

When the Accessibility Issues button is clicked, the axe-windows engine will scan the running application for accessibility issues and present them in the Accessibility Checker window. The window will list the Automation ID, Rule, Description and a brief explanation of how to fix the particular issue for each item the axe-windows engine detects.

Spell checkingDevelopers take pride in their code, and a misspelled word can be embarrassing. 17.5 Preview 3 has the first preview version of our spell checker for code documents which will help folks identify misspelled words in comments, strings and identifiers for C#, C++ and Markdown files. The feature is on by default, but can be disabled by unchecking the “Text spell checker” under “Manage Preview Features”. There is also a “Toggle Text Spell Checker” button on the main toolbar, as well as a “Toggle Text Spell Checker” in the main menu under Edit\Advanced.

When an error is found in a comment or a string, the spell checker offers to correct the given instance, but when the error is in an identifier, the correction will be refactored, ensuring that the resulting code gets the code correction across the solution. The spell checker will use the EN-US dictionary as well as the dictionary that matches the display language of Windows that you’re using.

Learn more about how to configure spell checker using .editorconfig.

External Source Debugging improvementsWe have been doing a lot of updates to improve the performance of the decompilation scenarios. As a result, decompilation is significantly faster in 17.5.

Consider an example where we hit an exception in a WPF application, and we would like to decompile a few framework methods on the stack for debugging. The example shows a comparison of the same decompilation in 17.4 and 17.5. As you can see, we were able to decompile multiple modules on the stack in 17.5 in less time than it took single module decompilation in 17.4.

Markdown now available as the default editorThe Markdown editor that we made available in 17.5 preview 2 is now available for all users and is now enabled by default.

VS Intent based SuggestionsIntroducing VS Intent based Suggestions – a new feature in Visual Studio that provides inline suggestions in the editor based on recent changes. This feature uses Machine Learning algorithms to understand the context of your code and suggests relevant changes based on the changes you are making. It helps coding more efficiently and accurately. Try it out and experience the power of intent-based suggestions in your development workflow today!

Connect to SQL Server using Microsoft.Data.SQL.Client data providerWith Visual Studio 2022 17.5 preview 3 you can now connect to SQL Server databases in Server Explorer and the Data Source Configuration Wizard using the Microsoft.Data.SqlClient Data Provider. When adding a connection, you can use the new provider by selecting Microsoft SQL Server from the list of available Data Sources and Microsoft SqlClient Data Provider for SQL Server from the list of Data providers on the Choose Data Source dialog.

.NETSupport for HTML Code Actions in Razor FilesYou can now view HTML, CSS, and JavaScript-related code actions in your code files, including your Razor files! New code actions include the following:

  • Remove tag (and leave contents)
  • Encode image in Base64
  • Insert image height and width

Razor and Roslyn Performance ImprovementsWe’ve heard a lot of feedback from you about performance issues, and we’ve taken steps to address several performance-based concerns in the Razor and Roslyn spaces to make you more productive. Alongside some minor Razor performance improvements, some of the Roslyn improvements include the following:

  • ProjectConfiguration switching
  • Faster code analysis
  • Typing perf improvements to reduce UI delays in Visual Studio

Build Acceleration for faster incremental buildsBuild Acceleration helps complete incremental builds more quickly, making it faster to build your projects, while also speeding up other actions that depend upon builds such as debugging, running unit tests, and publishing applications.

The feature works by identifying situations where Visual Studio can copy files on disk rather than scheduling a build. For solutions with many project references, we’ve seen build times cut by as much as 80%.

Build Acceleration is currently opt-in, and it can be enabled by setting the AccelerateBuildsInVisualStudio property to true in your projects. It works best when enabled for all projects in your solution, which can be done by setting the property in a Directory.Build.props file.

C++Brace pair colorization for C++You can now visually distinguish each set of opening and closing braces for your C++ code making it easier to see your code’s scope or find any missing braces. This is currently only available for C++. We are also working on brace pair colorization for C#. Stay tuned for that in an upcoming release.

Open Container in terminalWe have added the capability to open your Dev Container in Visual Studio’s integrated terminal. With your project open in a Dev Container, right click the devcontainer.json file and select “Open Container in terminal”.

This will open the integrated terminal and run the docker exec command to open an interactive shell in your Dev Container.

SetupTo help make the latest versions of Visual Studio available to users that deploy the IDE using winget, Microsoft is taking ownership and will officially support the Visual Studio packages that are available through the Windows Package Manager tool. The existing structure will be modified to better reflect how we ship and maintain the product, and the new packages will be automatically updated as part of our release process. If you have existing scripts or commands that depend on the existing directory structure or package identification, there may be a onetime fix to support our new publishing process. We are very grateful to the community members, especially jedieaston, for their maintenance work in the repository to date.

Share your feedback and help us build a better Visual Studio!As you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

Stay connected with the Visual Studio team by following us on YouTube, Twitter, LinkedIn, Twitch and on Microsoft Learn.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Visual Studio 2022 17.5 Preview 3 is here! appeared first on Visual Studio Blog.

View Details

Whether you are looking for specific code files, classes, methods, or features and options in the IDE, finding them is not always easy. With multiple ways to search, how would you even know which one to choose? The new All-In-One Search combines code and feature search into the same UI and adds some extra power and productivity to the experience.

To enable the new search experience, go to Tools > Options > Environment > Preview Features > New Visual Studio Search Experience. After doing that, and restarting Visual Studio, you’ll now see the new search button appear in the title bar, as shown in the screenshot below.

Ctrl + T for code search and Ctrl + Q for feature search stay the same, so your muscle memory remains intact.

Quickly find files, symbols, and Visual Studio featuresResults for files, types, and members are prioritized in the Code Search tab (Ctrl + T) to help you navigate directly to the places where symbols are used. You can further narrow your search to just one of these filters with the buttons below the search bar or by prefixing your search with “f:’, “t:”, or “m:”.

In addition to fast symbol navigation, the Feature Search tab (Ctrl + Q) provides easy access to the various tools, options, templates, and components available in Visual Studio.

Preview and edit your code in the search windowAlongside your list of search results, you’ll see a preview of the selected result. You can glance over to get immediate context of a result without needing to open it and even make tweaks to your code right in the search window. All file types, C# types and members, and C++ types and members are supported in the preview panel.

Configure the preview location by toggling the icons at the top right of the window.

To see the new all-in-one search in action, check out this short demo video:

What do you think about the new search? Let us know in the comments below.

The post New: Better search in Visual Studio appeared first on Visual Studio Blog.

View Details

Validating encoded strings is a basic but important part of our debugging workflow these days. I cannot count the number of times I have found myself looking at a URL-encoded string only to be suddenly unsure how percentage signs are supposed to be represented?

I have been a web developer for years, but I can never remember what the URL-encoded version of a question mark might be, or how to encode or decode an equal sign from my memory. Encoding and decoding are also necessary when handling JSON Web Tokens (JWT) in authentication workflows, you may need to decode and verify claims data passed between parties.

In the latest Visual Studio preview we are supporting a new Debugger Text Visualizer experience that allows you to decode the following text with ease.

  • Base64 Encode
  • Base64 Decode
  • URL Encode
  • URL Decode
  • JWT Decode

Download Visual Studio 2022 PreviewLet’s check out a couple of examples. Here I am presented with URL-encoded text, the debugger is paused, and this gives me the opportunity to hover over a variable and click View Text which brings up the Text Visualizer. I can then select the decoding option (URL Decode) from the String manipulation drop-down menu.

More commonly, I find myself validating and parsing JWT to check the payload data being passed between services. Again, the debugger is paused in the following gif, and by hovering over the variable, and clicking View Text I bring up the Text Visualizer. This time I selected the JWT Decode option, which then presents the decoded Header and Payload data.

Please share your feedbackThis idea originated from a recent hackathon and has become one of my favorite features. We hope this will help you be more productive when debugging and diagnosing issues with your encoded data. As we continue to work on this feature, we would really appreciate your feedback, please report any issues so we can improve the experience.

Download Visual Studio 2022 PreviewThe post Debugging Encoded Text appeared first on Visual Studio Blog.

View Details

Taking full advantage of the Visual Studio editor features will make you a more productive developer. Any keyboard warrior will tell you that knowing the right shortcuts boosts that productivity even further. So, we’ve put together a short little video that demonstrates some useful shortcuts you can use while coding in Visual Studio.

In the video, we cover the following shortcuts:

| Ctrl + D | Duplicate lines | | Ctrl + Shift + L | Delete whole line | | Shift + Alt + . | Select next occurrence | | Alt + select | Vertical (box) selection | | Alt + Ctrl + mouse-click | Insert multiple cursors |

There are many other features for editing your code. One way to discover them is to look in the Edit menu.

Happy coding!

The post Five shortcuts to boost your productivity appeared first on Visual Studio Blog.

View Details

Markdown is a great solution when you want formatted code but don’t want to compromise easy readability. GitHub uses it for readme files, and we use it as our standard for Visual Studio documentation. If you’ve contributed to any open-source repo the odds are high that you’ve authored or edited at least one .md file in that repo somewhere.

We’ve heard feedback from developers asking for a markdown editor in Visual Studio. With the recent preview of Visual Studio 17.5, we’ve brought markdown editing to the IDE! Now, when you have to make changes to markdown files in your project, you can do so without ever leaving Visual Studio.

Download Visual Studio 2022 17.5 Preview 2The Visual Studio 2022 markdown editing experience.The markdown editor should already be enabled and available if you’ve updated to the latest 17.5 preview. If you don’t have the new editor, ensure you’re on the latest preview and that you’ve checked the “Markdown language service” preview feature in the Preview Features page of Tools\Options. If you’re using an extension to edit markdown files today, you may need to bring up the context menu on any file with the .md extension in the solution explorer and choose “Open With…”. In the Open With dialog, the “Visual Studio Markdown Editor” is the new, built-in editor. You can use this once or set it as the default as you prefer.

Some benefits the markdown editor in Visual Studio provides include:

  • Semantic coloring in the editor for easy parsing.
  • Adorners like strikethrough and bold are applied right in the editor.
  • A preview window to show what the rendered HTML will look like: Shift+F7 will bring up the preview on the right side of the editor. There’s also a button at the top left of the editor to open and close the preview.

And perhaps best of all is that most standard controls in the Visual Studio editor you’re already familiar with work in the Markdown editor, too. For instance, try Shift+Alt+Down arrow to create multiple carets and quickly make modifications to a bulleted list.

Using multiple carets to quickly create a bulleted list.In addition, Markdown will support the spell checker that will be in an upcoming release of Visual Studio. So stay tuned for an exciting announcement in the new year.

What do you think?We hope the new Markdown editor in Visual Studio will help you save time! And thank you once again for sharing your feedback. We’d love to know what you think of the markdown experience in Visual Studio. Head over to Developer Community to join in on the conversation with us and let us know what improvements you feel would help make the markdown editor even better. Thank you for being an important part of the Visual Studio family!

Download Visual Studio 2022 17.5 Preview 2The post Write markdown without leaving Visual Studio appeared first on Visual Studio Blog.

View Details

Have you ever felt like the New Item Dialog slows you down when you want to quickly create an empty file or a simple C# class? Browsing through a list of templates is sometimes necessary, but wouldn’t it be great if Visual Studio could figure out which template you needed based only on the file name?

If you answered yes, then you’ll want to use the new Quick Add Dialog! To get started being more productive with less clicking, download the latest preview version of Visual Studio:

Download Visual Studio 2022 17.5 Preview 2Try out the Quick Add experienceOnce you have the latest preview, give the new Quick Add feature a try by opening any solution. Right click on a folder or project and select Add > New Item… or type Ctrl+Shift+A, just as in the past. Instead of the old New Item Dialog, you’ll see the Quick Add Dialog!

With the quick add dialog, you can:1. Add a new file without browsing through the template list: MyClass.cs 2. Create nested folders in a single operation: Folder1/Folder2/, Folder1/Folder2/MyFile.cs 3. Add files with any extension, or no extension at all: File.MyExtension, README, .gitignoreTIP: Quick Add prepopulates a default extension for you, but you can hit Escape after opening the dialog to quickly clear the input box. 4. Add multiple files at once: File1.cs, File2.html or File.(cs, txt). The first example will create a File1.cs and File2.html. The second example will create a File.cs and a File.txt.

You can also quickly switch between the Quick Add Dialog and New Item Dialog. Visual Studio will remember your choice, so you get the experience that suits your needs best! And if you’d like to return directly to the Quick Add Dialog regardless of previous state, you can type Shift+F2. Keyboard shortcuts are configurable in Tools > Options > Environment > Keyboard.

  1. Use “Show All Templates” to open the New Item Dialog
  2. Use “Show Compact View” to open the Quick Add Dialog

We want your feedback!Quick Add is inspired by the Add New File extension. If you liked Add New File, we want you to love Quick Add! Quick Add adopts the same keyboard shortcut Add New File used, so you don’t have to memorize a new one.

If you’re interested in this feature, install the latest preview version of Visual Studio and try it out! Note that we’re still tuning the algorithm that chooses a template based on the project type and the file name you entered, so please let us know how we can improve it. Share your thoughts with us on the Add the extension “Add new file” as baseline ticket on Developer Community and vote by clicking thumbs-up/thumbs-down in the dialog.

Download Visual Studio 2022 17.5 Preview 2The post Adding new files just got a lot faster appeared first on Visual Studio Blog.

View Details

When working in code with long classes and methods that stretch beyond the vertical size of your screen, it can be difficult to keep track of which scope you’re working in. You may be editing a long method or exploring an unfamiliar codebase.

In Visual Studio 2022 17.5 Preview 2, we introduced Sticky Scroll to help you be more productive and save time when going through your codebase. Sticky Scroll provides immediate context to the code in which you’re working by keeping the relevant headers in your view. To start using Sticky Scroll today, update to the latest version of Visual Studio Preview and enable it in Tools > Options > Text Editor > General > Sticky Scroll by toggling the checkbox for “Show the nested current scopes during the scroll at the top of the editor”.

Download Visual Studio PreviewStay Oriented in Your Code as You ScrollAs you scroll through your code, namespaces, classes, and methods will stick to the top of the editor! Sticky Scroll supports multiple code formats, including C#, C++, XAML, and JSON.

C# exampleC++ exampleSingle Click NavigationIn addition to sticking to the top of the editor, the headers also take you straight to that line of code. Clicking on one of these lines will quickly navigate you to the top of that indentation level.

Try It Out in Visual Studio 2022 17.5 Preview 2Enable it in Tools > Options > Text Editor > General > Sticky Scroll by toggling the checkbox for “Show the nested current scopes during the scroll at the top of the editor”. You can also set the maximum number of sticky lines with the “Define the maximum number of sticky lines to show” option.

Please Share Your FeedbackWe hope this feature will help you be more productive with your coding. As we continue to work on this feature, we appreciate your feedback. Let us know what you think of Sticky Scroll in Visual Studio on this feedback ticket and report any issues you face so we can improve the experience.

The post Sticky Scroll now in preview appeared first on Visual Studio Blog.

View Details

In this blog post we will discuss the updates to the dev tunnels (port forwarding) experience in Visual Studio when working with ASP.NET Core projects. If you have read the previous posts here about these features, you’ll want to read this one as well because we have a lot of big changes in Visual Studio 2022 17.5 Preview 2. You can download the latest preview at Visual Studio Preview (microsoft.com). We will cover those updates here, as well as the overall support since a lot has changed in this release. If you would like to view these updates in a video instead of reading a blog post, watch this video by Sayed.

In this release we are adding many significant updates, including the following.

  • Support for persistent and temporary tunnels. A persistent URL uses the same URL throughout its lifetime.
  • Create and use tunnels with different accounts.
  • UI to create and manage dev tunnels.
  • UI to easily select the active tunnel to be used.
  • No longer uses properties in launchSettings.json.

To get started, you must first enable the dev tunnels preview feature. You can find this at Tools -> Options -> Environment -> Preview Features, and select the option Enable dev tunnels for Web Applications.

You will also need to be signed into Visual Studio to create and use dev tunnels.

If you have used this feature in the past, you may recall that you needed to add two properties to launchSettings.json. These properties are no longer required and can be removed from that file, if they are not removed, they will be ignored.

When you have a solution loaded in Visual Studio with an ASP.NET Core project set to start, you should see a new entry in the debug dropdown for dev tunnels.

In this flyout you can select the active tunnel, you can create a new tunnel and you can open the new dev tunnels tool window. Let’s get started by creating a new tunnel with the Create a Tunnel menu option. You should see the dialog shown below.

In this dialog, you’ll specify 4 pieces of information.

  1. Account – the account selected in the account picker is the account that the tunnel will be created with.
  2. Name – this value is only used for display in Visual Studio, it doesn’t impact the URL, or any other property of the tunnel being created.
  3. Tunnel TypePersistent is a tunnel that uses the same URL throughout its lifetime. Temporary is a tunnel that uses a new URL each time that Visual Studio is started. For persistent tunnels, if the tunnel is not used for an extended period of time (weeks), the URL may change. There are other cases where the URL may change, but we make our best effort to preserve the URL.
  4. AccessPrivate means that only the signed in user has access to use that tunnel. Organizational means that only users in the same organization as the account which created the tunnel can access it. Public means that no authentication will be used, and anyone can access it.

After you provide these values and click OK, a new dev tunnel will be created. Since we created this tunnel from the debug dropdown, it will also be set as the active tunnel. When you go back to the debug dropdown, you should see the active tunnel in the flyout. See below.

In this flyout we can see that one tunnel has been created, named sayed persistent. Since it has a checkmark next to it, that indicates that it is the active tunnel. To change the active tunnel, click on the name of the tunnel, or None for no tunnel.

When there is an active tunnel, it will be used for all ASP.NET Core projects that are started in Visual Studio. When Visual Studio is restarted, it will default back to None which means that no tunnel will be used. Once a tunnel is selected as active, it will remain active until Visual Studio is closed.

When you start an ASP.NET Core project and a tunnel is selected as active, a dev tunnel URL will be associated with that project, and it can be used to access it outside of your local machine. Take a look at the animation below.

As you can see from the animated gif, when the API project was launched, instead of using the localhost URL a dev tunnel URL is used. You can copy/paste this URL so that it can be used outside of your local machine. Before we move on to discuss the dev tunnels tool window, let’s take a minute to discuss when to use a persistent, and temporary, tunnels.

Persistent versus Temporary TunnelAs mentioned earlier a persistent tunnel is one that uses the same URL throughout its lifetime. This is great for when you are integrating your web app with an external service. For example, you’re implementing a GitHub webhook, or developing an API to integrate with a Power Platform app. In these cases, you’ll need to specify the call back URL with the external service. When you use a persistent tunnel, you should only need to configure the external service with that URL once. If you used a temporary tunnel, each time you restart Visual Studio, you will need to reconfigure the external service to point to the new URL.

Using a temporary tunnel is great when you only need that dev tunnel URL to work for a short amount of time. For example, you’re working on a web app, and you want to share your in-progress work with coworkers, or you want to test your app on an external device. In this case, you want to enable your coworkers to try out your app for a short amount of time. You would not want that URL to work in the future. It’s important to note that a tunnel URL will only connect to your local machine if you have Visual Studio open, a tunnel is selected as active, and one or more ASP.NET Core projects are running on the port indicated in the URL of the public tunnel URL. If you have a persistent tunnel, the URL will not work if there are no ASP.NET Core projects running in Visual Studio. Now that we’ve described the different cases for Persistent versus Temporary, let’s move on to look at the new tool window.

Dev tunnels Tool WindowTo open the dev tunnels tool window, you can use the Show Dev Tunnels Window menu option in the debug dropdown. You can also open this window with View -> Other Windows -> Dev Tunnels. Once it is opened, you should see a window like the following.

As you can see from the above screenshot, I have created two tunnels, one is a persistent tunnel and the other a temporary tunnel. These were created with different accounts. From this tool window, you can create a new tunnel with the green button. That will open the same dialog that was shown earlier in this post. When you create a tunnel from the tool window, it will not be set as the active tunnel like it is when a tunnel is created from the debug dropdown.

You can also remove (delete) tunnels with the red X button on the right side. There is a refresh button in the toolbar that can be used to refresh the list of tunnels, but you typically will not need to refresh this list. We currently don’t have the ability to show the active tunnel, or to make a selected tunnel as active in this tool window, but we are planning to add those capabilities soon. Now that we have discussed the new tool window to manage dev tunnels, let’s move on to discuss how you can get the tunnel URL programmatically.

Tunnel URL Environment Variable SupportWhen you launch an app that has a tunnel, Visual Studio will add a new environment variable named VS_TUNNEL_URL. This is the URL for the tunnel that is used for the current project. This can be useful when you are integrating the application with an external service, and you need the URL to pass to the external service. If you have multiple ASP.NET Core projects configured to start in Visual Studio, the app that is starting up will also get an environment variable for any project that started before it. For example, consider this sample where we have two projects set to start. Take a look at the image below that shows the Startup Projects. You can get to this dialog by right clicking the solution in the Solution Explorer and selecting Configure Startup Projects.

Here you can see that there are two ASP.NET Core projects configured to start, TemplatesApi and TemplatesWeb. Since TemplatesApi is above TemplatesWeb, it will be started before the TemplatesWeb project. When the TemplatesApi project is started, it will receive the VS_TUNNEL_URL. When the TemplatesWeb project is started it will get its own tunnel URL via VS_TUNNEL_URL, but it will also get the tunnel URL for the other project in the VS_TUNNEL_URL_TemplatesApi environment variable since that project was launched before the TemplatesWeb project. The syntax for this variable name is VS_TUNNEL_URL_[ProjectName], where [ProjectName] is the name of the other project. Now that we have covered the environment variable support, we’ll take a look at what is coming next for dev tunnels and then wrap up this post.

What’s next?We’ve made a lot of progress with the dev tunnels support in ASP.NET Core in Visual Studio over the past few months. In this release we have unlocked a lot of new functionality. We are still working to improve the quality of these features as well as adding new features. We are planning to update the tool window to show the active tunnel, enable setting a tunnel as active and getting a tunnel access token that can be used when a non-interactive app needs to authenticate to use the tunnel.

FeedbackMost of the updates that we delivered in this release were inspired by feedback from users like yourself. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones. You can also leave a comment here or reach out to Sayed on twitter at @SayedIHashimi.

Resources* Video tutorial of the updates * Using dev tunnels in the Power Platform * Previous blog post introducing the private preview * Previous blog post introducing the public preview * Azure Samples: Call Automation – Appointment Reminder Sample * Configure Twilio Webhooks automatically with Visual Studio dev tunnels during ASP.NET Core startup

The post Dev tunnels in Visual Studio for ASP.NET Core projects appeared first on Visual Studio Blog.

View Details

I’m excited to share today we released Visual Studio 2022 17.5 Preview 2! Your feedback goes directly to the product team working to deliver you the best developer IDE. We welcome your feedback on Developer Community where we are always eager to hear your suggestions for new or existing features and learn about any bugs or issues via report a problem.

Download Visual Studio 2022 17.5 Preview 2This release is packed with new capabilities across the IDE, .NET, C++ and Setup. There is something in this release for everyone. Many of these tackle top asks you’ve voted for on Developer Community. Use the list below to jump straight to what matters most for you:

IDE

  • All-In-One Search
  • Editor Sticky Scroll
  • Debugger text visualizers
  • Quick add Item
  • Re-authentication workflow

.NET

  • Publish to Azure Container Apps
  • Application Logs in VS Terminal
  • Filtering in Code Coverage Window

C++

  • C11 Atomics
  • Go to Definition Improvements
  • Macro Expansion Improvements
  • Unreal Engine Asset Inspector
  • Inlining of std::move & std::forward in Debug Mode
  • High-confidence Lifetime Checks
  • CMake Presets Version 5
  • Hot Reload in CMake Project Template
  • Build Multiple CMake Targets
  • Remote File Explorer
  • Linux Console Integrated Terminal Support
  • Dev Container Improvements
  • Serial Monitor Concurrent Monitoring
  • ARM64: LLVM Support

Setup and Updates

  • Customizing a Layout Using a .config File
  • Persistent Update on Close

Revised: We got a bit ahead of ourselves by including the new spell-checking feature we’re working but didn’t quite make our Preview 2 release. We’re still working on the spell checker and look forward to hearing your feedback when we release the spell checker in an upcoming preview release.

IDEAll-In-One SearchThe new search experience makes it easy for you to quickly find a Visual Studio menu feature files, types, and members in your code all from one place.

We have made significant improvements to the ordering and relevancy of results in our code search. We also removed the limit to the number of results provided in the results list without compromising speed.

Code search now has a Preview Panel that supports code results for both C# and C++! By default, the preview will automatically show when you perform a search so you can immediately see the context of the selected result.

Enable All-In-One Search by going to Tools > Manage Preview Features > “New Visual Studio Search experience (restart required)”.

Edit Sticky ScrollSticky Scroll helps you orient where you are in the file and understand the context of the code you’re looking at. As you scroll through your code, the class and method signatures will stick to the top of the editor window. Single clicking on one of the lines in the header will quickly navigate you to that line of code.

Try this feature out by going to the Options > Text Editor > General > Sticky Scroll and toggling the checkbox for “Show the nested current scopes during the scroll at the top of the editor”.

Debugger Text VisualizersThe new and improved text visualizer is now more powerful with additional tooling and string manipulation options. You can now do URL Encode and Decode, Base64 Encode and Decode JWT easily. The new window also provides full theming support for dark, blue, and light VS themes.

Quick Add ItemThe new Quick Add feature allows you to add new items to your solutions without navigating through the New Item Dialog. Add a new item as you normally would either by selecting a folder or project where you’d like a new file and selecting Add > New Item… from the context menu or by using the Ctrl+Shift+A keyboard shortcut. Add new files, such as “NewClass.cs” without browsing the template list. Quickly create nested folders, by just specifying a path. Or add multiple files or folders at once by using a “,” as a delimiter between items to scaffold out a new project. If you want to go back to the switch back to the full dialog just click “Show All Templates.”

Better Support for Accounts with Multiple TenantsImprovements to the re-authentication workflow not only provide context into why you need to re-authenticate your account, but also allow you to filter out any problematic directories for which you can’t satisfy conditional access policies (e.g., MFA, IP restrictions, etc.), or that might not be relevant to your current development activities.

.NETPublish to Azure Container AppsRight-click > Publish in Visual Studio for ASP.NET projects now support publishing to Azure Container Apps. It allows for both publishing on demand and setting up CICD via GitHub Actions.

Application Logs in VS TerminalYou can now view the application output for ASP.NET Core projects in the Integrated Terminal Tool Window instead of an external console window. If you launch multiple ASP.NET Core projects, each will show its output in a different Integrated Terminal Tool Window.

You can configure this setting in Tools -> Options -> Projects and Solutions -> ASP.NET Core, use the Run web server in option.

Filtering in Code Coverage WindowFilter code coverage reports so you can find relevant information quickly and avoid navigating through the whole coverage report. Several filter types are supported including:

  • Search by name (Show only those which matches search string in the window).
  • Filter by type
    • Show all
    • Show 100% fully covered
    • Show (>0% && < 100%) partially covered
    • Show 0% covered

C++C11 AtomicsWe have added an experimental implementation of C11 atomics to MSVC! Atomics is one of the optional features of C11, and our initial support is for lock-free atomics only. This feature is available under the /experimental:c11atomics flag, in /std:c11 mode or later. Read more about this in Charlie Barto’s blog post.

Go to Definition ImprovementsGo To Definition for C++ will now use a more subtle indicator when the operation is taking more time, replacing the modal dialog from previous versions.

Macro Expansion ImprovementsThere have been several improvements to IntelliSense macro expansion. Notably, we enabled recursive expansion in more contexts, and we added options to the pop up to copy the expansion to the clipboard or expand the macro inline.

Unreal Engine Asset InspectorYou can now view properties from base classes modified in an Unreal Blueprint asset without leaving Visual Studio. Double-click in a Blueprint reference for a C++ class or property to open the UE Asset Inspector in Visual Studio.

Inlining of std::move & std::forward in Debug ModeWe know that many of you care about performance in debug mode, particularly game developers. As such, named casts like std::move and std::forward will no longer produce function calls in generated code, even in debug mode /permissive- or a flag which implies it (e.g. /std:c++20 or std:c++latest` is required.

We have also added an [[msvc::intrinsic]] attribute to support this. This can be applied to non-recursive functions consisting of a single cast, which take only one parameter.

Find out all the details in Cameron DaCamara’s blog post.

High-confidence Lifetime ChecksWe have added high-confidence versions of the existing lifetime checker warnings warnings. Users who want less noise can enable only the high-confidence warnings, while users who want more rigorous checks at the cost of noise can enable both the old and the new warnings. As of 17.5, the high-confidence warnings are still experimental, but depending on the feedback we might include them in some of the recommended profiles in future versions.

You can find out more in Gabor Horvath’s blog post.

CMake Presets version 5CMakePresets.json version 5 is now supported. See the CMake documentation for information on the new features.

Hot Reload in CMake Project TemplateHot Reload is now supported in the CMake Project template allowing you to modify your CMake projects while they are running.

Build multiple CMake TargetsYou can now select multiple targets to build in the CMake Targets view. You can also now use the Test Explorer to build and test multiple CMake targets in parallel.

Remote File ExplorerThe Remote File Explorer is now available in preview and allows users to view the file directory on any remote machine they have connected to via the Connection Manager within Visual Studio. To enable this feature, go to Tools > Options > Preview Features and check “Enable the Remote File Explorer tool window”, then restart Visual Studio.

Once you have the preview feature enabled, just go to View->Remote File Explorer to open this view and use the dropdown menu within the Remote File Explorer to select your target machine.

Additionally, you can upload and download files to this remote machine and press the refresh button to sync changes to your remote machine that you may be working with in the Linux console, so that you can ensure you are working from the same directory. You also can cancel any ongoing file operations using the bottom pane.

Linux Console Integrated Terminal SupportThe Linux Console is now available in the Integrated Terminal which allows for input and output.

Dev Container ImprovementsYou can now run Dev Containers on remote Linux machines. You can select a remote connection to run your Dev Containers on from Tools, Options, Dev Containers.

Alternatively, you can right click the devcontainer.json file in the Solution Explorer and select Start Container on then select your preferred connection in the options.

You can also now open a Terminal window into the currently running Developer Container. Right click on the devcontainer.json file in the Solution Explorer and select Open container in terminal.

Serial Monitor Concurrent MonitoringConcurrent monitoring allows you to monitor multiple ports at the same time, side by side. Simply press the plus button to open another Serial Monitor and get started.

You can find the serial monitor in the debug menu under windows.

ARM64: LLVM SupportWe now ship a native Arm64 Clang toolset with our LLVM workload, allowing native compilation on Arm64 machines.

Setup and UpdatesWith Visual Studio 2022 version 17.5 Preview 2, we’ve introduced two new features that can help you configure a Visual Studio offline installation (layout) and stay updated easier.

Customizing a Layout Using a .config FileIt’s now possible to export a configuration file to configure the contents of an offline installation layout. This feature is one of our top voted Developer Community suggestions. This functionality is now available using the 17.5 Preview 2 installer. To try this out, first export a Visual Studio 2022 configuration file you want to replicate in your layout, download the latest 17.5 Preview 2 bootstrapper (https://aka.ms/vs/17/pre/vs_enterprise.exe), and run the following command:

vs_enterprise.exe --layout c:\layout --config c:\myconfig.config Additionally, it’s possible to add components to an existing layout. So, if you’ve already created a preview layout containing one workload, you can add configuration for additional components/workloads to that layout by using the exact same syntax above.

Persistent Update on CloseIt’s now possible to configure Visual Studio, to automatically apply previously identified available updates when it closes. This setting is configurable on a per instance basis of Visual Studio. You can, for example, set your Previews to check for updates when you close the Preview, but your regular production Visual Studio instance can continue to be updated on demand. You can find this option in the Tools Options Update Settings dialog.

Share your feedback and help us build a better Visual Studio!As you use Visual Studio, let us know what you love, what you like, and where you’d like us to improve. You can share feedback with us via Developer Community: report any bugs or issues via report a problem and share your suggestions for new features or improvements to existing ones.

As always, we appreciate the time you’ve spent reporting issues and hope you continue to give us feedback on how we’re doing and what we can improve.

The post Try out Visual Studio 2022 version 17.5 Preview 2 appeared first on Visual Studio Blog.

View Details

We often hear feedback from users like you that request smaller quality-of-life improvements in Visual Studio. While we can’t address every piece of feedback right away, we appreciate the time you spend providing it and hope you continue to share your thoughts on how to make Visual Studio even better. In today’s blog post, we’d like to share a handful of these enhancements that can help you improve your personal productivity. You’ll now find:

  • A timestamp feature added to the Output window to help you quickly identify where time is going during your build or other processes
  • Selection matching quickly identifies other instances of a given selection
  • The ability to scroll horizontally with the mouse wheel allowing you to parse through your code more quickly
  • Audio cues to provide additional sensory feedback while navigating your code
  • A highlight on the current line number to draw your attention more easily

You can start using all these features today in the latest release of Visual Studio:

Download Visual StudioTimestamps in the output windowWhen an operation takes more than a few milliseconds, it can be useful to know the specific times that individual steps take. The timestamp feature adds the time that each line is added to the Output window or any other log-type window.

Output window with timestamps shownTo enable the Timestamps, invoke the Show Timestamp button (which looks like a clock) on the right side of the toolbar. You can also hit Alt-S while focus is in the Output window to move focus to the toolbar and repeatedly press Tab to get to the Show Timestamp button to toggle it on or off.

With timestamps enabled, the time will be prepended any time a line is added to the log. Enabling or disabling the timestamps won’t retroactively add or remove timestamps to lines in the log, it will only be applied to any lines as they are added to the log.

Quickly see matches with selection matchesThis feature activates whenever a range of characters are selected in the editor that has 100 or less characters and is on a single line. When these conditions are met, Visual Studio finds and highlights any matching strings elsewhere in the editor. Additionally, any matches will be marked in the scrollbar if the “Map mode” scrollbar is enabled.

Highlighting strings that match the selectionThe highlight is a case-insensitive match and will match strings that differ by case. To enable or disable the feature, head to Tools\Options and look for the “Show selection matches” option on the Text Editor\General page.

Scroll horizontally with the mouse wheelWe’ve heard the feedback and we now have the ability in Visual Studio to use the mouse wheel to scroll the editor horizontally as well as vertically. Holding down the shift key while rolling the mouse wheel will cause the editor to scroll horizontally.

To modify the speed for horizontal mouse scrolling, head to Tools\Options and navigate to the Text Editor\Advanced page. Near the bottom of the list is an entry for Horizontal scrolling sensitivity. Increase the value in this box to cause the editor to scroll by more characters each time the mouse wheel is rolled.

Orient to your code with audio cuesAudio Cues are a feature that we realized was particularly valuable for our developers with visual disabilities. We’ve also been hearing from folks across our entire user base that they use them. These simple sounds can help users orient themselves quickly to what’s going on in their code.

To enable audio cues, head to Tools\Options and navigate to the Text Editor\General page. Near the top of the page is an option for “Enable audio cues”. If this box is checked when Visual Studio starts, Audio Cues will be enabled. Currently, Visual Studio has audio cues for the following events:

  • When the caret arrives on a line that was added or removed when viewing a diff between two versions of a file
  • When the caret arrives on a line with an error, breakpoint, or warning

While editing your code, if any of these events occur, Visual Studio will play the corresponding sound. If multiple events occur, only the highest priority sound will play.

To customize these sounds, go to the Settings in Windows and search for “Change System Sounds”. This will bring up the Sound panel and switch to the Sounds tab. Near the bottom of the Program Events list are the Microsoft Visual Studio events, which include these events and several other events that Visual Studio also recognizes. The other events can be configured, but these aren’t controlled by the “Enable audio cues” option on the Text Editor\General page from Visual Studio. You can use the Sound panel to disable any individual audio cue by setting its sound to (None).

Highlighting helps quickly identify the current line numberThis feature makes it easier to identify the current line number at a glance by highlighting the current line number.

Current line number highlightedTo customize how the current line number appears, head to Tools\Options and navigate to the Fonts and Colors page. The “Line Number (Current)” item controls the attributes for the current line number.

Your vote matters!We hope these features help you become more productive using Visual Studio and would like to thank you once again for sharing your feedback. Head over to Developer Community to join in on the conversation with us by voting for suggestions that would make you more productive or provide new feedback to help us continue delivering new features that excite you. Thank you for being an important part of the Visual Studio family!

Download Visual StudioThe post What’s new in Visual Studio productivity appeared first on Visual Studio Blog.

View Details

Staying up to date with relevant news about your tech stack and virtual events is not always easy. There are lots of different sources and seeking out the information can be time-consuming. To help get you the information you need, we’re experimenting with bringing back Developer News inside Visual Studio – this time with some refreshing updates.

A lot of you missed the Developer News feed on the old Start Page in Visual Studio 2017 and earlier, and you’ve been busy voting for us to bring it back. Your reasons were many. Some stated they missed their mornings with coffee and the news before diving into code. Some used it to get information about conferences and other relevant events.

Data Juggler on Twitter said it best in response to a tweet about a recent virtual conference:

Jeff Landry adds:

[…] Being behind is a combination of not catching an announcement, not paying attention to an announcement, and more often than I would like being concerned the feature will go away or not really understanding how important it can be to me.

Points taken!

The new Developer NewsBefore we started bringing back Developer News, we knew we had to address some of the issues with the old Start Page news feed. Common complaints we heard from users were:

  • The feed isn’t updated often enough (#153403)
  • I need to customize the news to my interests (#633349)
  • I don’t use the Start Page, but still want the news feed (#769812)
  • The news feed isn’t easily available when I’ve got a solution open (#836159, #620061)

The new design had to consider those issues to make it even better than it used to be. The result is a simple News tool window docked in the same location as Solution Explorer to make it readily accessible.

If you don’t want the News window visible, then close it down and easily access it from the View top level menu or hit Ctrl + Alt + N.

Customize your newsClicking the settings icon in the top-right corner opens a list of news feeds to choose from. By default, only the Visual Studio news feed is selected. You can now check any other news feed that you’re interested in.

It always shows Visual Studio because that contains stories about Visual Studio itself and therefore applies to all users.

The top-most checkbox controls which browser to use when you click on a news story. By default, the news story opens your default browser, but you can change that to the internal Visual Studio browser instead. Another way to open a story in the default browser is to hold down the Control key while clicking on it.

Early testing has been overwhelmingly positive. Here are some reviews from the Visual Studio Marketplace:

A special thank youBefore we started the work to bring back Developer News, the community had already stepped up. Most noticeably was the Developer News extension by Yann Duran which filled the gap with great reviews. Thank you for that, Yann!

The passion from the community around Developer News has been extraordinary. The suggestion ticket had a lot of comments with great conversation, and it helped us create a better solution in the end. Thank you all.

Moving forwardThere are lots of possibilities of having a news reader inside Visual Studio. Some features we’re considering are adding news about local events and integrating with the Developer Community. What ideas do you have for Developer News? Let us know on the GitHub repository.

The post Get your developer news appeared first on Visual Studio Blog.

View Details

Available today in the 17.4 public release, Visual Studio has revamped its ESLint support! The new linting experience includes: 

Linting support – for not only JavaScript and TypeScript files, but also for JSX/TSX, Vue and HTML files. 
Quick actions and fixes,

The post Building a new JavaScript linting experience in Visual Studio appeared first on Visual Studio Blog.

View Details

Visual Studio is a rich IDE that provides an abundant collection of tools and functionality for developers to use in every stage of software development. As we all know, technologies change over time, some faster than others; consequently, certain components that are initially included with Visual Studio may go out of support faster than the IDE itself. 

The post Removing out-of-support components from your Visual Studio installations appeared first on Visual Studio Blog.

View Details

This post will concentrate on everything new, cool, trendy, and useful around the integrated Web Live Preview tool in Visual Studio 2022.

More than 17 years ago, when I started my dev career with ASP.NET Web Forms as part of an ASP.NET development team,

The post Improve your productivity with Web Live Preview and Telerik appeared first on Visual Studio Blog.

View Details

I am excited to share the news that .NET Multi-platform App UI (.NET MAUI) is now available in Visual Studio for Mac!  .NET MAUI tooling shipped in the 17.4 preview Visual Studio for Mac release in August, and then on November 8th we shipped the general availability of .NET MAUI tooling in the 17.4 stable release.  

The post .NET MAUI is now available in Visual Studio for Mac 17.4 appeared first on Visual Studio Blog.

View Details

Every new Visual Studio release includes new performance improvements that make the product faster and more responsive. 17.4 has some significant improvements across common scenarios like  Find in Files, Branch switching, configuration changes, unit testing, C++ indexing and file saving. We use product telemetry from our GA releases to set baselines,

The post Visual Studio 2022 Performance Enhancements 17.4 appeared first on Visual Studio Blog.

View Details

IT Administrators often want to control, via group policy, certain aspects of Visual Studio behavior to achieve consistency, compliance, and compatibility across their organizations.

One challenge has been that there was no easy way to discover what global policies exist for Visual Studio.

The post Enable Group Policy Settings with Visual Studio Administrative Templates (ADMX) appeared first on Visual Studio Blog.

View Details

In a previous blog post we introduced the private preview for port forwarding in Visual Studio, this support has now been renamed to “dev tunnels” and is now in public preview. The main difference between the private preview and the public preview is that you no longer need to sign-up,

The post Public preview of dev tunnels in Visual Studio for ASP.NET Core projects appeared first on Visual Studio Blog.

View Details

As one of our most highly request features with Developer Community, we are so happy to announce the release of multi-repository support in Visual Studio 2022. Support for multiple repositories means you can have up to 10 active Git repositories at once.

The post Multi-repository Support Released! appeared first on Visual Studio Blog.

View Details

Visual Studio IDE is a feature-rich program that supports many aspects of software development. Our customers can use VS to edit, debug, and build code, and then publish an app. The IDE also provides frequent updates to add additional features, make reliability improvements,

The post Introducing Visual Studio Rollback! appeared first on Visual Studio Blog.

View Details

Starting in November 2022, IT Administrators can now deploy Visual Studio administrator security updates throughout their organization to cloud connected devices that are configured to use Windows Update for Business (WUfB) and are managed by mobile device management solutions such as Microsoft Endpoint Manager (also known as Intune).

The post Deploy Visual Studio updates to devices enrolled in Windows Update for Business appeared first on Visual Studio Blog.

View Details

We are happy to announce the first fully supported Arm64 version of Visual Studio that will natively run, allowing building, and debugging Arm64 apps on Arm-based processors.

17.4 GA delivers a native Arm64 experience for Visual Studio that eliminates the need for emulation in most developer workflows.

The post Arm64 Visual Studio is officially here! appeared first on Visual Studio Blog.

View Details

Visual Studio for Mac v17.4 is available today! This release includes improvements to the editor like the new Editing State margin and the return of the Class pad, and fixes for issues that users have reported. We’re also releasing our first preview of Visual Studio for Mac 17.5 for people to see what we’ve got planned. 

The post Visual Studio for Mac 17.4 is now available appeared first on Visual Studio Blog.

View Details

We are happy to announce that Visual Studio 2022 17.4 is now generally available. This is our first GA release to support Arm64. In addition some of the other prominent features it includes are .NET 7, enterprise support for setup including rollback,

The post Visual Studio 2022 17.4 is now available! appeared first on Visual Studio Blog.

View Details

PHP is one of the most popular programming languages for server-side web development. It’s used in many frameworks and CSMs like WordPress, Laravel, Symfony, and others which are behind a sizable chunk of the Internet.

Visual Studio is a powerful IDE,

The post PHP in Visual Studio appeared first on Visual Studio Blog.

View Details

A few weeks ago, I gave a presentation at a conference about cool new features in Visual Studio 2022. It was a pre-recorded presentation, so I was able to do final edits to the video before sending it to the conference organizers.

The post Cool features in Visual Studio 2022 appeared first on Visual Studio Blog.

View Details

We’re introducing a new way to learn about Git, GitHub, and version control in Visual Studio – an email learning series with actionable challenges and a repository to practice your skills! We found from our Happiness Tracking Survey that 34% of our VS developers aren’t using any form of version control.

The post Learning Series: Get started with GitHub in Visual Studio appeared first on Visual Studio Blog.

View Details

You want to share some code you’ve written with a colleague, so you select it in the editor and hit Ctrl+C to copy it. As you paste it in Outlook/Slack/Teams, you realize that the indentation levels are inconsistent due to your original selection.

The post Copy with proper indentation appeared first on Visual Studio Blog.

View Details

We want to keep you secure when using Visual Studio. If you’re using an older version of Visual Studio, we have several reminders about upcoming events in the Visual Studio support lifecycle.

First, if you’re using the Community Edition of Visual Studio 2017 or 2019,

The post Support reminder for older versions of Visual Studio appeared first on Visual Studio Blog.

View Details

Over the last couple of years, we’ve expanded our Visual Studio VM image offerings for the Azure Marketplace. These images have proven to be popular not only for evaluating the latest Visual Studio releases, but also for jumpstarting developer environments in the cloud.

The post Visual Studio’s Azure Marketplace images now support Microsoft Dev Box appeared first on Visual Studio Blog.

View Details

As developers, we often need to compare two files to find the differences. Sometimes, even comparing the content of the clipboard with a file on disk. And again, sometimes comparing our local changes to previous versions from our Git commit history.

The post Comparing files in Visual Studio appeared first on Visual Studio Blog.

View Details

We are pleased to announce the second preview release of Visual Studio for Mac 17.4. This release has been focused on addressing feedback from customers and on improving the overall experience. If you are already using the Visual Studio for Mac Preview release,

The post Visual Studio for Mac 17.4 Preview 2.1 is now available appeared first on Visual Studio Blog.

View Details

Back in June, we announced Arm64 Visual Studio 2022 application, the first version of Visual Studio that natively supports building and debugging Arm64 apps on Arm-based processors.  Now, we’re excited to announce the extensions you write, and use, are supported in Arm64 VS!

The post Now Introducing Arm64 Support for VS Extensions! appeared first on Visual Studio Blog.

View Details

Your favorite DataTable visualizer has now got a makeover with all new improvements coming in 17.4 Preview 2. The DataTable visualizers will now support sorting, filtering, exporting, and theming like IEnumerable visualizer.

The DataTable Visualizer allows you to view the contents of a DataTable,

The post DataTable Visualizer Improvements appeared first on Visual Studio Blog.

View Details

We have released Visual Studio 2022 17.4 Preview 2. In this post we’ll share details about features added since Preview 1. Feedback from developers like you during our preview cycle is so important for us to deliver a final product that meets your high expectations.

The post Visual Studio 2022 17.4 Preview 2 appeared first on Visual Studio Blog.

View Details

In less than two years, Bicep’s VS Code extension has grown from zero users to more than 15 thousand a month. In addition to the Bicep extension’s success, millions of resources are now deployed with Bicep files via Azure CLI and Azure PowerShell.

The post It’s finally here. Bicep is in Visual Studio! appeared first on Visual Studio Blog.

View Details

When dealing with deeply nested brackets in Visual Studio, it can be hard to figure out which brackets match and which do not. For people with color blindness or other optic maladies, the problem can be even worse. By color-coding bracket pairs,

The post Adding color to bracket pairs appeared first on Visual Studio Blog.

View Details

Securing your Visual Studio Live Share session has never been easier. Whether you’re looking to restrict access to only individuals in your organization or to disable read-write terminals, your organization can now configure policies for proper control and compliance.

Today, we invite organizations to explore everything Live Share has to offer,

The post Live Share: Enterprise Policies are here! appeared first on Visual Studio Blog.

View Details

We released Visual Studio 2022 17.4 Preview 1 last week alongside the 17.3 generally available release. In this post we’ll share details about some of the new capabilities in this preview and the focus of this release. Feedback from developers like you during our preview cycle is so important for us to deliver a final product that meets your high expectations.

The post What’s New in Visual Studio 2022 17.4 Preview 1 appeared first on Visual Studio Blog.

View Details

We are excited to announce the release of Line-staging support in Visual Studio 2022. Line-staging, a.k.a. interactive staging, enables you to split your changed lines of code across different commits. Line-staging could also be utilized in reviewing your changes before committing them.

The post Git Line-staging Released! appeared first on Visual Studio Blog.

View Details

Summary

Visual Studio provides two great tools for analyzing and diagnosing memory issues in .NET applications: the Memory Usage profiler and .NET Object Allocation Tracking tool. While both tools are useful, it may not be obvious for new user to know which one to use when.

The post Choosing a .NET Memory Profiler in Visual Studio – part 1 appeared first on Visual Studio Blog.

View Details

Last year, we announced the first phase of a new extensibility model for Visual Studio.  This new model will make extensions easier to write and more reliable along with additional benefits such as being able to install these extensions without restarting the IDE. 

The post VisualStudio.Extensibility: A New Way to Write Extensions appeared first on Visual Studio Blog.

View Details

Today we released Visual Studio for Mac v17.3. This release includes User Secrets support, several new code fixes, Apple Developer Accounts, adds Task Window and Regular Expressions dialog implemented in native UI, and fixes for top reported user issues. We’re also releasing our first preview of Visual Studio for Mac 17.4,

The post Visual Studio for Mac 17.3 is now available appeared first on Visual Studio Blog.

View Details

We are happy to announce that Visual Studio 2022 17.3 has been released and is now generally available. At Microsoft, we thrive on getting feedback and experiences from those using Visual Studio and continually work to improve the product based on this feedback.

The post Visual Studio 2022 17.3 is now available! appeared first on Visual Studio Blog.

View Details

When you have multiple instances of Visual Studio open at the same time, it can be tricky to tell them apart. Especially if you’re working on different branches of the same solution, which makes them look almost identical. What if each instance could have a unique color so you could instantly tell them apart?

The post Differentiating Visual Studio instances appeared first on Visual Studio Blog.

View Details

In Visual Studio 17.3 Preview 3, we added a few highly requested improvements in IEnumerable visualizer like Filtering, Theming, and CSV export to enhance the visualizer experience further.

The .NET IEnumerable debugger visualizer is one of our most loved debugging features in recent times.

The post IEnumerable Debugger Visualizer Improvements appeared first on Visual Studio Blog.