Quantcast
Channel: Visual Studio Blog
Viewing all 1039 articles
Browse latest View live

Break When Value Changes: Data Breakpoints for .NET Core in Visual Studio 2019

$
0
0

“Why is this value changing unexpectedly and where or when is this occurring?!

This is a question many of us dread asking ourselves, knowing that we’ll have to do some tedious trial-and-error debugging  to locate the source of this issue.  For C++ developers, the exclusive solution to this problem has been the data breakpoint, a debugging tool allowing you to break when a specific object’s property changes.  Fortunately, data breakpoints are no longer a C++ exclusive because they are now available for .NET Core (3.0 or higher) in Visual Studio 2019 Preview 2!

Data breakpoints for managed code were a long-requested ask for many of you. They are a great alternative to simply placing a breakpoint on a property’s setter because a data breakpoint focuses on a specific object’s property even when it’s out of scope, whereas the former option may result in constant, irrelevant breaks if you have hundreds of objects calling that function.

How do I set a data breakpoint?

Setting a data breakpoint is as easy as right-clicking on the property you’re interested in watching inside the watch, autos, or locals window and selecting “Break when value changes” in the context menu.  All data breakpoints are displayed in the Breakpoints window. They are also represented by the standard, red breakpoint circle next to the specified property.

Setting a data breakpoint in the Locals window and viewing the breakpoint in the Breakpoints window

When can I use data breakpoints?

Now that you know how to set a data breakpoint, now what?  Here are some ways to take advantage of data breakpoints when debugging your .NET Core applications.

Let’s say that you want to figure out who is modifying a property in an object and for most of the time, this property change does not happen in the same file. By setting a data breakpoint on the property of interest and continuing, the data breakpoint will stop at the line after the property has been modified.

Break when _data value changes

This also works for objects. The data breakpoint will stop when the property referencing the object changes value, not when the contents of the object change.

Break when the property referencing an object changes

As illustrated in the GIF above, calling the toEdit._artist.ChangeName() function did not cause a breakpoint to hit since it was modifying a property (Name) inside the Song’s Artist property.  In contrast, the data breakpoint is hit when the _artist property is assigned a reference to a new object.

Data breakpoints are also useful when you want to know when something is added or removed from a collection. Setting a data breakpoint on the ‘Count’ field of classes from System.Collections.Generic makes it easy to detect when the collection has changed.

Break when an object is added or removed from a list

Are there opportunities for improving managed data breakpoints?

Since Visual Studio 2019 is still in preview, we highly encourage you to experiment, play around with, and provide feedback for this iteration of data breakpoints.  Here are some known scenarios where data breakpoints currently cannot be set that we are working on erasing and improving in future Visual Studio updates:

  • Properties that are not expandable in the tooltip, Locals, Autos, or Watch window
  • Static variables
  • Classes with the DebuggerTypeProxy Attribute
  • Fields inside of structs

Managed data breakpoints also exclude properties that call native code and properties that depend on too many fields.

Ready to try data breakpoints in your .NET Core applications?  Let us know in the comments!

For any issues or suggestions about this feature, please let us know via Help > Send Feedback > Report a Problem in the IDE or in the Developer Community.

Leslie Richardson, Program Manager, Visual Studio Debugging & Diagnostics
@lyrichardson01

Leslie is a Program Manager on the Visual Studio Debugging and Diagnostics team, focusing primarily on improving the overall debugging experience and feature set.


Code more, scroll less with Visual Studio IntelliCode

$
0
0

You may know that Visual Studio IntelliCode helps you write code from commonly used libraries, based on machine learning across thousands of open sourced GitHub repos. Instead of having to search and scroll through a sorted list of methods and properties, you get suggestions on the most likely ones for your coding context as you type.

While the wisdom of the open source community is delivered direct to your editor’s IntelliSense, what if you want to write code based on a set of APIs not included in the GitHub public repos? Perhaps you use numerous internal utility and base class libraries, or domain-specific libraries that aren’t often used in open-source.  You may not know that if you code in C# you can have IntelliCode analyze to your own code and share what it learns it across your team, so you can all benefit from recommendations and more easily collaborate. Depending on your codebase, analyzing your code and sharing the resulting model could be done in a matter of minutes and save your team hours of hunting through lists and documentation diving.

How do I create and use my own model?

It’s as easy as 3 short steps.

  1. Make sure you have the IntelliCode extension for Visual Studio installed
  2. Effortlessly create a custom model for a codebase that contains good examples of usage of your desired class libraries – remember that the quality of suggestions offered by IntelliCode is directly related to the quality of the samples you provide.
  3. Easily share it with your colleagues so they can start using the recommendations. If you need to update the model, for instance if there are substantial changes to the code, your team will automatically receive the latest updates when you retrain.

Creating an IntelliCode Custom Model

My colleague Allison Buchholtz-Au has a great video covering this topic if you’d like to see more details.

If you’re a contributing author of an open source component, it’s simple for you to share a model that helps your users leverage your libraries more easily. Don’t forget to share the model somewhere that users who are getting started will find it. We suggest linking to it from the README in your repo.

What about security?

Most importantly, we don’t upload your raw source code to our servers. You can learn more about what happens when you train a model in our FAQ.

Your feedback matters

If you have more suggestions and feedback about IntelliCode, we’d love to hear from you. Get in touch and let us know more.

The post Code more, scroll less with Visual Studio IntelliCode appeared first on The Visual Studio Blog.

Visual Studio 2019 Launch Event agenda and speakers now published

$
0
0

We’re only 15 days away from the general availability of Visual Studio 2019 and our virtual Visual Studio 2019 Launch Event. It’s been incredible to see all the buzz and excitement in the community around the launch, from the 180+ local launch events happening all across the globe over the next months to all the posts about the features you’re most excited about on Twitter. Today, I’m happy to share the full agenda for the Visual Studio 2019 Launch Event with you, alongside the list of speakers.

Pacific Daylight Time ‎(UTC-7)‎ Coordinated Universal Time ‎(UTC)‎ Session Speaker(s)
9:00 AM 16:00 Not your average keynote Scott Hanselman & friends
10:00 AM 17:00 Live Q&A with Visual Studio Big Wigs Amanda Silver & Joseph Hill
10:30 AM 17:30 Write beautiful code, faster Kendra Havens
11:00 AM 18:00 Streamline your dream dev team Allison Buchholtz-Au & Jon Chu
11:30 AM 18:30 Squash bugs and improve code quality Leslie Richardson
12:00 PM 19:00 Taking DevOps to the next level with GitHub and Azure DevOps Steven Borg & Stanley Goldman
12:30 PM 19:30 AI-infused break Seth Juarez
1:00 PM 20:00 Accelerate your C++ development Erika Sweet & Marian Luparu
1:30 PM 20:30 Cross-platform mobile apps made easy using Xamarin James Montemagno
2:00 PM 21:00 To the cloud with Visual Studio and Azure Andrew Hall & Paul Yuknewicz
2:30 PM 21:30 Build amazing web apps with .NET Core Dan Roth
3:00 PM 22:00 A tour of Visual Studio for Mac for .NET development Mikayla Hutchinson
3:30 PM 22:30 Amazing devs doing amazing things Jeff Fritz, Ginny Caughey (MVP), & Oren Novotny (MVP)
4:00 PM 23:00 #CodeParty Virtual Attendee Party, live on Twitch

As you can see, we have a day packed with exciting demos and conversations with the incredible people behind the products in store. Be sure to stick around for the #CodeParty Virtual Attendee Party closing out the day on twitch.tv/visualstudio, sponsored by our amazing Visual Studio partners. There will be plenty of opportunities to talk to our team, hang out, and of course win some awesome prizes. Check out the full list of partners behind the party on the launch event website.

Be a part of the launch celebration

Of course, it wouldn’t be much of a celebration if we’re the only ones celebrating. We’re hoping you’ll join in on the launch, here’s how you can participate:

  • #VS2019 on Twitter
    • Let us know what your favorite feature of Visual Studio 2019 is and what you’re most excited about
    • If you spot some of the hidden gems and Easter eggs we sprinkled throughout the keynote, show off your eye for detail online
    • During the sessions between 10 AM and 4 PM (Pacific Time) ask questions and we’ll do our best to get them in front of the speakers to be answered live
  • twitch.tv/visualstudio
    • We’ll be streaming on Twitch all day (alongside YouTube and Channel 9) and we’ll have team members online to chat with and answer your questions
    • The #CodeParty at the tail-end of the launch event will be exclusively on Twitch, where you can hang out, chat with the people behind the products, and win prizes
  • Local launch events
    • There are over 180 local launch events happening across the globe between April 2nd and June 30th. Even if you can’t tune in live on April 2nd, these community-driven events will offer plenty of opportunities to learn and connect

 

Thank you for your enthusiasm about the launch so far and we hope to see you on April 2nd!

The post Visual Studio 2019 Launch Event agenda and speakers now published appeared first on The Visual Studio Blog.

Visual Studio Subscriptions – everything you need for Azure development

$
0
0

Recently, our product team has been talking with Visual Studio subscribers to learn more about how they approach cloud development. Many of the subscribers we spoke with mentioned that they were unaware of the benefits included with a Visual Studio subscription, that are intended to make learning new technologies and prototyping easy.

If you’re interested in cloud development, or simply want to learn more about new development tools, techniques, and frameworks, your subscription includes a wide range of benefits you can use. The level of these benefits you have depends on your subscription type. Check out this benefits video or read on below for an overview.

Cloud services

Subscribers have access to unlimited Azure DevOps accounts and access to features on any Azure DevOps organization to share code, track work, and ship software. You can use Azure Pipelines to run Continuous Integration and Continuous Delivery jobs and automate the compilation, testing and deployment of applications, for all languages, platforms and cloud services. You also get access to Azure Boards, which lets you deliver software faster thanks to proven agile tools for planning, tracking and discussing work items across teams.

