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

Going all in on ‘Suggest a Feature’ in Visual Studio Developer Community

$
0
0

In October 2018, we announced that the Developer Community site we have used for reporting issues will work for feature requests in one convenient place. We also shared the plan to migrate from UserVoice forum to Developer Community. Since then, we have received and responded to over 2500 new feature suggestions on Developer Community with hundreds of those shipped in Visual Studio. Thank you for making the move and continuing to help us improve the functionality in Visual Studio! Now that feature suggestions are fully up and running on Developer Community, we have taken the final step of the move by turning off the UserVoice forum. If you have an idea or a request for a feature, you can now use the Suggest a Feature in Developer Community site or Visual Studio (as shown below) and make your suggestions.

Developer Community

Visual Studio

You can also browse suggestions from other developers and Vote for your favorite features to help us understand the impact to the community.

Thank you! We are looking forward to hearing your suggestions.  We also encourage you to learn more about suggestions to get the best out of it.  Thank you for the valuable feedback you provide in Visual Studio and your participation in Developer Community!

The post Going all in on ‘Suggest a Feature’ in Visual Studio Developer Community appeared first on The Visual Studio Blog.


Customize object displays in the Visual Studio debugger YOUR way

$
0
0

Have you ever stared at objects in a debugger window and wished that you could view those objects by something other than their type?  I certainly have!  Expanding items to determine each one’s identity can become tiresome very fast. Ideally, it would be great to quickly locate them by a particular property value.  Luckily for us, Visual Studio has two not-so-well-known attributes known as DebuggerDisplay for managed users, and Natvis for native C++ users. These attributes let you customize how you view objects in debugger windows such as the Watch, Autos, Locals, and datatips!

Locals and DataTips windows with and without DebuggerDisplay attribute appended to code
Figure 1 – Locals and DataTips windows with and without DebuggerDisplay attribute appended to code

What is the DebuggerDisplay attribute?

By writing DebuggerDisplay syntax at the top of a class, you can choose what strings and properties you want at the top of each object node in debugger windows.  Besides displaying strings in debugger windows, adding curly brackets ({}) to the DebuggerDisplay attribute allows Visual Studio to display the value of a property or method that you specify. You can also add format specifiers to DebuggerDisplay in order to further change how values are displayed and formatted in the debugger windows. In Figure 2, DebuggerDisplay appends the format specifier “nq” (no quotes).  The resulting display shows the string property Title without the surrounding quotation marks.

Basic DebuggerDisplay syntax added to top of Book class
Figure 2 – Basic DebuggerDisplay syntax added to top of Book class

 

Locals window with above DebuggerDisplay syntax added to code
Figure 3 – Locals window with above DebuggerDisplay syntax added to code

 

One previous workaround for performing this task is overriding a class’s ToString() method.  In contrast, DebuggerDisplay controls how an item is displayed without overriding that method.  So, if you don’t want debugging-related content in your ToString() method (especially when that method is called in your actual program), DebuggerDisplay is the way to go!

 

Can I display expressions for each object in debugger windows?

There may be times when you want to display expressions in debugger windows.  Good news: you can display expressions using the DebuggerDisplay attribute!

 

Example of DebuggerDisplay attribute containing an expression
Figure 4 – Example of DebuggerDisplay attribute containing an expression

 

Locals window with above DebuggerDisplay syntax and added expression evaluation
Figure 5 – Locals window with above DebuggerDisplay syntax and added expression evaluation

 

Bad news: DebuggerDisplay expressions can cause additional issues when debugging your code. Potential issues include performance hits for large or complex expressions, compilation and runtime errors when the expression’s language differs from the language being debugged, and application state changes when expressions mutate properties.

 

Figure 6 - DebuggerDisplay attribute with Visual Basic-style ternary expression syntax added
Figure 6 – DebuggerDisplay attribute with Visual Basic-style ternary expression syntax added

 

Figure 7 - Runtime error received after using above Visual Basic-style syntax while debugging in C#
Figure 7 – Runtime error received after using above Visual Basic-style syntax while debugging in C#

 

But fear not! One way to reduce these potential issues with expressions is by creating a private property or method that returns the string of an executed expression and telling DebuggerDisplay to display that property.

 

Figure 8 - Creating a private property containing more complex expressions and formatting referenced by DebuggerDisplay
Figure 8 – Creating a private property containing more complex expressions and formatting referenced by DebuggerDisplay

 

Figure 9 - Creating a method containing more complex expressions and formatting referenced by DebuggerDisplay
Figure 9 – Creating a method containing more complex expressions and formatting referenced by DebuggerDisplay

 

What is the feature equivalent  to DebuggerDisplay for C++ users?

DebuggerDisplay is compatible with C#, F#, and Visual Basic, but if you’re debugging in C++, Natvis is a great alternative!  Though not as simple as adding syntax to the top of a class like DebuggerDisplay, adding a .natvis file to a project lets you customize how objects are displayed.

 

Figure 10 - Example of Natvis being used in Locals window
Figure 10 – Example of Natvis being used in Locals window

 

Right-click the C++ project node in Solution Explorer, select Add > New Item, and select Visual C++ > Utility > Debugger visualization file (.natvis).  The result is an XML file where you can control which properties are displayed while debugging.

 

Figure 11 - Example Natvis file corresponding to display shown above
Figure 11 – Example Natvis file corresponding to display shown above

 

To learn more about using Natvis while debugging C++ projects, check out the documentation.

 

These features are awesome and will save me lots of time!  How can I help share DebuggerDisplay and Natvis with others?

Fun fact: both DebuggerDisplay and Natvis attributes have been in Visual Studio for years!  These attributes are extremely useful to most developers but are still not as discoverable and well-known as they could be.  As a result, we are currently working to provide an easier method to discover these attributes better, and your feedback will help make this happen!  Please complete this survey which will give us insight in providing an improved experience when using these attributes.

The post Customize object displays in the Visual Studio debugger YOUR way appeared first on The Visual Studio Blog.

Create a private gallery for self-hosted Visual Studio extensions

$
0
0

Most Visual Studio extension authors publish their extensions to the public Marketplace to allow everyone to install them and benefit from the large and open ecosystem. However, some companies create extensions for internal use only. A private gallery allows them to distribute the extensions easily with the same auto-update capabilities enjoyed by any public Marketplace extension. And now, we’ve streamlined the process even more so that you can easily create a private gallery for your team or organization.