Your subscription has a $50-$150 monthly Azure credit, which is ideal for experimenting with and learning about Azure services—your own personal sandbox for dev/test. When you activate this benefit, a separate Azure subscription is created with a monthly credit balance that renews each month while you remain an active Visual Studio subscriber. If the credits run out before the end of the month, the Azure services are suspended until more credits are available. No surprises, no cost, no credit card required. If you wonder what you can buy with a $50 credit, check out this blog post for some ideas.

If you’d like to collaborate with your team in the cloud, the Azure Dev/Test offer enables you to quickly get up and running with dev/test environments in the cloud using exclusive pre-configured virtual machines and up to a 50% discount on a range of services. You have the flexibility to create multiple Azure subscriptions based on this offer, enabling you to maintain isolated environments and a separate bill for different projects or teams.

Visual Studio Enterprise subscriptions include Enterprise Mobility + Security to help you secure and manage identities, devices, apps and data.

Developer tools

Subscribers have continued access to the latest versions of Visual Studio IDE on Windows & Mac.

Cloud migration tools such as CAST Highlight by CAST (Enterprise only) and CloudPilot by UnifyCloud were recently added as new benefits to help you get a head start on your app modernization journey and migration to the cloud.

Training and support

Take your skills to the next level with LinkedIn Learning and Pluralsight courses included in your subscriber benefits.

Your subscription also provides access to technical experts, Azure Advisory Chat, and Azure Community to help you solve issues and answer questions. Just submit a technical support ticket, questions via chat, or start community discussions.

You can find all these benefits by logging into the subscriber portal at https://my.visualstudio.com. Contact your admin for access to the portal if you do not have a currently assigned subscription. For more information on how to use your benefits, check out our docs.

We would love to hear your feedback, suggestions, thoughts, and ideas in the comments below.

The post Visual Studio Subscriptions – everything you need for Azure development appeared first on The Visual Studio Blog.

Using Newtonsoft.Json in a Visual Studio extension

$
0
0

The ever popular Newtonsoft.Json NuGet package by James Newton-King is used throughout Visual Studio’s code base. Visual Studio 2015 (14.0) was the first version to ship with it. Later updates to Visual Studio also updated its Newtonsoft.Json version when an internal feature needed it. Today it is an integral part of Visual Studio and you can consider it a part of the SDK alongside other Visual Studio assemblies.

Extensions can therefore also use the very same Newtonsoft.Json shipped with Visual Studio. It can, however, be confusing to know what version to reference and whether to ship the Newtonsoft.Json.dll file itself with the extension or not. And what if the extension supports older version of Visual Studio that doesn’t come with Newtonsoft.Json?

I promise it’s not confusing once you know how, so let’s start at the beginning with versioning.

Versioning

Just like any other Visual Studio SDK assemblies, extensions must reference lowest version matching the lower bound of supported Visual Studio versions. For instance, if the extension supports Visual Studio 14.0, 15.0, and 16.0, then it must reference the 14.0 SDK assemblies. The same is true for referencing Newtonsoft.Json, but it is less obvious to know what version shipped when.

Here’s the breakdown:

  • Visual Studio 16.0 – Newtonsoft.Json 9.0.1
  • Visual Studio 15.3 – Newtonsoft.Json 9.0.1
  • Visual Studio 15.0 – Newtonsoft.Json 8.0.3
  • Visual Studio 14.0 – Newtonsoft.Json 6.0.x
  • Visual Studio 12.0 – none

So, if your extension’s lowest supported Visual Studio version is 14.0, then you must reference Newtonsoft.Json version 6.0.x. In fact, make sure the entire dependency tree of your references doesn’t exceed that version.

Learn more about Visual Studio versioning in the blog post Visual Studio extensions and version ranges demystified.

Binding redirects

When referencing a lower version of Newtonsoft.Json than ships in Visual Studio, a binding redirect is in place to automatically change the reference to the later version at runtime. Here’s what that looks like in the devenv.exe.config file of Visual Studio 15.0:

<dependentAssembly>
  <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
  <bindingRedirect oldVersion="4.5.0.0-8.0.0.0" newVersion="8.0.0.0"/>
</dependentAssembly>

It makes sure that when an assembly references a version of Newtonsoft.Json that is older than 8.0.0.0, it automatically redirects to use the 8.0.0.0 version that ships in Visual Studio 15.0.

This is the same mechanism that makes it possible to use an SDK assembly such as Microsoft.VisualStudio.Language.Intellisense version 12.0 in Visual Studio 16.0. A binding redirect automatically changes the reference to the 16.0 version of that assembly.

Don’t ship it unless you need to

The rule of thumb is to not ship the Newtonsoft.Json.dll file in the .vsix container. Since Visual Studio always have a copy and does binding redirects, there is no reason to ship it.

However, there are two scenarios where you do want to ship the .dll with the extension.

  1. If your extension supports Visual Studio 12.0 or older
  2. If you absolutely need a newer version than shipped by Visual Studio

When supporting Visual Studio 12.0 or older, try to use Newtonsoft.Json version 6.0.x if possible. That ensures that when the extension runs in Visual Studio 14.0 and newer, then the .NET Framework won’t load the assembly from your extension, but instead use the one it ships with. That means fewer assemblies needed loading by the CLR.

If you ship your own version, then don’t expect to be able to exchange Newtonsoft.Json types with other assemblies in Visual Studio because they were compiled against a different version. Normally binding redirects unifies the versions, but not when shipping your own. Also specify a code base for it so Visual Studio can resolve it at runtime. You don’t always need to, but it’s considered best practice and avoids any issues. Simply add this line to your AssemblyInfo.cs file:

[assembly: ProvideCodeBase(AssemblyName = "Newtonsoft.Json")]

It’s very important that you never add your own binding redirect for Newtonsoft.Json.dll either. Doing so will force all assemblies in the Visual Studio process to redirect to the version you ship. This might lead to unpredictable issues that could end up breaking other extensions and internal components.

Follow the simple rules

So, the simple rules to apply when using Newtonsoft.Json are:

  1. Reference the lowest version of Newtonsoft.Json (but no lower than 6.0.x)
  2. Don’t ship Newtonsoft.Json.dll in the extension
    1. Except if you target Visual Studio 12.0 or older
    2. Except if you absolutely need a newer version than ships in Visual Studio
    3. If you do, specify a code base for it
  3. Don’t ever add binding redirects for Newtonsoft.Json.dll

I wrote this post based on feedback and questions about how to correctly reference Newtonsoft.Json from an extension. I hope it helped clarify it. If not, please let me know in the comments.

The post Using Newtonsoft.Json in a Visual Studio extension appeared first on The Visual Studio Blog.

Visual Studio Extensibility Day at Build 2019

$
0
0

Please join us for a day full of Visual Studio extensibility deep dives, geek-outs, and networking on Friday, May 10th, 2019 at the Microsoft campus in Redmond. Our agenda is intended for existing and new Visual Studio IDE (not Visual Studio Code) extension authors and partners and will be highly technical in nature.

The Extensibility Day will take place in Microsoft building 18 which is the home of the Visual Studio engineering team. This means that we will have Visual Studio engineers directly on hand throughout the day for your questions and troubleshooting.

You’ll learn about what’s new in Visual Studio 2019 for extensibility, get an update from the Marketplace and see what’s on the roadmap. On top of that, there will be technical deep dives that explore the inner workings of it all. Sprinkle on some networking, Q&A, swag, and surprises and you’ll end up with a great day of learning and fun. The event ends in the afternoon with an opportunity to unwind with your fellow extenders at the Microsoft Commons in the heart of the Redmond Campus.

Should I go?

If you have written a Visual Studio IDE extension or have been a Visual Studio partner, then we would encourage you to attend. There is a lot of content, networking opportunities and you have a venue to interact with the Visual Studio engineers and help shape future work too!

The event will not contain any introductory sessions and will assume that you are familiar with the Visual Studio extensibility model.

Register

Registration is now open and operates under a first-come first-serve basis. We have limited availability so make sure to register as soon as possible.

The post Visual Studio Extensibility Day at Build 2019 appeared first on The Visual Studio Blog.

Visual Studio 2019: Code faster. Work smarter. Create the future.

$
0
0

Visual Studio 2019 is generally available today and available for download. With Visual Studio 2019, you and your teams will become more productive in building current and future projects as you benefit from the innovation in the IDE that makes every keystroke count.

As we’ve shared earlier, Visual Studio 2019 improves on Visual Studio 2017 in a few areas. It helps you get into your code more quickly by making it simpler to clone a Git repo or to open an existing project or folder. It also introduces improvements to the template selection screen to make it easier to start a new project. While you’re coding, you’ll notice that Visual Studio 2019 improves code navigation and adds many refactorings, as well as a document health indicator and one-click code clean-up to apply multiple refactoring rules. There are also improvements to the debugging experience, including data breakpoints for .NET Core apps that help you break only on value changes you’re looking for. It also includes get AI-assisted code completion with Visual Studio IntelliCode.

These capabilities work with both your existing project and new projects – from cross-platform C++ applications, to .NET mobile apps for Android and iOS written using Xamarin, to cloud-native applications using Azure services. The goal with Visual Studio 2019 is to support these projects from development, through testing, debugging, and even deployment, all while minimizing the need for you to switch between different applications, portals, and websites.

Check out the launch event

Be sure to tune in to the Visual Studio 2019 Launch Event today at launch.visualstudio.com, or watch it on-demand later, where we’ll go into a lot more depth on these features and many others. During the launch event, we’ll discuss and demo Visual Studio 2019. We’ll also share content on Visual Studio 2019 for Mac and Visual Studio Live Share, both of which are also releasing today. There are also almost 70 local launch events around the world you can join today and over 200 between now and end of June. Thank you for your enthusiasm about our best release yet.