Visual Studio 2010 introduced support for private galleries, but few used them due to lacking samples and tooling. A lot has changed since then and the private gallery support has seen several updates to support extension packs and other more recent features.

The anatomy of a private gallery

A private gallery is an ATOM feed XML File that contains meta data about the extensions. Registering the gallery with Visual Studio can be done either by the user manually under Tools -> Options or by an extension using a custom .pkgdef file (example).

The ATOM feed can be located on a web server, file system or file share. After registering the gallery, a new category appears under the Online tab in the Extension Manager dialog as shown in the first screenshot above.

Create the ATOM feed

The open source tool Private Gallery Creator makes it straightforward to create the ATOM feed. Download the executable and run it in a folder containing the VSIX files you wish to include in the feed. The tool analyzes the VSIX files and extracts the metadata needed to produce a file called feed.xml in the same folder.

You could also set up a CI/CD pipeline that automatically executes the tool to update the feed. In addition, the tool has a “watch” feature to automatically produce a new feed any time a VSIX file is added or modified in the same folder.

Set it up in only four steps

Here’s a recap of how to set up a private gallery:

  1. Put your .vsix files into an empty folder accessible to all consumers of the gallery
  2. Download PrivateGalleryCreator.exe executable into the same folder
  3. Double-click PrivateGalleryCreator.exe to produce the feed.xml file
  4. Register the feed in Visual Studio manually or from an extension’s .pkgdef file

In summary

You can learn more about private galleries from the documentation and by checking the Private Gallery Creator project on GitHub. There are a few public offerings for hosted private galleries such as MyGet and Open VSIX Gallery that may be worth looking into as well.

We’d love to hear about how you use private galleries today or why you don’t use them, so please sound off in the comments below.

The post Create a private gallery for self-hosted Visual Studio extensions appeared first on The Visual Studio Blog.

Visual Studio 2019 version 16.2 Preview 2

$
0
0

We are announcing the release of the second preview of Visual Studio 2019 version 16.2. The latest version is available for you to download from VisualStudio.com, or, if you already have the Preview installed, just click the notification bell from inside Visual Studio to update. This latest preview adds the ability debug JavaScript code using the new Microsoft Edge Insider, an improved installation experience, and updates to the application installer command-line packaging. We’ve highlighted some of the notable features below. You can see a list of all the changes in the release notes. 

Microsoft Edge Insider support 

The latest preview release of Visual Studio enables debugging JavaScript in the new Microsoft Edge Insider browser for ASP.NET and ASP.NET Core projects. To do this, simply install the browser, set a breakpoint in the application’s JavaScript and start a debug session. Visual Studio will launch a new browser window with debugging enabled allowing you to step through your JavaScript code within Visual Studio.

But it doesn’t stop there since Visual Studio also supports debugging custom browser configurations using the “Browse with” option to launch the browser with custom CLI parameters (e.g. inprivate).

Visual Studio Installer support 

The Visual Studio Installer will now better handle size space detection based on what you already have installed on your machine. The improved installer experience means that if the required amount of space is larger than what is available, the installation does not attempt. 

.NET Productivity Improvements 

The latest preview release continues to focus on developer productivity and we bring even more refactoring capabilities to enable you to write better code faster. We’ve heard the request to bring back the Sort Usings command and that it should be separate from the Remove Usings command. We appreciate everyone who shared their feedback with usYou can find the Sort Usings command under Edit > IntelliSense.

We’ve also added the ability to convert a switch statements to switch expressionsSince switch expressions  are a new C# 8.0 featureyou need to ensure that you’re utilizing the latest language version, i.e. C# 8.0. Under project file, verify the language version is set to preview. Place your cursor in the switch keyword, type (Ctrl+.) to open the Quick Actions and Refactorings menu, and then select Convert switch statement to expression. 

Finally, we’ve added the ability to generate a parameter as code fix. Place the cursor in the variable name and type (Ctrl+.) to open the Quick Actions and Refactorings menu. Select the option to Generate a variable to create a new parameter. 

App Installer Command Line Packaging Improvements 

In Visual Studio 2019 version 16.2 Preview 2, we improved the sideloaded command line packaging experience for Windows Desktop projects and, in particular, those that are configured to receive automatic updates using an .appinstaller file.   

In previous versions of Visual Studio, you were required to use one of three different methods to properly set the HoursBetweenUpdateChecks update setting in the .appinstaller file. You could use the Packaging Wizard to package the application, add the AppInstallerUpdateFrequency and AppInstallerCheckForUpdateFrequency build properties to the project file, or pass these parameters as command line arguments. 

In Preview 2, we have eliminated the need to use the Package Wizard or define these build properties.  Instead, you are able to simply define and pass HoursBetweenUpdateChecks as a parameter during the command line build, simplifying and making it easy to adjust that setting. 

Take it for a spin today 

Give the latest Preview release a try by downloading it online, or updating via the notification bell inside Visual Studio. You can also launch and use the Visual Studio Installer to install the update. 

Our PM team is always reviewing feedback and we look forward to hearing what you have to say about our latest release. If you come across any issues, make sure to let us know by using the Report a Problem tool in Visual Studio. If you have any feature ideas or want to ask questions, you should head over to Visual Studio Developer Community. We use your feedback to decide what to work on as we pursue our goal to make Visual Studio 2019 the best developer tool, so thank you again on behalf of our entire team. 

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

Azure IoT Tools help you connect to Azure IoT Hub in 1 minute in Visual Studio Code

$
0
0

When doing development for Azure IoT solutions, developers may want to test and debug their cloud solution with a real device. However, not every developer has a real device in their hand.  With the Azure IoT Tools for Visual Studio Code, you can easily use Visual Studio Code as a device simulator to quickly interact with Azure IoT Hub. Let’s see how easy it is to send a D2C (device-to-cloud) message in Visual Studio Code! Say Hello to IoT Hub in Visual Studio Code in 1 minute!

Prerequisites

  1. If you don’t have an Azure subscription, create a free account before you begin.
  2. Install Visual Studio Code
  3. Install the Azure IoT Tools extension for Visual Studio Code

Create an IoT Hub

The first step is to create an IoT Hub in your subscription from Visual Studio Code.

  1. Click … > Create IoT Hub at AZURE IOT HUB tab, or type Azure IoT Hub: Create IoT Hub in Command Palette. (If you want to use an existing IoT Hub, click … > Select IoT Hub at AZURE IOT HUB tab)
  2. Choose your subscription, resource group, and the closest deploy location to you.
  3. For Pricing and scale tier, select the F1 – Free tier if it’s still available on your subscription.
  4. Enter the name of your IoT Hub.
  5. Wait a few minutes until the IoT Hub is created. you can see that your devices status become No device in ….

Register a device

A device must be registered with your IoT Hub before it can connect.

  1. Click … > Create Device at AZURE IOT HUB tab, or type Azure IoT Hub: Create Device in Command Palette.
  2. Enter device ID and press Enter.
  3. Wait a few seconds until the new device is created.

Say Hello to IoT Hub (Send D2C message)

Right-click your device and select Send D2C message to IoT Hub, then enter the message, results will be shown in OUTPUT > Azure IoT Hub Toolkit view. Your ‘Hello World’ is sent to Azure IoT Hub!

Monitor IoT Hub D2C message in Visual Studio Code

While you could send message to your IoT Hub, it is also possible to monitor those messages in Visual Studio Code.

  • Right-click your device and select Start Monitoring Built-in Event Endpoint.

  • The monitored messages will be shown in OUTPUT > Azure IoT Hub Toolkit view.
  • To stop monitoring, right-click the OUTPUT view and select Stop Monitoring Built-in Event Endpoint.

Is that cool? You could send and receive messages for Azure IoT Hub very easily in Visual Studio Code. Is that all? Not yet! Actually, you could use Azure IoT Tools extension to do lots of things when you develop with Azure IoT Hub! Checkout our Wiki Page to see the full list of features and tutorials. You could also use Azure IoT Tools to easily call Azure IoT Hub REST APIs or generate Azure IoT application with different languages such as C#, Java, Node.js, PHP, Python. For more IoT tooling announcements and tutorials, please check out our IoT Developer Blog. Azure IoT Tools make your Azure IoT development easier.

Useful Resources:

The post Azure IoT Tools help you connect to Azure IoT Hub in 1 minute in Visual Studio Code appeared first on The Visual Studio Blog.

Visual Studio 2019 for Mac version 8.1 is now available (and a Preview for 8.2)

$
0
0

Todaywe are excited to announce the release of Visual Studio 2019 for Mac version 8.1 along with the first preview of Visual Studio 2019 for Mac version 8.2. Both releases contain exciting new features as well as improvements to performance and stability across the IDE. You can download the latest update on the Visual Studio download page or update an existing installation via the Updater within Visual Studio for MacYou can find release notes for both the stable and preview releases on our Release Notes page. We’ve also updated our Roadmap to give you a look at whatcoming over the next 3 months in versions 8.2 and beyond – including updated web editors, support for projects using multiple target frameworks, and solution-level NuGet package management! 

Visual Studio 2019 for Mac version 8.1 

Version 8.1 continues to expand on the improvements we’ve brought to Visual Studio for Mac with new features added to the C# code editor as well as new ASP.NET Core templates.  

The new editor, which was initially announced as a preview feature in Visual Studio 2019 for Mac version 8.0is now the default editing experience for C# filesThe new editor features an updatedfully native UI built on top of the reliable Visual Studio foundation. You’ll find several additional features that close the gap between the old and new editor in addition to some that were explicitly requested by the Visual Studio for Mac user community. These features include: 

  • Faster code generation through code snippets 
  • Improved analyzer functionality with inline lightbulbs 
  • Improved multicaret functionality 
  • Quick navigation via Document Outline and an improved Go to Line implementation  
  • Faster editing with drag and drop across views 

One of the most requested features from our users was the ability to utilize code snippets within a C# file. They’re a great way to quickly add blocks of common code to your project, such as properties and constructors, by leveraging the power of IntelliSense. Visual Studio for Mac now contains dozens of built-in snippets and allows you to easily expand the default library with custom ones using the Code Snippets editor within Preferences.  

Another feature we’ve added to help increase your coding efficiency is inline lightbulbs for C# projects.  For cases where you’re looking for alternative code suggestions or trying to find that code error that stops your code from building, inline lightbulbs help you refine your code and quickly detect errors in real-timeAll it takes to apply a suggested fix is a few clicks of the mouseallowing you to quickly get back to codingAnd because the logic powering these suggestions is shared with Visual Studio on Windows, you’ll always be up to date and have support for the latest analyzers.  

The latest version also brings improved navigation and editing shortcuts, such as the Document Outline and a brand-new Go to Line implementation. The new editor also supports the ability to drag and drop code across files within your project. All these improvements have been implemented with your improved productivity as our primary focus, empowering you to write better code, faster. 

In addition to the new C# editor features, you can now edit Android layout files side-by-side with a real-time designer view. This experience allows you to see changes you make to an Android layout file on the fly as you are editing, greatly improving the efficiency while editing these files. 

Finallywe’ve introduced a handful of improvements to performance and stability, updated ASP.NET Core project templates, and refined the component selection process at install based on your feedback. 

Visual Studio 2019 for Mac version 8.2 Preview 

As we mentioned earlier in this post, today we’re also releasing the first preview of Visual Studio 2019 for Mac version 8.2. In order to use the 8.2 Preview, you can easily switch to the Preview channel within Visual Studio for Mac. 

Improved XAML Editing Experience 

The 8.2 Preview release introduces new XAML and AXML editing experiences based on the same core as the new C# editor as well as the XAML language service from Visual Studio on Windows. These components provide improved XAML and AXML editing experiences, including more accurate and powerful IntelliSense, faster performance, better matching, improved linting, and an overall increase in the reliability of the editing experience. You can enable the new XAML editor via Visual Studio > Preferences > Text Editor > Behavior > XAML and selecting “Enable new XAML language service”.