To help kick-start your experience with Visual Studio 2019, we’ve partnered with Pluralsight and LinkedIn Learning to bring you new training content. Pluralsight has a new, free, Visual Studio 2019 course (available until April 22, 2019). A path and skill assessment are also available, so you can dive right in. On LinkedIn Learning you’ll find a new course (free until May 2nd) covering the highlights in Visual Studio 2019. Of course, you can always head over to VisualStudio.com and our docs to find out what’s new, or dig into the release notes for all the details.

Thank you for your ongoing feedback

We could not have made this happen without you. Ever since we released Preview 1 of Visual Studio 2019 in December, we’ve received an incredible amount of feedback from you, both on what you like and what you want to see improved. As always, you can continue to use the Report a Problem tool in Visual Studio or head over to the Visual Studio Developer Community to track your issue or suggest a feature. We’ve made many tweaks and improvements along the way to address your feedback, rest assured that we will continue doing so in minor releases going forward.

We want to sincerely thank you for taking the time to provide the feedback that we use to shape Visual Studio 2019 into the best developer environment for you. We can’t wait to see what you’ll create with Visual Studio 2019.

The post Visual Studio 2019: Code faster. Work smarter. Create the future. appeared first on The Visual Studio Blog.

Live Share now included with Visual Studio 2019

$
0
0

We’re excited to announce the general availability of Visual Studio Live Share, and that it is now included with Visual Studio 2019! In the year since Live Share began its public preview, we’ve been working to enhance the many ways you collaborate with your team. This release is the culmination of that work, and all the things we’ve learned from you along the way.

If you haven’t heard of Live Share, it’s a tool that enables real-time collaborative development with your teammates from the comfort of your own tools. You’re able to share your code, and collaboratively edit and debug, without needing to clone repos or set up environments. It’s easy to get started with Live Share.

Thanks for all your feedback!

We’ve been thrilled with all the great feedback and discussions we’ve had. Your input has helped guide Live Share’s development and enabled us to focus in on the areas of collaboration most important to you. Based on your feedback, we added features like read-only mode, support for additional languages like C++ and Python, and enabled guests to start debugging sessions.

/var/folders/78/t4msz04s0lg7jvy0w9lv_nwc0000gn/T/com.microsoft.Word/WebArchiveCopyPasteTempFiles/sidebyside1.png

Additionally, we’ve learned so much about how your teams collaborate, and how Live Share is applicable in a wide variety of use cases. Live Share can be used while pair programming, conducting code reviews, giving lectures and presenting to students and colleagues, or even mob programming during hackathons. Live Share complements the many diverse ways you work – whether it be together while co-located in the same office, remotely from home, or in different countries on opposite sides of the world.

3rd Party Extensions

Live Share is all about sharing the full context of your project. It’s not just the code in Visual Studio, but also the extensions you use. Along with this release, we’re excited to have partnered with a few 3rd party extensions to enhance the Live Share experience in Visual Studio.

OzCode enhances your C# debugging experience by offering a suite of visualizations, like datatips to see how items are passed through a LINQ query, and heads-up display to see how a set of boolean expressions evaluates. During a Live Share session, guests can now leverage time-travel debugging as well.

CodeStream enables you to create discussions about your codebase to help build knowledge with your teammates. One of the biggest feature requests we’ve received has been to include integrated chat, and with CodeStream, you get a companion chat experience within a Live Share session.

Collaborate Today

We’re continuing to build and improve Live Share! We have so much more collaboration goodness to share. We’ve received such great feedback and would love to continue to hear more from you. Feel free to let us know what you’d like to see next with Live Share by filing issues and feature requests or by responding to our feedback survey.

With Live Share installed by default in Visual Studio 2019, it’s easy to get started collaborating with your team. For more information about using Live Share, please check out our docs!

The post Live Share now included with Visual Studio 2019 appeared first on The Visual Studio Blog.


Visual Studio 2019 for Mac is now available

$
0
0

Today, we are excited to announce the general availability of Visual Studio 2019 for Mac – the next major version of our .NET IDE on the Mac. This release is now available as an update in the Stable channel for existing Visual Studio for Mac users, and new users can download and install it today as well. You also can learn more about the new capabilities in this version by reading our release notes.

Visual Studio 2019 for Mac focuses on improving the core of the IDE, setting a foundation for us to bring new capabilities to you more rapidly with future updates. In this blog post, we want to highlight some of the new capabilities included with this release which have been shaped greatly by your feedback. Thank you! In addition to general improvements to the IDE, we have also introduced several improvements for developers building mobile apps using Xamarin, games using Unity, and web applications and services using .NET Core. So, let’s get started!

A new C# editor

The code editor in Visual studio for Mac has been completely replaced with a new editor built on a shared core with Visual Studio on Windows, and with native macOS UI. Not only does this provide an enhanced experience with smooth editing and navigation, but the new editor also has all the powerful IntelliSense/code-completion and quick fix suggestions you expect from a Visual Studio editor. Furthermore, we have added support for bi-directional text, multi-caret, word wrapping and much more that you can read about in greater detail here.

We are busy adding a last few finishing touches to the editor and hence the preview editor is only available for use when you opt-in. To enable the new editor, navigate to the Visual Studio > Preferences… menu, Text Editor > General section and check the Open C# files in the New Editor checkbox. Stay tuned as we work towards enabling it for C# and XAML, with other languages coming shortly thereafter.

Visual Studio for Mac 2019 - editor

Start window

With Visual Studio 2019 for Mac, we’ve introduced a brand-new way of interacting with your projects and getting you where you need to go in the IDE. The Start Window allows you to quickly create new projects or conveniently search and navigate to a project you might have previously opened in the IDE.

start screen Visual Studio for Mac

Running multiple instances

Visual Studio 2019 for Mac allows you to easily launch multiple instances of the IDE from the macOS dock, enabling you to work on multiple solutions simultaneously, one per instance.

Multiple VS4Mac instances

Xamarin tools

Developers run though the “build, deploy, debug” cycle countless times in any given day. As we continue working to shorten the inner development loop, we’ve made big gains in trimming down the time you spend building and deploying for Android, so you can focus on creating amazing mobile apps. Say goodbye to all those build-time coffee breaks!

With the help of your feedback, we found that optimizing incremental builds and deployments is one great way to achieve a high-impact improvement. Testing with the SmartHotel360 app showed an almost 30% decrease in incremental build times, while deployment times are over twice as fast:

Step Visual Studio 2017 Visual Studio 2019 Delta
First build 01:04.20 00:50.13 -21.95%
Incremental Build (XAML Change) 00:10.62 00:07.47 -29.66%
Deploy (XAML Change) 00:09.03 00:04.44 -50.83%

 

A full report of build performance profiling, as well as methodology, can be viewed on the Xamarin.Android wiki.

Tools for Unity

We have ported the Unity debugger from Visual Studio on Windows to the Mac. Beyond making it possible for us to apply fixes across both products at the same time, this new debugger provides better compatibility with older versions of Unity and a better experience when debugging unsafe C# code.

ASP.NET Core and .NET Core tools

We have made many improvements to our .NET Core and web tools including better support for JavaScript colorization within Razor (.cshtml) files, auto-updating of Azure functions, the ability to easily set up multiple startup projects for debugging and, finally, updated Docker tools.

Performance, reliability and accessibility improvements

We have made a significant number of performance and reliability improvements in this release across the board. In particular, the C# code editor, Git support, Xamarin, and.NET Core debugging should all be significantly faster and more reliable with this release. This release also includes more than 200 accessibility related fixes that move us closer to our goal to be completely accessible on the Mac.

What’s next for Visual Studio 2019 for Mac

As we had previously called out in our roadmap, our near-term priority is to enable the new editor for C#, followed by other file extensions. Beyond that, we are bringing over the Xamarin Forms XAML language service from Visual Studio on Windows to the Mac, adding support for multi-targeting, solution level package management and file-nesting support for ASP.NET Core. Stay tuned for future Visual Studio 2019 for Mac updates!

We strive to be 100% driven by your feedback and we love to hear from you, so please do share your feedback and suggestions. Thank you for helping us shape Visual Studio for Mac. We look forward to you downloading and using this new release.

 

The post Visual Studio 2019 for Mac is now available appeared first on The Visual Studio Blog.

Introducing Time Travel Debugging for Visual Studio Enterprise 2019

$
0
0

The Time Travel Debugging (TTD) preview in Visual Studio Enterprise 2019 provides the ability to record a Web app running on a Azure Virtual Machine (VM) and then accurately reconstruct and replay the execution path. TTD integrates with our Snapshot Debugger offering and allows you to rewind and replay each line of code however many times you want, helping you isolate and identify problems that might only occur in production environments.

The most effective type of debugging often occurs in what we call the “inner loop”. While you’re in the act of reviewing and debugging code locally, before you’ve pushed to version control. The problems we encounter during inner loop development are usually easier to understand and diagnose because they are accessible and repeatable.

Today, we’re excited to announce the release of the Time Travel Debugging (TTD) in Visual Studio Enterprise. With TTD, we are giving you the power to record code executed in production and replay the execution path inside Visual Studio. TTD also gives you the ability to move forward and backwards in time as if you were performing “inner loop” debugging locally. You also get access to important debugging features like locals and the call stack.

Today’s debuggers typically allow you to stop at a specific breakpoint by halting the entire process and then only move forward. Even with a more advanced debugging tool like IntelliTrace, you record events and data at discrete moments in time. TTD has a significant advantage over snapshots, logging or crash dump files, as these methods are generally missing the exact details of the execution path that led up to the final failure or bug.

What is the Time Travel Debugging?

Time Travel Debugging (TTD) is a reverse debugging solution that allows you to record the execution of code in an app or process and replay it both forwards and backwards. TTD improves debugging since you can go back in time to better understand the conditions that lead up to a specific bug. Additionally, you can replay it multiple times to understand how best to fix the problem. TTD technology was recently introduced in a preview version of WinDbg for native code scenarios.