One of the advantages of the new XAML Language Service with Visual Studio for Mac is that you now have access to much improved matching capabilities. For example, completions now support fuzzy matching, substring matching, and CamelCase matching, reducing the time it takes to find keywords without the need to perfectly match casing. Examples of the new matching patterns supported in the XAML editor include: 

  • Substring Matching: Matches will be listed when you type a part of a string, even if it is in the middle of the string. This is a great feature if you recall a section of a command, but not the entire command. Typing “Lay” will match “StackLayout” along with any other string which contains “lay”. 
  • Case Insensitive Matching: If you can’t recall the exact casing of a string you’re trying to find, case insensitive matching will ensure you can still find what you’re looking for. With support for this kind of matching, typing “stack” will match to “StackLayout. 
  • Fuzzy Matching: Typing any portion of a string will provide a list of matching and like matches. If you type “stck”, StackLayout will still appear as an option. 

You’ll also see improvements to suggested completions in a wide variety of scenarios for XAML, including light bulb suggestions and binding, resource, XMLNS, and markup extension completion, allowing you to write code faster and more accurately. 

.NET Core 3 and C# 8 Preview 

At Build 2019, we highlighted the next evolution in the .NET Core ecosystem.NET Core 3With it comes improved performance, streamlined project files, and an updated deployment experience. You can learn more about the new features and fixes offered in .NET Core 3 through the What’s New documentation. 

In addition to .NET Core 3, Visual Studio for Mac 8.2 also offers a preview of support for C# 8. This next generation update of C# continues to improve upon the solid foundation of C# through the integration of language features to help you write powerful code in less time. You can learn more about some of the new features in C# 8 through our documentation. 

Improved Android XML editing experience 

Android layout and resource file editing is now powered by Visual Studio for Mac’s new editorThis means that you will be able to experience all of the rich editing experiences and performance that you see in the C# editor in your Android layout files. These enhancements include improved IntelliSense, go-to-definition, and semantic editing of your files, all within Visual Studio for Mac. 

Download and try today 

We encourage you to download and try out the version 8.1 release todayWe hope this release brings us one step closer to our goal of providing you with the right tools to make .NET development on macOS a breeze.  

We also invite you to try the 8.2 Preview 1 release of Visual Studio 2019 for Mac if you’re interested in benefiting from the new XAML editor and in helping us build a better product by providing feedback and suggestions. As always, if you come across any bugs or issues, please use thReport a Problem feature to help us to improve this new experience and make each release as powerful and reliable as possible. 

The post Visual Studio 2019 for Mac version 8.1 is now available (and a Preview for 8.2) appeared first on The Visual Studio Blog.

Announcing the Visual Studio Code Installer for Java

$
0
0

It’s been almost 3 years since the first Java language server was developed during a hackathon in a small conference room at Microsoft’s Zurich office with people from Red Hat, IBM, Codenvy and Microsoft, which later became one of the most popular extensions for Visual Studio Code with more than 2.7 million installations. Since then, Visual Studio Code has gone through a thrilling journey and become to the most popular development environments according to Stack Overflow. More and more Java extensions are now available in Visual Studio Code to serve a growing Java community using Visual Studio Code along with their favorite tools and frameworks.

During this journey, we’ve heard many developers ask how to start with Java in Visual Studio Code. As the vibrant Java community expands to include more students and developers from other languages, many new comers struggle with setting up their environment to be able to start coding. To help people get started, we created the Java extension pack to give you the relevant extensions, and also included tutorials with detailed steps in our documentation.

Back in 2018, Microsoft Azure became a Platinum Sponsor of the AdoptOpenJDK project – that just got renewed until June 2020 – and provides a truly vendor neutral, completely free and open source distribution of the JDK (Java Development Kit) based on the OpenJDK project. This was a turning point for us so much we’ve also added a functionality to detect and help developers install a JDK binary in their environments, having AdoptOpenJDK as the recommended distribution. These efforts were encouraging, but got us thinking about more ways we could make it easier to starting coding in Java.

Introducing the Visual Studio Code Java Pack Installer

So today, we’re releasing a special Installer of Visual Studio Code for Java developers. The package can be used as a clean install or an update for existing environment to add Java or Visual Studio Code to your development environment. Once downloaded and opened, it automatically detects if you have the fundamental components in your local development environment, including the JDK, Visual Studio Code and essential Java extensions.

After clicking Install, it will pull the stable versions of those tools from trusted online sources and install them on your system. Once it’s done, you can open Visual Studio Code and start writing and running Java code directly! Below is a short video showing you how to write and run a Hello World program with Java in Visual Studio Code in less than 1 minute. See more detailed functionality in our tutorial.

 

The installer is available for download for Windows now while we’re still working on the macOS version. Please have a try and let us know your feedback!

If you’d like to follow the latest of Java on Visual Studio Code, please provide your email with us using the form below. We will send out updates and tips every couple weeks.

Thank you and happy coding.

The post Announcing the Visual Studio Code Installer for Java 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.

Enhanced in Visual Studio 2019: Search for Objects and Properties in the Watch, Autos, and Locals Windows

$
0
0

Are you inspecting many variables at once in the Locals window? Tired of constantly scrolling through the Watch window to locate the object you are currently interested in? New to Visual Studio 2019 for most languages (with some exclusions such as Xamarin, Unity, and SQL), you can now find your variables and their properties faster using the new search feature found in the Watch, Autos, and Locals windows!

With the new search feature, you will be able to highlight and navigate to specified values contained within the name, value, and type columns of each watch window.

Find your keywords faster using search and highlighting

If you are a fan of scrolling to the items you want, highlighting will allow you to find what you want easier. As you start typing in the search bar, the highlighting of matches currently expanded on screen will occur, giving you a faster alternative to performing a large-scale search.

Navigate between your specified keywords quickly

You can execute a search query using ENTER or the right and left arrow icons (“find next” (F3) and “find previous” (Shift+F3), respectively) shown below. If you are not a fan of scrolling to the items you want, clicking the arrows are also used to navigate through each found match. We based the search navigation on a depth first search model, meaning that matches are found by diving as far into the selected variable as specified before looking for matches within the next variable. You don’t have to sit through the full search if you don’t want to because search can also be cleared and canceled at any time, whether the search is ongoing or not.

Search for items deeply nested in your code

Unable to find what you’re looking for on your initial search? We’ve provided a “Search Depth” drop down to find matches nested X number of levels deep into your objects, where levels are defined similarly to levels in a tree data structure context. This option gives you the power to choose how thorough you want to search inside your objects (up to 10 levels), letting you decide how long or short the search process takes.