We have extended the Snapshot Debugger with TTD to allow you to record your applications as it executes. That recording can then be played back in Visual Studio 2019 Enterprise where you can rewind and replay each line of code as many times as you want. TTD records on the thread that matches the snappoint conditions and will generally run until the end of the method. If there is an “await” after the snappoint but before the end of the method, we will stop recording where the await occurs. This feature will be in preview for the release of Visual Studio 2019 with a go live license. We plan to add more TTD scenarios in future updates.

Getting started with TTD

The Time Travel Debugging preview can be enabled in the latest version of Visual Studio Enterprise 2019 for Azure Virtual Machines on the Windows OS running ASP.NET (4.8+).

After installing the latest version of Visual Studio Enterprise, complete the following steps:

1. Open the project you would like to Time Travel Debug – ensure that you have the same version of source code that is published to your Azure Virtual Machine.

2. Choose Debug > Attach Snapshot Debugger and select the Azure Virtual Machine your project is deployed to along with an Azure storage account. You will be required to install the Snapshot Debugger site extension the first time an attach is attempted.

3. Select the Time Travel Debugging option and then click Attach. Once Visual Studio is in Snapshot Debugger mode it will be capable of recording using TTD.

4. Create a snappoint and configure it to enable time travel debugging. Click Start\Update Collection.

5. Once your Snapshot has been collected click on View Snapshot and you can use the command bar to step forwards and backwards within the recorded method.

TTD preview limitations

During the initial preview stage of TTD we will be supporting AMD64 Web apps running on a Azure Virtual Machine (VM). We expect that recording will add significant overhead to your running process, slowing it down based on process size and the number of active threads. We also anticipate a degraded debugging experiences in some of the following scenarios: –

  • During a GC compacting phase.
  • Stepping through an optimized method e.g. when you step into a method that does not contain a snappoint.
  • If your application internally loads or unloads app domains.
  • Recording only occurs on the thread that was triggered by the snappoint, code that subsequently impacts alternate threads will also be degraded.

Please Note: we will also not record the async causality chains.

During preview testing we found that the TTD file sizes ranged from several hundred megabytes up to several gigabytes depending on how long your session lasts and how long the web app runs. However, files created by TTD will be cleaned up once the Snapshot Debugger session ends, and an app pool recycle is initiated. For our preview release we also recommend using a VM with a minimum of 8GB RAM.

Try out TTD now!

We are incredibly excited about how this preview feature can help enhance your debugging experiences in Azure, but this is just the beginning. Our team continues to design and build additional TTD capabilities that we plan to add in upcoming Visual Studio releases.

We are counting on your feedback via our Developer Community and the Feedback Hub, you can help us prioritize what improvements to make because we genuinely value all the responses you provide.

The post Introducing Time Travel Debugging for Visual Studio Enterprise 2019 appeared first on The Visual Studio Blog.

Little great things about Visual Studio 2019

$
0
0

A few days ago, we announced the general availability of Visual Studio 2019. But I’ve been using Visual Studio 2019 exclusively since the first internal build – long before the release of Preview 1 in December of 2018. During this time, there has been a lot of little features that have put a smile on my face and made me more productive.

I want to share a few of them with you since they are not all obvious and some require you to change some settings. Let’s dive in.

Clean solution load

When a solution is closed, its state is saved so that next time you open it, Visual Studio can restore the collapsed/expanded state of projects and folders in Solution Explorer and reopen the documents that were left open. That’s great but I prefer a clean slate when I open solutions – no files open and all the tree nodes collapsed in Solution Explorer.

I wrote the Clean Solution extension to provide this behavior in previous version of Visual Studio. This feature is now native to Visual Studio 2019 and can be enabled with two separate checkboxes. Go to search (Ctrl+Q) and type in “load” to find the Projects and Solutions > General options page.

Uncheck both the Reopen documents on solution load and Restore Solution Explorer project hierarchy on solution load checkboxes.

An added benefit from unchecking these two checkboxes is that solutions will load faster too, because of the eliminated overhead from restoring state. Win-win.

Git pull from shortcut

I do a lot of work with GitHub repos and I often take pull requests from people. That means I must make sure to do a git pull before I make any subsequent commits. But, as it turns out repeatedly, this is something I tend to forget. The result is that I end up with merge conflicts and other nuisances.

The only way to do git pull in the past was to either use Team Explorer, the command line, or an external tool. What I really wanted was a keyboard shortcut from within Visual Studio that did it for me.

Previously, Team Explorer’s pull command was not a command you could assign keyboard shortcuts to but now it is. Go to search (Ctrl+Q) and type “keyboard” to find the Environment > Keyboard options page. From there, find the Team.Git.Pull command from the list. Then assign any shortcut to it and hit the OK button. I chose to use Ctrl+Shift+P.

To automatically perform a git pull upon solution load, try out the free Git Pull extension.

Code Cleanup for C#

Keeping source code neatly formatted and ensuring coding styles are consistent is something I’ve never been good at. The new Code Cleanup feature is a huge help in keeping my code neat and tidy since I have configured it to run all the fixers by default.

To do that, go to the Code Cleanup menu sitting in the bottom margin of the editor window and click Configure Code Cleanup.

In the dialog, select all the fixers one by one from the bottom pane and hit the up-arrow button to move them up into the top. Then hit OK.

Now all fixers will run every time you perform a Code Cleanup. Simply hit Ctrl+K, Ctrl+E to execute. The result is a nicely formatted document with a bunch of coding style rules applied, such as added missing braces and modifiers. Voila!

IntelliCode

IntelliCode is a new feature that augments the IntelliSense completions based on the context you’re in using advanced machine learning algorithms. That proves useful for many scenarios including when you are exploring new interfaces or APIs. I write a lot of Visual Studio extensions and the API surface is so big that there are parts of it I have never used. When I’m exploring a new part of the Visual Studio API, I find it very helpful to have IntelliCode guide me through how to use it.

To enable this powerful feature, you can download IntelliCode from the Visual Studio Marketplace and install the extension.

IntelliCode works for C#, C++ and XAML.

See content of Clipboard Ring

Every time you copy (Ctrl+C) something in Visual Studio, it is being stored in the Clipboard Ring. Hitting Ctrl+Shift+V allows you to cycle through the items in the Clipboard ring and paste the item you select. I find it very useful to keep multiple things in the clipboard at once and then paste the various items to specific locations.

In Visual Studio 2019, the Clipboard Ring now shows a visual preview of its content when hitting Ctrl+Shift+V. That makes it easier than ever to navigate through the copy history and select the right item to paste.

New C# Refactorings

There are lots of new and highly useful refactorings in C# that I’ve come to depend on every single day. They show up as suggestions in the light bulb and include moving members to interface or base class, adjusting namespaces to match folder structure, convert foreach-loops to Linq queries, and a lot more.

To learn more about the new refactorings and other C# features in Visual Studio 2019, check out this post on the .NET blog.

Git Stash

Having the ability to stash away some work for future use is super helpful. Git Stash is what gives me that ability without having to create a new branch. If you’re familiar with TFS, you can think of Git Stash as a shelveset.

The best part is that I can manage all my stashes inside the Team Explorer window. They are easy to create and apply, and I’ve been using them a lot more after Visual Studio now natively supports them.

Try Visual Studio 2019

These were just a few of the many small improvements found throughout Visual Studio 2019 that I find particularly useful. Please share any tips or improvements you’ve found helpful in the comments below!

The post Little great things about Visual Studio 2019 appeared first on The Visual Studio Blog.

New features for extension authors in Visual Studio 2019 version 16.1

$
0
0

Earlier this week, we released Visual Studio 2019 version 16.1 Preview 1 (see release notes). It’s the first preview of the first update to Visual Studio 2019. If you’re not already set up to get preview releases, then please do that now. The preview channel installs side-by-side with the release channel and they don’t interfere with each other. I highly recommend all extension authors install the preview.

Got the 16.1 preview installed now then? That’s great. Here are some features in it you might find interesting.

Shared Project support

There are several reasons why extension authors sometimes must split an extension into multiple projects to support the various versions of Visual Studio. If you’re using an API that did not exist for an earlier version of Visual Studio or if there are breaking changes between the versions you want to support, now there’s a simple easier to split your extension.

With Visual Studio 2019 version 16.1 Preview 1, we’ve added support for referencing Shared Projects from VSIX projects in the same solution.

You can place common code in a separate Shared Project that compiles directly into the VSIX projects at build time. The only code that then exists in the VSIX projects themselves, is code that is specific to the Visual Studio version it supports. The result is two separate VSIXs that target their own specific Visual Studio version range and share most of the code from the Shared Project. Checkout the code for the Extension Manager extension that does exactly this.

No more need for .resx file

When adding commands, menus etc. using a VSCT file, you must specify a .resx file marked with the MergeWithCTO MSBuild property. The templates in Visual Studio takes care of adding that file and it also adds a .ico file referenced by the .resx file. However, the need for a .resx is an implementation detail and most extensions don’t need to use it.

In an effort to make VSIX project simpler, the requirement for the .resx/.ico files have been removed when using the latest Microsoft.VSSDK.BuildTools NuGet package version 16.0 or newer.

Behind the scenes, the NuGet package provides an empty .resx to compile with the MergeWithCTO property unless you registered your own in the project.

Per-monitor awareness

Additional per-monitor awareness support is being enabled in 16.1 with .NET Framework 4.8 installed. Windows Forms UI now better handle DPI scaling across monitors. However, this may cause UI issues in your extension after installing .NET Framework 4.8.

When using Windows Forms in an extension, you can match the Visual Studio 2017 scaling behaviors by wrapping your form or control creation in a DpiAwareness.EnterDpiScope call.

using (DpiAwareness.EnterDpiScope(DpiAwarenessContext.SystemAware))
using (var form = new MyForm())
{
    form.ShowDialog();
}