When you are searching for items that are already expanded and visible on your screen, these items will always be returned as matches no matter what search depth you have specified. Having to loop back to the item you want after passing it can be a pain, so setting the search depth to 1 will allow you to navigate to previous matches using the “find previous” arrow icon.

Excited to start searching in the Watch, Autos, and Locals windows? Let us know in the comments!

For any issues or suggestions, please let us know via Help > Send Feedback > Report a Problem in the IDE. If you have any additional feedback about this feature, feel free to complete this brief survey.

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.

Debug your live apps running in Azure Virtual Machines and Azure Kubernetes

$
0
0

We are excited to announce that, in our Visual Studio Enterprise 2019 preview, we are expanding Snapshot Debugger support beyond Azure App Services hosting ASP.NET Core and ASP.NET applications to now also include Azure Virtual Machines (VM), Azure Virtual Machine scale sets (VMSS), and Azure Kubernetes Services (AKS)!

When Visual Studio 2017 Enterprise 15.5 became generally available, we introduced the Snapshot Debugger, an innovative diagnostic tool that enables you to quickly and accurately evaluate problems in their Azure production environments without stopping the process and with minimal performance impact.

When an unanticipated issue occurs in production, it can be difficult to replicate the exact conditions in your testing environment and almost impossible to do so on your local development machine. You might consider asking your DevOps team to “turn up” production logging but this relies on you having already anticipated where issues might occur prior to deployment. You may also request that a process dump be taken, but that requires perfect timing and some luck to capture the most important details, you also must gauge how your collection strategy might negatively imy pact performance.

The Snapshot Debugger provides a familiar and powerful debugging experience, allowing developers to set Snappoints and Logpoints in code, similar to debugger breakpoints and tracepoints. When a Snappoint is hit in your production environment, a snapshot is dynamically created without stopping the process. Developers can then attach to these snapshots using Visual Studio and see what’s going on with variables, Locals, Watches and Call Stack windows, all this while the live site continues to serve your customers.

Azure Virtual Machines/Azure Virtual Machine scale sets

For most PaaS scenarios, Azure App Service is more than capable of encapsulating a complete end-to-end experience. However, for developers and organizations that require greater control over of their platform and environment, VMs remain a critical option and Snapshot Debugger supports them in the latest preview of Visual Studio.

Once your VM/VMSS has been set up to host your ASP.NET or ASP.NET Core web application you can open your project in Visual Studio 2019, and click on the “Debug->Attach to Snapshot Debugger…” menu item, where you will now be able to select VM/VMSS as shown.

The UI experience remains almost identical but now you will be required to select an Azure Storage account to collect your snapshot logs and to share the snapshot collection plan (App Services will also require Azure Storage in Preview 2).

Selecting the “Install Remote Debugger Extension” option will prompt Visual Studio to install the extensions in Azure, which is necessary to view snapshots. This process also opens a specific set of ports (30398, 31398, 31399, 32398) to facilitate communication to your local machine, these ports are not required for retrieving and viewing logpoints.

Azure Kubernetes Services (AKS)

Azure provides an incredible cross platform experience and our debugging and diagnostics tools now provide feature parity in our Kubernetes service offerings.

Before attempting to use any of the Snapshot Debugger features in AKS it is vital that your Docker images include ASP.NET Core 2.2+ installed in a global location, as well as the correctly configured Snapshot Debugger and the requisite environment variables.

To help you enable support for Snapshot Debugger in AKS we have provided a repo containing a set of Dockerfiles that demonstrate the setup on Docker images. We support three variants of Linux (Debian, Alpine and Ubuntu) and they are organized according to the ASP.NET Core version, the OS platform, and the platform architecture.

For example, the ASP.NET Core 2.2 Debian 9 (Stretch) x64 Dockerfile is located at /2.2/stretch-slim/amd64/Dockerfile. This Dockerfile produces an image with Debian 9 x64 as the base with ASP.NET Core 2.2 Runtime, it includes the latest supported Snapshot Debugger backend package and sets the environment variables to load the debugger into your .NET Core application.

Try the preview

The latest Snapshot Debugger experiences are now in preview, download and try it out here.

This preview supports the following scenarios:

  • Azure App Services on the Windows OS running ASP.NET Core (2.0+) or ASP.NET (4.6.1+).
  • Virtual Machines on the Windows OS running ASP.NET Core (2.0+) or ASP.NET (4.6.1+).
  • Azure Kubernetes Services (Linux Docker Containers) running ASP.NET Core (2.2+).

If you have any issues using Snapshot Debugger, please review this guide on Troubleshooting and known issues for snapshot debugging in Visual Studio.

We would love to hear your feedback. To report issues, use the Report a Problem tool in Visual Studio. You’ll be able to track your issues on the Visual Studio Developer Community site where you can also ask questions and find answers.

Mark Downie, Program Manager, Visual Studio Diagnostics
@poppastring

Mark is a program manager on the Visual Studio Diagnostics team, working on Snapshot Debugger.

Become a Visual Studio for Mac super user with this Tips and Tricks Video Series

$
0
0

If you are a web, mobile or games developer and would like to know how to become more productive and efficient using Visual Studio for Mac then we’ve got you covered. Visual Studio for Mac is a powerful IDE for C# developers that work with Xamarin, .NET Core and Unity workloads. The new video series, hosted on the Visual Studio Toolbox, contains short, roughly 5-minute, videos that cover tips and tricks for specific tasks and may even unveil features you didn’t even know existed! The first few videos will be introducing Visual Studio for Mac and what you can do with it.

You don’t want to miss a single video in the series so make sure you subscribe now. We will be recording and releasing a new video each week over the next few weeks, and the links will be updated on the date specified below. The videos currently feature Program Managers, Cody Beyer (@cl_beyer) and Sayed Ibrahim Hashimi (@SayedIHashimi). You can also provide feedback using the Developer Community portal

Here are the links to all the videos:

Overview In this video, Sayed will give you a very brief overview of some of the types of applications you can develop with Visual Studio for Mac. Since this is a very short video, it just touches on some of the more common types of apps that can be developed. This is the first video in the Visual Studio for Mac Tips and Tricks series. The first few videos will be setting a foundation with some basic information on Visual Studio for Mac. Following that, each video will show one, or a few, tips and tricks for specific tasks.
Acquisition Visual Studio for Mac is our full-featured IDE for macOS, providing all the tools you need to create ASP.NET Core application, Unity games, Xamarin mobile apps, Azure Functions and so much more. Join Cody as he shows how to download and install Visual Studio for Mac.
Build Your First App In this video, Sayed will show you how you can create your first ASP.NET Core web application with Visual Studio for Mac. The application that will be developed is a web site that displays the emojis available on GitHub. The info for the emojis are retrieved using the GitHub API.
Launch Multiple Projects While developing applications, it’s common to need to debug, or simply launch, more than one project. In this video, Sayed will show you how you can do just that. You can launch more than one project on run, or debug, by creating a new Solution Run Configuration.
Work with Multiple Solutions 
(available 1/29/2019)
In this video, Sayed will show you how you can work with multiple solutions in Visual Studio for Mac. Specifically, he will demonstrate two ways to work with multiple solutions:
  1. How to open more than one solution in the same instance of the IDE
  2. How to open more than one instance of Visual Studio for Mac
Manage Projects with Git 
(available 1/29/2019)
Want to know how to “git” started with using Visual Studio for Mac? Join Cody as he introduces Git support in Visual Studio for Mac, from check-out to push.
Publish to Azure
(available 2/5/2019)
In this video, Cody will demonstrate how to log in and publish a web project to Azure. Join him and learn how to get the most out of Visual Studio for Mac by combining it with the power of Azure.
Customize the Look and Feel 
(available 2/5/2019)
No IDE is truly ready until it matches your unique style and preferences. In this video, Cody will walk you through the steps to enable dark mode, install custom editor color themes and change the interface language.
Refactoring Code
(available 2/12/2019)
Visual Studio for Mac offers the refactoring and suggestion engine that you know and love on Windows. Learn how to get the most out of the power of Roslyn in all of your projects using Visual Studio for Mac.
Using NuGet 
(available 2/12/2019)
Visual Studio for Mac supports NuGet for all of your dependency management needs. In this video, Cody will demonstrate how to add a NuGet package to your project, and how to connect Visual Studio for Mac to custom NuGet feeds.
Searching and Navigating 
(available 2/19/2019)
Learn how to be a keyboard wizard and navigate within your project with ease using Visual Studio for Mac. In this video, Cody shares his favorite tips and tricks for navigating around your code.
Using Navigate To
(available 2/19/2019)
In this video, Sayed will show you how you can improve your productivity when developing apps with Visual Studio for Mac using the Navigate To feature that allows you quickly find files, code, and more. Navigate To is a feature that is similar to the Visual Studio Quick Launch feature.

 

Tell us what you think!

We invite you to leave us a comment below and let us know what you think of the series. If these are helpful and valuable to our users, then we will record more videos and keep the series going. If there is another format that you think would be better, we would love to hear your thoughts.

Here are some useful links:

Cody Beyer, Program Manager
@cl_beyerCody Beyer is a Program Manager on the Visual Studio for Mac team at Microsoft. His primary areas of focus cover overall performance and reliability of the IDE. He is also interested in computer ethics and privacy and aims to create software that empowers and respects everyone.
Sayed Hashimi, Senior Program Manager
@sayedihashimiSayed Ibrahim Hashimi has a computer engineering degree from the University of Florida. He works at Microsoft as a Senior Program Manager creating better .NET Core, and ASP.NET Core, ­development tools in Visual Studio for Mac. Before joining the Visual Studio for Mac team, he worked on ASP.NET features in Visual Studio. Prior to joining Microsoft, he was a Microsoft Visual C# MVP. Sayed has written four book on MSBuild, http://msbuildbook.com and he is a co-founder of  the OmniSharp project.

A better multi-monitor experience with Visual Studio 2019

$
0
0

Visual Studio 2019 now supports per-monitor DPI awareness (PMA) across the IDE. PMA support means the IDE and more importantly, the code you work on appears crisp in any monitor display scale factor and DPI configuration, including across multiple monitors.

Visual Studio 2019 (left) with system scaling vs Visual Studio 2019 (right) with the PMA option enabled.

If you have used Visual Studio across monitors with different scale factors or remoted into a machine with a different configuration than the host device, you might have noticed Visual Studio’s fonts and icons can become blurry and in some cases, even render content incorrectly. That’s because versions prior to Visual Studio 2019 were set to render as a system scaled application, rather than a per-monitor DPI aware application (PMA).

System scaled applications render accurately on the primary display as well as others in the same configuration but have visual regressions such as blurry fonts and images when rendering on displays with different configurations. When working for extended periods of time, these visual regressions can be a distraction or even a physical strain.

Visual Studio 2019 Preview 1 included the core platform support for per-monitor DPI awareness and Preview 2 includes additional fixes for usability issues around scaling, positioning and bounding (e.g. content renders within the bounds of tool windows). Preview 2 also adds several more popular tool windows that now correctly handle per-monitor DPI awareness.

How to enable PMA for Visual Studio 2019

The easiest way to try the new PMA functionality is on Visual Studio 2019 Preview 2. You’ll need to have the Windows 10 April 2018 Update or a newer build installed along with the latest version of .NET Framework 4.8. If you’re still running Preview 1 then you also need to enable “Optimize rendering for screens with different pixel densities” in the Preview Features node of the Tools -> Options dialog.

There are many features where you’ll start to see Visual Studio render clear fonts and crisp images. Here’s a few of the most used UI in Visual Studio where you should notice a difference.

  • Core Shell
  • Menus and context menus
  • Most code editors
  • Solution Explorer
  • Team Explorer
  • Toolbox
  • Breakpoints
  • Watch
  • Locals
  • Autos
  • Call Stack

Visual Studio 2019 Preview 2 also fixes some of the usability issues affecting UI positioning, scaling and content bounding that were discovered in Preview 1.

Our goal is to have per-monitor awareness working across the most used features by the time we ship Visual Studio 2019. In future updates, we’ll continue enabling PMA across more areas and look forward to your feedback.

Tell us what you think!

We thank you for your ongoing feedback, and encourage you to install the latest Visual Studio 2019 preview, enable the PMA functionality, and tell us about your experiences through the Developer Community portal. Please upvote PMA related asks or create new ones whenever you feel a specific component (tool window, dialog, etc.) or issue has not being reported.