All you need is to add a reference to the Microsoft.VisualStudio.DpiAwareness NuGet package. Use this package in extensions targeting earlier versions of Visual Studio too but be aware that it will only take effect when running in 16.1 and newer. So, it is safe to use in extensions spanning multiple versions of Visual Studio.

To make it easier to simulate multiple monitors running with different DPI scaling, an engineer from the Visual Studio IDE team built a handy little tool and put it on GitHub. The team used this tool while they were adding support for per-monitor awareness, so you may find it helpful too.

Read more about how to deal with per-monitor awareness for extenders.

Synchronous auto-load disabled

18 months ago, we sent an email to extension partners announcing the deprecation of synchronous auto-loading of extension packages. A year ago, we followed up with a blog post with more details that outlined that synchronously auto-loaded package would be unsupported in a future version of Visual Studio. That version is 16.1.

There are great samples on how to migrate to AsyncPackage with background load enabled, and most extensions today have already made the transition. If you haven’t already, now is a good time to do that before 16.1 goes out of preview.

New SDK meta package

The meta package Microsoft.VisualStudio.SDK is a single NuGet package that references all the various Visual Studio packages that make up the SDK. The cool thing about the meta package is that you have access to all the interfaces and services. In addition, you also avoid issues with mismatched package versions.

When we released Visual Studio 2019 (16.0), the VSIX Project template referenced the 15.9 version of the SDK meta package. That was because the 16.0 version was still under development. All the individual packages had to be published to NuGet before we could take dependency on them from the meta package.

The good news is that now we finally have the 16.0 version ready. You should use it if the lowest version of Visual Studio if your extension supports 16.0. and you can read more about extension versioning here.

The post New features for extension authors in Visual Studio 2019 version 16.1 appeared first on The Visual Studio Blog.

Build Visual Studio templates with tags, for efficient user search and grouping

$
0
0

Visual Studio’s project templates enable you, the developer, to create multiple similar projects more efficiently by defining a common set of starter files. The project templates can be fully customized to meet the needs of a development team, or a group, and can be published to the Visual Studio Marketplace for others to download and use too! Once published, developers can install and access the template through Visual Studio’s New Project Dialog.

The newly designed New Project Dialog for Visual Studio 2019 was built to help developers get to their code faster. Using a search and filter focused experience, we are aiming to provide better discoverability for specific templates to start your application development. 

 

In this walkthrough, you will learn to 

  • Create a project template 
  • Add tagor filters to the project template 
  • Deploy the template as an extension using the VSIX project template 

Before getting started, please make sure you have installed Visual Studio 2019 with Visual Studio SDK. 

 

Creating a project template 

There are a few ways you can create a project template, but in this walkthrough, we will create a C# project template using the New Project Dialog. 

  1. In Visual Studio, launch the New Project Dialog File New > Project
    (or use the keyboard shortcutCTRL + SHIFT + N).
  2. Filter the list by Project type Extensions and select C# Project Template.
  3. Click Next then modify the Project name field and click Create.

 

Adding tags / filters to your project template 

Once you’ve created a project template, you can add tags or filters to it in the template’s .vstemplate XML file. 

  1. Add Visual Studio’s built-in tags as well as any custom tags to your project template using <LanguageTag>, <PlatformTag>, <ProjectTypeTag> elements under <TemplateData> and save the file. For example, as highlighted below:
  2. Save and close the vstemplate the XML file. 

 

Deploying the template as an extension using the VSIX project template 

Wrap your project template in a VSIX project template to deploy your template as an extension. 

  1. Create an Empty VSIX Project in the Solution created for the C# project template above.
    1. In the Solution Explorer, right click on the Solution and select Add > New Project.
    2. Type “vsix” in the search box and select Empty VSIX Project for C# (or VSIX Project if you are using earlier versions of Visual Studio).
    3. Click Next then modify the Project name field and click Create.
  2. Set the VSIX Project as a startup project.
    In the Solution Explorer, right click on the VSIX project and select Set as StartUp Project. Your Solution Explorer should now look something like this (with your VSIX project bolded):

  3. Add your project template as an asset to the VSIX project.
    1. Click on the Assets tab and select the New button.
    2. Set the Type field as Microsoft.VisualStudio.ProjectTemplate.
    3. Set the Source field as A project in current solution.
    4. Set the Project field as your project template.
    5. Click OK, then save and close the source.extension.vsixmanifest file.

  4. Run your code without invoking the debugger (CTRL + F5) 

That’s it! Your new project template will appear in the New Project dialog with the tags under your template’s description and filters enabled by those tags. You can also take it a step further and easily publish your project template to the Visual Studio Marketplace (and while you’re at it, also try out the little great things about Visual Studio 2019 and please let us know what you think)! Here is an example of one in an existing extensionTextmate Grammar Template. 

Have suggestions? 

We are continuing to work on our tools and to do that, we could use your help! Please share your feedback/comments below, or through the Visual Studio Developer Community, or tweet at our team @VisualStudio. 

The post Build Visual Studio templates with tags, for efficient user search and grouping appeared first on The Visual Studio Blog.

Visual Studio 2019 version 16.1 Preview 2

$
0
0

The second preview of Visual Studio 2019 version 16.1 is now available. You can download it from VisualStudio.com, or, if you already have installed Preview, just click the notification bell inside Visual Studio to update. This latest preview contains additional performance and reliability fixes as well as enhancements for debugging, NuGet, extensibility, and C++ development. We’ve highlighted some notable features below. You can see a list of all the changes in the Preview release notes.

Improvements for C++ developers

CMake integration

In-editor helpers: We’ve added in-editor documentation for CMake commands, variables, and properties. You can now leverage IntelliSense autocompletion and quick info tooltips when editing a CMakeLists.txt file, which will save you time spent outside of the IDE referencing documentation and make the process less error-prone. See the C++ Team blog post on in-editor documentation for CMake in Visual Studio for more information.

In addition, Preview 2 adds lightbulbs for missing #includes that can be installed by vcpkg, and provides package autocompletion for the CMake find_package directive.

CMake Lightbulb hints for missing #Includes

CMake Find Package Autocompletion

Clang/LLVM support: CMake integration now supports the Clang/LLVM toolchain for projects targeting Windows and/or Linux, so you can build, edit, and debug CMake projects that use Clang, MSVC, or GCC. The CMake version that ships with Visual Studio has been upgraded to 3.14 as well. This version adds built-in support for MSBuild generators targeting Visual Studio 2019 projects as well as file-based IDE integration APIs.

To learn more about these and other CMake improvements, see the C++ Team blog post Visual Studio 2019 version 16.1 Preview 2 CMake improvements.

C++ productivity improvements

C++ Template IntelliSense: The Template Bar dropdown menu is populated based on the instantiations of that template in your codebase. More details on this feature can be found in the post “C++ Template IntelliSense: Auto-populate instantiations in template bar” on the C++ Team blog.

C++ Template IntelliSense

Progress on C++20 conformance

Conformance improvements: New C++20 preview features have been added to the compiler and are available under /std:c++latest. Per P0846R0, the compiler has increased ability to find function templates via argument-dependent lookup for function call expressions with explicit template arguments. Also supported is designated initialization (P0329R4), which allows specific members to be selected in aggregate initialization, e.g. using the Type t { .member = expr } syntax.

We have also added new C++20 features to our implementation of the C++ Standard Library, including starts_with() and ends_with() for basic_string/basic_string_view, and contains() for associative containers. For more information, see the Preview 2 release notes.

Improved NuGet package debugging

Last year, we announced improved package debugging support with NuGet.org Symbol Server. Starting with Visual Studio version 16.1 Preview 2, debugging NuGet packages just became a whole lot simpler now that you can enable NuGet.org Symbol Server from the Debugging\Symbols option.

NuGet Symbol Server

Source Link Improvements

Source Link now supports Windows authentication scenarios. Ultimately, using Windows authentication will allow you to use Source Link for on-premises Azure DevOps Servers (formerly, Team Foundation Server).

Visual Studio Search

Based on user feedback, Visual Studio Search will now display the three most recently used actions on focus. This makes it even easier to find previously searched-for items.

Visual Studio Search Most Recently Used List

Solution view selector

The button for switching the Solution Explorer view will now consistently show you a dropdown menu of all possible views. Per your feedback, this solution removes the confusion of having the button default to toggling between Folder View and Solution View and not being clear on which solution it would open.

Solution View Selector

We have also improved the loading time for very large solutions, where the amount of improvement varies based on the size of the solution.

Extensibility

A number of updates to Visual Studio extensibility are included in this release, including Shared Project support and per-monitor awareness for dialogs. We’ve also eliminated the need for a .resx file and disabled synchronous auto-load. Additionally, the Visual Studio 2019 version of Microsoft.VisualStudio.SDK is now available as a NuGet package. Read all about these changes in the New features for extension authors in Visual Studio 2019 version 16.1 blog post.

Another notable extensibility update in this Preview is that project templates now support custom tags which allow them to show up in the New Project Dialog. See how to add tags in the blog post Build Visual Studio templates with tags, for efficient user search and grouping.

App Installer Templates

Over the last few releases, Visual Studio has improved the sideload packaging distribution experience for developers by introducing the App Installer file which specifies where an application is located and how it should be updated. Users who choose this method of application distribution simply share the App Installer file with their users rather than the actual app container.

The options available for use in the App Installer file are different based upon the Windows version the user is targeting. To enable maximum flexibility, Visual Studio 2019 version 16.1 allows users to define and configure the App Installer Update settings from a template Package.appinstaller.

Activate this template by right-clicking the project and selecting Add > New Item > App Installer Template.

App Installer Templates

The Package.appinstaller template file is available to edit and customize the update settings you want to use.

App Installer Template Settings

Note that once the template is added to the project, the user will no longer be able to customize update settings in the packaging wizard. All customizations must thus be edited in the template.

Use the latest features; give us feedback

To try out this preview of the latest features, either download Visual Studio 2019 version 16.1 Preview 2, update your existing preview channel installation by using the notification bell inside Visual Studio, or click Update from within the Visual Studio Installer.

We continue to value your feedback. As always, let us know of any issues you run into by using the Report a Problem tool in Visual Studio. You can also head over to the Visual Studio Developer Community to track your issues, suggest a feature, ask questions, and find answers from others. We use your feedback to continue to improve Visual Studio 2019, so thank you again on behalf of our entire team.

The post Visual Studio 2019 version 16.1 Preview 2 appeared first on The Visual Studio Blog.

Redesigning the New Project Dialog

$
0
0

Last week, we released Visual Studio 2019 version 16.1 Preview 2. If you have the latest update – awesome and thank you. If not, you can download it from the link above. Or, if you already have the Preview, just click the notification bell inside Visual Studio to update. This post discusses one of the most visible interface changes we’ve made in Visual Studio 2019 – the New Project Dialog.

Motivation

In Visual Studio 2019, one of our main objectives was to help you (both new and experienced developers) get to your code faster. You can read more about this journey in the blog post that discussed the new start window. One of the most common ways to start coding in Visual Studio is to create a new project.

The dialog hadn’t changed much since 2010, and the interaction model between folders and items has been in place since Visual Studio .NET back in 2002. We hadn’t put much time into the New Project Dialog because we believed it largely served its purpose. Until recently, we didn’t have the telemetry in place to be able to analyze how this dialog was used. Our initial hypothesis was that most of you interacted with the dialog rarely. And instead you spend much more time modifying projects you had previously created. After a bit of user research and analysis, we found that the latter holds true. But we were quite mistaken about the former. Many of you use the dialog to create new projects to try out new things or add on functionality to existing solutions a lot more often than we thought.

User research

We then dove deeper into the data, particularly looking at the usage patterns from new users of Visual Studio. We found that there was a surprisingly large drop-off in usage after launching Visual Studio to opening a project to start coding. That led us to the hypothesis that the New Project Dialog might be somehow inhibiting success with the tool. So, we expanded our user research and gathered that this dialog was presenting you with too many concepts, choices, and decisions. The process of getting started with your code wasn’t straightforward enough. The hierarchy of the nodes wasn’t consistent. When you installed several workloads you would see too many languages and technologies presented at the top level. Further down into the second and third level of nodes, the taxonomy became quite unmanageable with differences in naming conventions of categories.

When we asked participants in our usability studies to search for code scaffolding to get started with certain types of projects. We saw them click around through the top level nodes, and not click through the hierarchy. Sometimes they completely ignored the structure on the left and focused just on the default list of templates in front of them. What surprised us was that even for experienced developers, some of the options weren’t intuitive. Most couldn’t pinpoint the link to ‘Open Visual Studio Installer’ when the templates they were looking for weren’t available. They glazed over the search box without interacting with it. They seemed to completely ignore the recent templates list. And when they finally selected a template, they lacked confidence in their choice.

In addition, we learned that most of you think about your app type first but there are some who think about languages first when finding templates to start coding. It became clear that this mixed structure wasn’t intuitive for either use case. The barrier to the first actions within Visual Studio was too high. And this was a problem that small UI tweaks weren’t going to solve.

Design principles

During the design and development of Visual Studio 2019, we looked at usage across different areas of the project creation process and honed down on a core design goal –

“Get to code quickly with the minimum necessary scaffolding and help developers configure their application with the right settings”

Remove unnecessary choices

There were several options in the dialog box that we sought to remove as a way of simplifying the set of decisions you had to make. We first cleared out the rarely used toggles to sort templates and change icon size. The checkbox to create a git repository provided little value when creating a project. Our research told us that the right step for git init was either before project creation when you create the local folder or after project creation when you know you want to move ahead with the project. You can now do this in one click through the ‘Add to Source Control’ button in the bottom right of the status bar.

The last option to go was the ability to view and download online extension templates through the dialog. You can also do this through the Manage Extensions dialog in the Extensions menu. So, we eliminated the duplicate behavior to reduce cognitive load while looking for templates. After all that, our design looked something like this:

Search-first

But through design studies we found that this still wouldn’t lead to success. The node structure was still too convoluted to be understandable in early usage. We initially wanted to flatten the tree so that there was less digging and clicking to do. But we soon realized that with the overabundance of supported project types, it was an exercise in futility coming up with a single taxonomy that supported every single template. So, we decided to fundamentally shift the way users could discover templates. The search box had low usage in the old dialog box because its position made it a secondary function. But search is a prominent discoverability mechanism across the industry. So, we wanted to improve the way Visual Studio utilized search to help find what you need.

Our early studies saw participants gravitating towards the search box when we changed its position. But there was still a slight hesitation before typing something in – “what do I search for?”. This led to the realization that search cannot be a catch all, and there needs to be a little more guidance. We took the values we knew from the old dialog’s node structure and saw that they roughly fell into three categories – ‘languages’, ‘platforms’, and the more vague ‘project types’. So we introduced filters and tags as secondary mechanisms to support search. Browsing through the tags in the template list will help you discover the different capabilities of Visual Studio based on the tool-sets installed in your instance. Setting filters will allow you to narrow down the list to your preferred choices when starting with a new project.

One decision at a time

We also broke up the process into two separate screens. There is a single decision point on the first screen – select a template. And all the interface elements direct you to make that choice. The second screen is all about providing details about the project type you’ve selected. You can modify the values here or move through the project configuration screen without changing anything since all the recommended defaults are set for you. Some of the more complex project templates then open a third screen which has custom options specific to that project type.

Looking at the template list itself, we made a point to sort this list by our most recommended project templates for the workloads you have installed. So, the template that you should select if you aren’t exactly sure what to do would be the one placed higher in the list. We found that most of you don’t use more than 10 different types of templates, so we’ve made the recent templates list even more prominent than it was in Visual Studio 2017, so that you can get to your most common templates without having to search for them.

Looking forward

This is the first iteration of a new design paradigm we’re trying to adopt for Visual Studio. We’ve been measuring adoption and engagement since the launch of Visual Studio 2019 earlier this month and we’re happy to see a significant increase in success rate through the get to code journey. But at the same time, we acknowledge that the evolution of the experience isn’t over just yet. We’re continuing to listen to your feedback and learning from you to ensure success. We’re on the path to make improvements to search and filtering as they are now the key functionality to finding the right templates. In addition, we recently built in the ability to add tags to your own custom templates. If you’re a template author, find out more on how to update your templates in this blog post. We released this functionality as the result of your direct feedback, and we thank you for it. But we are looking to do better and could use more of your help. Please continue to share your feedback through the Visual Studio Developer Community.

The post Redesigning the New Project Dialog appeared first on The Visual Studio Blog.


Java on Visual Studio Code April Update

$
0
0

Welcome to April update! Java 12 is now officially supported with Visual Studio Code. We’d also like to show you some new and helpful code actions now available, along with new features from Debugger, Maven and CheckStyle.

Try these new features by installing Java Extension Pack with Visual Studio Code. See below for more details!

Java 12 Support

Java is now updating with a faster pace and we’re following closely. Thanks to the upstream update from JDT, you can build your project with Java 12 features now with VS Code as well. To use the experimental language features such as the new switch statement, add the following settings to pom.xml:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
            <configuration>
                <source>12</source>
                <compilerArgs>--enable-preview</compilerArgs>
            </configuration>
        </plugin>
    </plugins>
</build>

Easier Getting Started

Although Java has been there for a long time, it still attracts new developers, and we’d like to make sure it’s easy enough for anyone to start programming Java with VS Code. One of the improvement we made recently is to provide you more detailed information to fix your environment setting.

What if you don’t yet have JDK installed? No problem. When the Java extension pack is loaded, we will automatically detect whether a JDK is present. If not, we will provide you links to download reliable JDK at your choice.

Better yet, we’re also working on a customized VS Code distribution which will help get you ready with everything needed for Java development with a single installer. To learn more, please sign up at the end of this post to receive latest news and updates for Java on VS Code.

Performance Improvements

We’ve been benchmarking and profiling the performance of VS Code for Java, on all platforms and major scenarios including loading and editing. There were several enhancement to improve performance in recent releases.

  • Improved editing performance when dealing with large amount of source file opened in the editor
  • Optimize start up and load time with better server initilization and lazy downloading Java source

As we try our best improving performance, it would still take some time when importing a big Java project to Visual Studio Code. In this case, it would be helpful to show more progress details and let you know what’s actually happening behind the scene. Instead of just showing the percentage of progress, we now added detailed step information into the status, such as inspecting location, configuring project, updating Maven dependencies, refreshing workspace and build workspace to let you know the wait is meaningful.

More Code Actions

Code actions are key to your productivity, so we keep bringing more of them to Visual Studio Code.

Resolve ambiguous imports

To deal with ambiguous imports, you now have a dropdown list to pick the right one. The code line with the unresolved type is also presented to you to help you decide.

Generate hashCode() and equals()

Now hashCode() & equals() can be generated with default implementations. All the non-static member variables are listed, and you can customize the generated code using the check list.

There are two options for you to customize the generated code:

  • If you use Java 7+, you can set java.codeGeneration.hashCodeEquals.useJava7Objects to true to generate shorter code which calls Objects.hash and Objects.equals.
  • You can also set java.codeGeneration.hashCodeEquals.useInstanceof to check the object type instead of calling Object.getClass().

Generate toString()

Picking which fields to be included in the toString() method and configure its template are all supported with the Generate toString() code action.

Extract to local variable

To create a new variable (correctly typed) from the return value of an expression, the new quick fix extract to local variable provides a quick fix bulb which appears when the cursor stops at the bracket (). The keyboard shortcut is ctrl + .

Override/Implement methods

With this new source action, all the cadidates are presented to you with a checklist. Then you can decide what to override or implement.