Reporting your experience alongside your display configurations, PMA feature state (on/off) and for bonus points, any screenshot or video showing the affected areas will help us resolve issues faster, and account for as many use-cases as possible.

Ruben Rios, Program Manager, Visual Studio
@rub8n

Ruben is a Program Manager on the Visual Studio IDE platform team. During his time at Microsoft, he’s helped build tools and services for web & mobile devs in both Visual Studio and the Microsoft Edge F12 dev tools. Before joining Microsoft, he was a professional web developer and has always been passionate about UX.


Microsoft Q# Coding Contest – Winter 2019

$
0
0

Are you new to quantum computing and want to improve your skills? Have you done quantum programming before and looking for a new challenge? Microsoft’s Quantum team is excited to invite you to the second Microsoft Q# Coding Contest, organized in collaboration with Codeforces.com.

The contest will be held March 1 through March 4, 2019. It will offer the participants a selection of quantum programming problems of varying difficulty. In each problem, you’ll write Q# code to implement the described transformation on the qubits or to perform a more challenging task. The top 50 participants will win a Microsoft Quantum T-shirt.

This contest is the second one in the series started by the contest held in July 2018. The first contest offered problems on introductory topics in quantum computing: superposition, measurement, quantum oracles and simple algorithms. The second contest will take some of these topics to the next level and introduce some new ones.

For those eager to get a head start in the competition, the warmup round will be held February 22-25, 2019. It will feature a set of simpler problems and focus on getting the participants familiar with the contest environment, the submission system and the problem format. The warmup round is a great introduction, both for those new to Q# or those looking to refresh their skills.

Another great way to prepare for the contest is to work your way through the Quantum Katas. They offer problems on a variety of topics in quantum programming, many of them similar to those used in the first contest. Most importantly, the katas allow you to test and debug your solutions locally, giving you immediate feedback on your code.

Q# can be used with Visual Studio, Visual Studio Code or command line on Windows, macOS or Linux, providing an easy way to start with quantum programming. Any of these platforms can be used in the contest.

We hope to see you at the second global Microsoft Q# Coding Contest!

Mariia Mykhailova, Senior Software Engineer, Quantum
@tcnickolas
Mariia Mykhailova is a software engineer at the Quantum Architectures and Computation group at Microsoft. She focuses on developer outreach and education work for the Microsoft Quantum Development Kit. In her spare time she writes problems for programming competitions and creates puzzles.

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.

Azure IoT Edge Tools Extension (Preview) Announcement

$
0
0

We’re excited to announce the preview availability of the new Azure IoT Edge Tools Extension (Preview) for Visual Studio 2019. The extension provides a rich set of functionalities to support development of IoT Edge solutions with Visual Studio 2019:

  • New Azure IoT Edge project targeting different platforms (Linux amd64, Linux arm32v7, Windows amd64)
  • Add a new IoT Edge module (C#/C) to solution
  • Edit, build and debug IoT Edge modules locally on your Visual Studio machine
  • Build and push docker images of IoT Edge modules
  • Run IoT Edge modules in a local or remote simulator
  • Deploy IoT solutions to IoT Edge devices (with Cloud Explorer)

Prerequisites

  • Visual Studio 2019: “.NET desktop development” and “Azure development workload” workload installed; “Windows desktop development with C++” is needed if you plan to develop C modules
  • Docker Desktop. You need to properly set the Docker CE running in Linux container mode or Windows container mode.
  • To set up local development environment to debug, run, and test your IoT Edge solution, you need Azure IoT EdgeHub Dev Tool. Install Python (2.7/3.6), then install iotedgehubdev by running below command in your terminal. Make sure your Azure IoT EdgeHub Dev Tool version is greater than 0.8.0.
    pip install --upgrade iotedgehubdev

Installation

There are two options to install the new extension:

  • Download and install the new extension from the Visual Studio Marketplace.
  • Alternatively, you can install the extension directly from within Visual Studio 2019 using the menu Extensions -> Manage Extensions. In the Manage Extensions window, select Online from the left panel and input edge in the search box on the top-right to search and download “Azure IoT Edge Tools for VS 2019 [Preview]”.

How to use this extension?

Please refer the following tutorials to get started:
Use Visual Studio 2019 to develop and debug modules for Azure IoT Edge (Preview) 
Easily Develop and Debug Azure IoT Edge C Modules with Azure IoT Edge Tools
Visual Studio Azure IoT Edge Tools document repo

Please don’t hesitate to give it a try! Your feedback and suggestions are 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 Visual Studio Azure IoT Edge Tools repo.

The post Azure IoT Edge Tools Extension (Preview) Announcement appeared first on The Visual Studio Blog.

Visual Studio Extensibility Day 2019 was a hit

$
0
0

On Friday, May 10th we hosted both internal and external Visual Studio extension authors in the Workshop room in building 18 on the Microsoft Campus in Redmond. It was a full day event with keynotes and sessions for 60 attendees – half of which attended //build earlier that same week, and half who came just for the Extensibility Day.

Attendees

They were a mix of old VSIP Partners, hobbyists, 1st-party MSFT teams and for-profit 3rd-party extenders. About half the attendees extended their stay for the //build conference to be able to attend the event. The rest came from all over the world and some flew to Redmond just to be able to attend Extensibility Day.

We’ve done similar events in the past exclusively for the VSIP Partners, but this was the first time we invited the larger extensibility community. For a lot of the attendees, this was their first time talking to- and socializing with other extension authors in person.

Agenda

To kick off the event, Corporate Vice President John Montgomery, and Director of Program Management Amanda Silver each gave a keynote. After that, sessions about various extensibility topics filled the rest of the day, including:

All sessions were highly technical and with lots of demos.


Amanda giving her keynote about the future of Visual Studio (photo by @kosmosebi)

After the session ended, we went to the Microsoft Company Store and Visitor Center followed by drinks and dinner at the Boardwalk restaurant in the heart of the Microsoft campus. People stayed until they closed.

Addressing pain points

During the day, the attendees helped identify their main pain points and produced a prioritized list of documentation/samples for us to provide as well as organizing our backlog of features to implement. Then they voted on the priority of each item and these are the results:

Top 5 missing pieces of documentation (in prioritized order):

  1. How to run and write integration tests
  2. How to debug and profile performance and memory issues
  3. DTE or IVs* – which one to use, how and when?
  4. How to access telemetry data collected by VS about our extensions
  5. How to target multiple versions of VS

Top 5 missing features (in prioritized order):

  1. Added integration test tooling
  2. Develop extensions in .NET Core
  3. Define VSCT from code instead of XML
  4. Marketplace extensions should have a private preview feature
  5. Ability to revert extensions to earlier versions

Remote-powered developer tools

A few weeks ago, we announce plans to enable a remote-powered developer experience for Visual Studio. It was met with great interest by the attendees who had a lot of questions as to how it relates to extension development. It’s still early and there are a lot of unknowns for us still to investigate. We’ll make sure to keep everyone in the loop as we know more. Stay tuned on this blog for that information.

Late notice

We sent out the invitation a bit late, so we were afraid that people wouldn’t be able to make it with such short notice. If you were among the people who couldn’t make it, I do apologize and ensure you that next year we send the invitations out much earlier.

Feedback about the event

The attendees filled out an evaluation form online after the event and the feedback was overwhelmingly positive. Everything from the list of sessions, the backlog prioritization, to the food served for lunch all received a top rating.

I really enjoyed visiting the campus and getting a chance to meet the team and other extension authors. I found that hearing about possible future direction for VS, participating in documentation/backlog prioritization and getting a broader sense of the ecosystem all really helped me answer questions about where to head next for CodeMaid. – Steve Cadwallader, author of CodeMaid

There were room for improvements too, and the top suggestions for next time are:

  1. More time to mingle and socialize with fellow extenders
  2. More hands on and Q&A time with the Visual Studio team
  3. Let the attendees vote on what sessions to see at time of registration

To summarize; this was a great event and I hope we can continue to do events like this every year. Thanks to all the attendees for coming and help making the day one to remember for all of us.

The post Visual Studio Extensibility Day 2019 was a hit appeared first on The Visual Studio Blog.

Performance Improvements in Visual Studio 2019

$
0
0

Performance has been a big focus area for Visual Studio 2019, with improvements in many areas, including:

  • Faster Visual Studio startup
  • Faster branch switching experience in Visual Studio
  • C++ open folder – time to IntelliSense improvements
  • Faster C++ compiler build times
  • Faster debug stepping
  • Debug extra large C++ codebases
  • Faster installation updates

Faster and clean startup

Something you’ll notice when you open Visual Studio 2019 is its new start window. The new start window is much faster than Visual Studio 2017’s start window and has been designed to present you with several options to get you to code quickly. In addition, starting with Visual Studio 2019 version 16.1, Visual Studio blocks synchronously autoloaded extensions to improve startup and solution load times. This allows you to get to your code faster.

Visual Studio 2019 Start Window
Visual Studio 2019 Start Window

Faster branch switching experience

When working with Git, part of the usual workflow is to create and work on code branches. The branch switching experience has been completely redesigned over the last 6 months. Starting with Visual Studio 2017 update 15.8, the IDE does not completely unload and reload the solution during branch switches (unless large number of projects are updated as part of the branch switching operation).
To avoid context switching between the IDE and the Git command line, Visual Studio 2019 now provides an integrated branch switching experience that allows you to “stash” any uncommitted changes during the branch switch operation. You no longer need to go outside of the IDE to stash your changes before switching branches in Visual Studio.

Faster Visual Studio 2019 Git Branch Switching
Visual Studio 2019 Git Branch Switching Experience

Faster debugger stepping

Since large part of the development cycle includes stepping through and debugging code, we have worked to bring several improvements to the debugger performance.  Stepping through your code is over 50% faster in Visual Studio 2019 versus 2017.  The Watch, Autos, and Locals windows are 70% faster. Moreover, since most debugger-related windows (i.e. watch window, call stack window, etc.) are now asynchronous, you can now interact with one window in Visual Studio while waiting for information to load in another.

Faster Visual Studio 2019 Debugger Stepping
Visual Studio 2019 Debugger Stepping

Debug very large C++ codebases

Visual Studio 2019 introduces an improved debugger for C++ that uses an external 64-bit process for hosting its memory-intensive components. If you’ve experienced memory-related issues while debugging large C++ applications before, these issues should now be resolved with Visual Studio 2019. You can read how the new external debug process has addressed the current issues in our Gears of War case study.

Visual Studio 2019 Debug Large Coderbases GoW Demo
Visual Studio 2019 Debug Large Coderbases GoW Demo

Indexing and IntelliSense performance in C++ CMake Projects

The indexing is now significantly faster for code opened via Open folder, and, as a result, IntelliSense is available considerably faster, when compared to Visual Studio 2017. As an example, in the LLVM codebase, IntelliSense becomes available 2 times faster in Visual Studio 2019. Additionally, a new indexing algorithm lights up IntelliSense incrementally while the folder is being indexed, so you don’t need to wait for the entire folder to be indexed before you can be productive with your code.

Visual Studio 2019 Faster Indexing and IntelliSense
Visual Studio 2019 Indexing and IntelliSense for C++ CMake LLVM Repository

Faster C++ Build Linker time is 2x faster

C++ builds have been made faster with improvements in the C++ linker. For example, we see over 2x faster build linker times for an Unreal Engine-based AAA game.

Visual Studio 2019 Faster Build Linker time
Visual Studio 2019 Faster Build Linker time

Faster installation of Visual Studio updates

With the introduction of background downloads for updates in 16.0, you can continue working on your code for a longer time, while the update downloads in the background. At the end of the download, once the update is ready for installation, you will get a notification to let you know that you’re good to go. Using this approach, the update installation time for Visual Studio 2019 updates have decreased significantly.

Try Visual Studio 2019 and let us know

We welcome you to try Visual Studio 2019 either with your own projects or with Roslyn Compilers projects we used as examples above and see how it compares to Visual Studio 2017 for your scenarios. We are always looking for more feedback to know which improvements are working for you, which ones are not and which areas we should focus on next.

If you are seeing performance issues, please send us feedback through Visual Studio’s Report a Problem tool that you can access from Help -> Send Feedback -> Report a problem. This tool will ensure that we have the right set of data to help us analyze the issue.

The post Performance Improvements in Visual Studio 2019 appeared first on The Visual Studio Blog.

Viewing all 1039 articles
Browse latest View live


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