Add static import

You can now convert static functions calls to static imports.

Folding Range

Now you can expand or collapse sections of code to make your Java file easy to read. We’ve enabled a couple popular ways for you to specify which code elements should be considered as a region to fold.

Debugger Updates

Debugger is one of the most used extension in the Java extension family, and we’re excited to show you the improvements below

Display Logical Structure of Collections

The debugger is now showing the logical structure of lists and maps, instead of the physical layout of the collections. If you prefer the physical layout view, you can go back by setting java.debug.settings.showLogicalStructure to false.

Hightlight Exceptions in Editor

Exceptions are now highlighted with extra info in the editor window. Before that, you need to hover on the exception to see details. Now the most important info is presented to you right at where it occurs.

Go to Definition by Clicking Stack Trace in Debug Console

When there an exception, you can now click on the stack trace to see the definition of the function calls.

Other notable featutes include

  • Auto-completion in debug console for types without source code
  • Auto shorten the command line when file name or extension is too long.

Maven Updates

And a couple new features for Maven as well.

Debug Maven Plug-in Goal

Now you can easily configure your breakpoint and start debug any Maven goals with just a couple clicks.

Customize maven commands

Now you are able to specify your favorite commands in settings for future execution.

Show Dependency Tree

We also support showing dependencies in a tree view which allows you to inspect all dependencies in your project at a single place and check for potential issues.

One more thing. There’s one more shortcut to add dependencies. When editing a POM file, there is a shortcut command to search and add a dependency. Try Command Palette -> Maven: Add a dependency.

Sign up

If you’d like to follow the latest of Java on VS Code, please provide your email with us using the form below. We will send out updates and tips every couple weeks and invite you to test our unreleased feature and provide feedback early on.

Try it out

Please don’t hesitate to give it a try! Your feedback and suggestions are very important to us and will help shape our product in future. You may take this survey to share your thoughts!

Visual Studio Code is a fast and lightweight code editor with great Java support from many extensions

The post Java on Visual Studio Code April Update appeared first on The Visual Studio Blog.

Build Visual Studio extensions using Visual Studio extensions

$
0
0

What if the community of extension authors banded together to add powerful features to Visual Studio that made it easier to create extensions? What if those features could be delivered in individually released extensions, but joined by a single installation experience that allows the user to choose which of the features to install? That’s the idea behind Extensibility Essentials – an extension pack that ships community-recommended extensions for extension authors.

Extension authors are usually interested in improving their own tooling in Visual Studio – either by installing extensions created by others or by building some themselves. By banding together, we can create the best and most comprehensive tooling experience for extension authoring. So, let’s test that theory by creating a range of extensions published to the Marketplace under our own accounts, and reference them in Extensibility Essentials to provide a unified and simple installation experience.

The individual extensions can and probably should be single purpose in nature. This prevents feature-creep where additional features are added that may or may not be useful for extension authors. If additional features are not closely related to the extension, then simply create a new extension for them. That way it is up to the individual extension author to decide if they wish to install it. It is also crucial that the extensions follow all the best practices.

Once the individual extension is stable, it can be added to Extensibility Essentials.

The extension pack Extensibility Essentials doesn’t do anything by itself. It is a barebone extension pack that just references the individual extensions. When installing the extension pack, the user can choose which of the referenced extensions to install. At the time of this writing, there are 9 individual extensions.

How the individual extensions are listed before installing

Ideas for new extensions can be centralized to the GitHub issue tracker. By collecting ideas in a central location, it provides a single location to comment on and potentially design features ahead of implementation.

The issue tracker is for both bugs and suggested features

It would be cool if…

So next time you’re sitting in Visual Studio working on an extension, think about what feature you’d like that would make you more productive. If you can’t think of a feature, but feel there is a scenario that is particularly problematic, then open a bug on the GitHub issue tracker and let other people try to figure out how an extension could perhaps solve the issue.

Thinking “it would be cool if…” is the first step to make it possible and with the Extensibility Essentials, it might be closer to becoming reality than imagined.

Does this idea resonate with you? Let me know in the comments.

Mads Kristensen, Senior Program Manager
@mkristensen

Mads Kristensen is a senior program manager on the Visual Studio Extensibility team. He is passionate about extension authoring, and over the years, he’s written some of the most popular ones with millions of downloads.

Q# – a Wish List for the New Year

$
0
0

In previous blog posts you have read about some of the ideas behind Q#, how it came into existence, and its development over the past year. You have read about quantum computing, quantum algorithms and what you can do with Q# today. With the end of the year approaching, there is only one more thing to cover: What is next?

This blog post is about our aspirations for the future and how you can help to accomplish them. It contains some of our visions going forward, and we would love to hear your thoughts in the comment section below.

Community

One of the most exciting things about Q# for us is the growing community around it. Being rooted in the principles of quantum mechanics, quantum computing tends to have this air of unapproachability to the “uninitiated”. However, quantum computing builds on the notion of an idealized quantum system that behaves according to a handful of fairly easy to learn principles. With a little bit of acquired background in linear algebra, some persistence, and patience when wrapping your head around how measurements work it is possible to get knee-deep into quantum algorithms reasonably quickly!

Of course, a couple of good blog posts on some of these principles can help. We strive to actively support you in the adventure of exploring quantum algorithms by providing materials that help you get started, like our growing set of quantum katas. Our arsenal of open source libraries provides a large variety of building blocks to use in your quest of harnessing the power of quantum. One of the main benefits of open source projects is being able to share your work with all the people brave enough to explore the possibilities that quantum has to offer. Share your progress and help others build on your achievements! Whether in kata or library form, we welcome contributions of any size to our repositories. Let us know how we can help to make contributing easier.

Exchange among developers is one of the most important aspects of software development. It is omnipresent and vital to building a sustainable environment around a particular toolchain and topic. Thankfully, modern technology has made that exchange a lot easier than when the first computer programmers started their careers. We intend to make full use of the power of the internet and give a voice and a platform for discussions on topics related to Q# and quantum computing to developers around the world. The Q# dev blog is part of this effort. Contact us or comment below if you have an idea for a blog post or would like to hear more about a specific topic related to Q#. Establishing good feedback channels is always a challenging endeavor and in particular for a small team like ours. We would like this place to become a source of knowledge and exchange, a place where you can find the latest news and voice your take on them.

Growth

This brings us back to our plans for Q#. We have built Q# to make quantum development easier and more accessible. Of course, there were also a couple of other considerations that have played into that decision. For instance, we are anticipating the need to automate what is largely done in manual labor today, e.g. qubit layout and gate synthesis that are often still done on a case-by-case basis for each program and targeted hardware. When is the last time you worried about how error correction works on the hardware your code gets executed on? With qubits being an extremely scarce resource, and the long-term ambition to use quantum computing to address the most computationally intensive tasks that cannot be tackled with current hardware, the optimization of large-scale quantum programs needs to be a priority. We chose to develop our own language in order to have full control and flexibility over what information is represented how, and when it is used during compilation in order to be able to support a modular and scalable software architecture for executing quantum programs. But that’s a tale for another time. What is important is that these considerations are key factors in how we design and develop the language going forward.

A programming language is more than just a convenient set of tools for expressing an algorithm. It shapes the way that we think and reason about a problem, how we structure it and break it down into tasks when building a solution. A programming language can have a tremendous impact on our understanding of existing approaches, as well as how to adapt and combine them for our purposes. Particularly so when venturing into new territory.

Our goal is therefore to build a shared understanding of what it is we strive to accomplish, and to evolve Q# into the powerful language needed to drive progress in quantum programming. Our goal is to leverage the expertise of a community of language designers, compiler veterans, quantum physicists, algorithms and hardware experts, and a variety of software developers to shape a new kind of computing architecture. And we want you to be part of it.

Transparency

Since our 0.3 release at the beginning of November we have been eagerly working on not just the next release, but on defining and preparing the next steps in 2019. While we are in the middle of formulating our plans for the future, I want to give you a brief insight into some of our considerations.

As I am sure you have noticed, the support for data structures in Q# is minimal. While we do provide quite a few high-level language features for abstracting classical and quantum control flow, we intentionally omit some of the more object-oriented mechanisms such as classes. We anticipate remaining heavily focused on transformations that modify the quantum state, expressed as operations in Q#, as well as their characteristics and relations in the future. However, basic bundling of data and manipulations of such is of course an important aspect of many programs and we want to provide suitable mechanisms to express these in a way that allows to make abstractions, is convenient, and is resistant to coding errors. User defined types in the current setting have limited power besides an increased type safety. The “black box approach” to type parameterization currently restricts their usefulness; we do not provide a mechanism for dynamic reflection and it is not possible to apply operators or other type specific functionalities to argument items whose type is resolved for each call individually. In that sense, these items are “black boxes” that can merely be passed around. We want to do as much of the heavy lifting as possible statically in particular since debuggability of quantum devices is a huge challenge. There are several mechanisms one might consider alleviating the consequences of these decisions. On one hand, type constraints are a common mechanism used in several popular languages. In a sense, they can be seen as “specializations based on the properties of a type”. One could also pursue the stricter path of specializing based on the concrete type itself, de-facto adding a form of overloading that we currently explicitly prevent from being used. Either way, by clearly separating user defined types from tuples in the type system we have made a first step towards extending their power.

If you are curious to hear more about possible ideas for Q#, their benefits and caveats, or want to share some thoughts of your own, comment below! Contribute to the discussion and post your speculations to the question: What makes a quantum programming language “quantum”, i.e. what makes it particularly suited for quantum computing?

Join us

I hope you join us into a new year of pushing the boundaries of computation by participating in our coding competitions, contributing to our open source repositories, commenting on or writing blog posts and sharing your ideas and experiences!

How about a new year’s resolution of your own? Let us know what you expect to accomplish and how we can help you achieve your new year’s resolution around quantum programming in Q#!

Bettina Heim, Senior SDE, Quantum Software and Application
@beheim
Bettina Heim is a quantum physicist and software engineer working in the Quantum Architectures and Computation Group at Microsoft Research. She is responsible for the Q# compiler and part of the Q# language design team. Prior to joining Microsoft she worked on quantum algorithms, adiabatic quantum computing, discrete optimization problems, and the simulation and benchmarking of quantum computing devices.

Build an Azure IoT application with Cloud Explorer for Visual Studio

$
0
0

What we’ve heard and experienced ourselves is that when building applications, you have a frictionless experience when your code editor and tools are integrated and seamless. Yet when developing IoT apps, you often need to manage connected devices and send test messages between the device and IoT Hub at the same time that you’re debugging and working on your code. You’ll likely spend time switching between windows or even screens to monitor the messaging and many components of your development.

To ensure that the tools you need are close at hand, we’ve updated the Cloud Explorer for Visual Studio extension for IoT developers to enable you to view your Azure IoT Hubs, inspect their properties, and perform other actions from within Visual Studio. Cloud Explorer is installed by default if you selected the Azure Workload when installing Visual Studio. To access the latest features, you need to upgrade to Microsoft Visual Studio 2017 Update 9 or later, then download and install the latest extension from Visual Studio marketplace.

Here are some of the new features to help IoT developers easily interact with Azure IoT Hub, and the devices connected to it:

  • Interact with Azure IoT Hub
    • Send D2C messages to IoT Hub
    • Monitor D2C messages sent to IoT Hub
    • Send C2D messages to device
    • Monitor C2D messages sent to device
    • Invoke Direct Method
    • View and update device twin
  • Device management
    • List devices
    • Get device info
    • Create and delete devices
  • IoT Edge development support
    • Create IoT Edge deployment for device
    • List modules
    • View and update module twin

To learn more about what the IoT Hub enables and how to use the latest, check out the IoT Hub documentation.

Easy to Set Up

After you’ve installed Cloud Explorer, you can open Cloud Explorer view from Visual Studio menu View → Cloud Explorer. Sign in to your Azure account by clicking the Account Management icon if you haven’t done this before.

Expand Your subscription → IoT Hubs → Your IoT Hub, the device list will be shown under your IoT Hub node. Select one IoT Hub or device to inspect its properties or perform actions against the resource.

Now you have learned how to access your Azure IoT Hub resources.

Try the Tutorials

If you want to discover the Cloud Explorer features further, we offer the following walkthroughs where you will perform common IoT Hub management actions. To explore advanced or specific IoT scenarios, head over to check out our IoT Hub documentation, where we’re always adding new projects and tutorials.

Your feedback is also very important for us to keep improving and making it even easier to develop your IoT applications. Please share your thoughts with us by suggesting a feature or reporting an issue in our Developer Community

Chaoyi Yuan, Software Engineer

Chaoyi is a software engineer working on IoT tools. He’s currently focus on providing great tools for Visual Studio and Visual Studio Code users.

Visual Studio 2019 Preview 2 is now available

$
0
0

The second preview of Visual Studio 2019 is now available for download. This release contains a number of improvements and additions to the core experience and different development areas, many of which are a result of your direct feedback. As always, you can check out the release notes for more details or read on for the highlights.

Core IDE experience

Visual Studio 2019 will automatically download updates in the background while your computer is idle. This means you can continue using Visual Studio 2019 until it’s time to install. And, you will only need to wait for the actual installation of the update. The default will be set to “Download all, then install”, and you can modify this by going to Tools > Options > Environment > Product Updates.

In Preview 1, we introduced a new Per-Monitor Awareness (PMA) preview feature that is now enabled by default for users that meet the system requirements of .NET Framework 4.8 and Windows 10 April 2018 Update. Alongside the core IDE, multiple tool windows such as Toolbox, Breakpoints, Watch, Locals, Autos, and Call Stack should now render sharply across monitors with different display and scale configurations.

Search capabilities have improved in two places: the start window and inside the IDE. In the start window, you can now search for project templates by language, platform, and tags via the search box. Preview 2 introduces filters for menus, components, and templates during search in the IDE, as well as the capability to create and add new projects and items directly from the search box.

Based on your feedback, the new blue theme in Visual Studio 2019 has been updated by dialing down luminosity and increasing contrast. The draggable region has been improved as well by making the toolbar region also draggable. As a result, dragging the Visual Studio 2019 window should now be more natural.

The document health feature that was introduced with Preview 1 has been given a visual upgrade in Preview 2. Now, at a glance, you can see how many errors or warnings your document has, and clicking the control will bring up the error list. Code cleanup, which was introduced in Preview 1, has also been given its own control to quickly access the code cleanup features.

C++ development

C++ developers will notice quite a few improvements in this release. Check out the release notes for the full list, but here are some of the highlights:

  • You now have access to a fresh version of the MSVC compiler and to libraries that:
    • Bring you guaranteed binary compatibility with Visual Studio 2017 MSVC toolset and runtime
    • Add initial support for C++ 20 standards (specifically the “spaceship” operator i.e. <=> under /std:latest),
    • Enable OpenMP 4 SIMD vectorization as well as many codegen improvements for better runtime performance and build throughput, including a new compiler switch -Ob3 that provides more aggressive inlining
    • Provide new Code Analysis checks including the new Lifetime profile checker.

Plus, you can try out the latest C++ productivity improvements, including the newly-enhanced C++ Template IntelliSense, NULL->nullptr refactoring, quick fixes for missing #include and using namespace declaration, missing semicolons, and more.

C# development

Visual Studio 2019 Preview 2 adds a couple more new C# 8.0 language features on top of the ones that shipped in Preview 1 (Take C# 8.0 for a spin). Most notably, C# 8.0 pattern matching now allows recursive patterns, which can dig into the structure of an object, and switch expressions, which are a lightweight expression version of switch statements. To learn more, check out Do more with patterns in C# 8.0 on the .NET Blog.

F# development

A preview of the F# 4.6 language is now available in Visual Studio 2019 Preview 2. You can learn more about the language changes in the F# 4.6 Preview blog post. Additionally, we’ve revamped how the F# language service is initialized by Roslyn, which should result in a consistently faster solution load time for larger solutions.

.NET development

Visual Studio 2019 Preview 2 brings a range of new refactoring and codefix capabilities, such as sync namespace and folder name, pull members up, invert conditional expressions/logical operations, and many more. We’re also gradually rolling out new classification colors which are similar to Visual Studio Code. You can control these via Tools > Options > Environment > Preview Features.

Starting with this release, we are making project files for .NET SDK-style projects a first-class file type in Visual Studio and are supporting things like double-clicking a project node to open the project file and finding a project by name with Go To All (Ctrl + T). Additionally, .NET SDK-style projects will now use the new Integrated Console experience for F5 and Ctrl + F5 on console apps.

Code cleanup also now enables you to save collections of fixers as a profile. Now, if you wanted to apply a small set of targeted fixers frequently while you code and have another more comprehensive set of fixers to apply before preparing for a code review, you can configure profiles to address these different tasks.

Python development

You can now switch between different Python interpreters using the new Python Environments toolbar when editing Python files or working with projects or Open Folder workspaces.   Miniconda is available as an optional component during installation so you don’t have to separately install it to create conda environments. Additionally, you can now create Visual Studio Live Share sessions for collaboration on Python code. Check out the Python in Visual Studio 2019 Preview 2 blog post for more details.

Web and container development

If you’re developing with Node.js, you will find JavaScript debugging support for unit tests in this release. If ASP.NET is more your style, you will find that when publishing your application to Azure App Service, you can associate Azure Store and Azure SQL resources with your app as dependencies.

If you’re using containers, Visual Studio 2019 Preview 2 now supports debugging ASP.NET Core applications that use Alpine as a base image. There’s also support for the latest ASP.NET and .NET Core images.

Visual Studio Kubernetes Tools are now integrated in the Azure development workload for easy installation. This will add the Container Application for the Kubernetes project template to Visual Studio, which will automatically create a Dockerfile and Helm chart that you can use. This also enables you to add support for Kubernetes to an existing ASP.NET Core application by right-clicking the project and selecting Add > Container Orchestrator Support. After adding Kubernetes support, you can build, run, and debug your application in a live Azure Kubernetes Service (AKS) cluster with Azure Dev Spaces.

Mobile .NET development

For .NET developers using Xamarin to build mobile apps, Visual Studio 2019 Preview 2 has improved build performance if you use Xamarin.Android 9.1.1 or higher. Xamarin.Android now also supports the latest Android dex compiler (d8) and code shrinker (r8). The Android designer now natively supports Android Pie (9.0) and will show you improved status when loading. You can also use Go-To-Definition (Ctrl + Click) on resource URLs to navigate to the file or line where they are defined.

A new property panel has been added for Xamarin.Forms developers, enabling you to edit common attributes for controls. The Xamarin.Forms templates now use the latest Xamarin.Forms 4.0 release and include a new Xamarin.Forms Shell app that aims to reduce the complexity of a multi-platform app solution.

Last, but not least, load performance for new projects has been improved dramatically, showing performance gains of up to 50% in certain cases. When building apps, you can now also see more detailed build progress information by clicking the background tasks icon in the bottom left of the IDE.

Get started; share feedback

You can download Visual Studio 2019 Preview 2 here or update using the Visual Studio Installer. If you want to give it a spin without installing it, check out the Visual Studio images on Azure. Let us know of any issues you run into by using the Report a Problem tool in Visual Studio. You can also head over to the Visual Studio Developer Community to track your issues, suggest a feature, ask questions, and find answers from others. We use your feedback to continue to improve Visual Studio 2019, so thank you again on behalf of our entire team.

Angel Zhou Program Manager, Visual Studio

Angel Zhou is a program manager on the Visual Studio release engineering team, which is responsible for making Visual Studio releases available to our customers around the world.

Viewing all 1039 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>