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

Visual Studio extensibility is better with IntelliCode

$
0
0

Installing the Visual Studio extension development workload presents you with a choice of optional components. And looking at the component list might leave you rather confused. Because how are various C++ components and the Class Designer especially relevant to writing extension? And where is IntelliCode?

Taking a deeper look at the list we could sensibly remove some components that most extenders are not going to use. We could also add the IntelliCode component which was missing. So, we did in the Visual Studio 2019 v16.3 update, and the result looks like this:

Let’s add IntelliCode

It’s now a much cleaner list and it includes IntelliCode as an optional, but recommended component. So why is it recommended you ask? Let’s first look at what IntelliCode provides us when working with types from the Visual Studio SDK:

Notice how the IntelliSense items starting with a ★ help write the code. That’s IntelliCode providing the guidance when I’m using the Visual Studio SDK. Since the SDK is so huge, it can really make exploring the APIs and choosing the right methods and properties much easier to do by popping the most relevant items to the top of my suggestion list. It has helped me on numerous occasions, so I’m a big fan.

To make IntelliCode aware of the usage patterns of Visual Studio SDK, we trained its machine learning model on a lot of GitHub repositories containing extension code. The result is great guidance from types used from MEF such as IWpfTextView, EnvDTE, and many others.

So, if you are an extension author, do yourself a favor and give IntelliCode a try and let us know how it went in the comments below.

The post Visual Studio extensibility is better with IntelliCode appeared first on Visual Studio Blog.


Visual Studio 2019 v16.4 Preview 2, Fall Sports, and Pumpkin Spice

$
0
0
Fall Colors
Fall Colors on Microsoft Campus in Redmond

 

Here at our Redmond campus in the Pacific Northwest, we are cloaked with a brilliant display of fall colors and team members walking around in their favorite American football jerseys often with coffee in hand.  While I may not have confirmed, I suspect fall flavors are hinted in the steamy beverages.

The Microsoft Ignite conference is approaching in early November, and our annual Giving Campaign has us looking for ways to make community and global impact.  All of this is to say, we are anticipating an exciting season of bettering our world and our Visual Studio products. Along those lines, we are proud to release Visual Studio 2019 version 16.4 Preview 2 with some new features in the IDE, C++, Container Tools, and GitHub integration.

While I give an overview of these new features, why not downloaded the most recent version from VisualStudio.com and check out these features for yourself? As always, our release notes give even greater detail. 

Change Your Tabs to a Vertical Layout

I was recently in training and happened to meet one of the designers who had just completed work on this feature.  He couldn’t wait for developers to give this part of our product a try.  The choice to display tabs in a vertical layout was one of the most requested features from former Custom Document Well extension and Developer Community users.  After additional customer research to identify pain points in document management, we have identified several areas of improvementsThe vertical tab implementation starting in Visual Studio 2019 v16.4 Preview 2 is one step in many to deeply improve the document management experienceBelow is a quick example of how the new feature looks.

 

Shows the look of vertical tabs in the IDE
Change your tabs to a vertical layout
Container Tools Window

Until now, this feature has only been available as an extension in the Visual Studio Marketplace.  After great usage and reviews, we have brought the functionality into the IDE itself.  This new tool window enables you to list, inspect, stop, start and remove Docker images and containers on a local machine. In addition, you can view folders and files in running containers and open a terminal window. Finally, you can view, stream, and search container logs.   

Container Tools Window
Container Tools Window

 

Terminal Window Updates

Continuing the theme of general improvements, we’ve added the ability to create multiple terminal instances and automatically create profiles for the Developer Command Prompt, Developer PowerShell and any WSL distributions available on your machine.  The automatic profile creation will happen on first launch or through the profiles restore button.

Overview Pages for CMake Projects

We have added Overview Pages for CMake projects to help you get started with cross-platform development. These pages are dynamic and help you install the Linux Workload, connect to a remote Linux system or the Windows Subsystem for Linux (WSL), and add a Linux or WSL configuration to your CMake project. If you are just getting started with Linux development in Visual Studio, I recommend trying our native support for WSL. 

Also, a navigational feature has been added to the launch drop-down menu so that CMake projects will display your most recently used targets.  Plus, with the ability to filter from this location, finding what you are looking for becomes simpler.

Symbol Search Enabled for C++

We’ve continued to expand our search capabilities by adding symbol search support for C++You will now be able to search for types and members in addition files within the search control.  Results are refined dynamically as each letter of your search query is typedYou can access code search through our single search shortcut (Ctrl+Q) in the search box centered at the top of Visual Studio, or view focused code related results only by clicking on the Code group.

.NET Tooling

You can now configure the severity level of a code style rule directly through the error list. Place your cursor on the error, warning, or suggestion. Right click and select Set severity. Next, select the severity level you would like to configure for that rule. As a result, this will update your existing EditorConfig with the rule’s new severity. This also works for third party analyzers. 

 

Configure the severity of a code style rule
Set the severity level of a code style rule

In addition, we are continuously adding provisioning and publishing support for popular Azure services. In this preview we added support for provisioning Application Insights from within the dependencies section of publish profiles. 

Add dependencies
Add dependencies to Azure services
Publish to GitHub Support

Finally, another extension with functionality making its way into Visual Studio 2019 product itself is the previously available GitHub Extension. This developer favorite allows enables seamless interaction with GitHub repositories. Publish those local repositories by simply clicking the Publish to GitHub button on the Team Explorer Synchronization page.     

Pin Properties in Debugger

[Update 10/16] It looks like there was an error going live with this feature.  Thank you very much for giving us feedback, and we hope you look forward to trying this new addition in our next preview release.  Sneak Peek!

Identifying objects by their properties while debugging has just become easier and more discoverable with the new Pinnable Properties tool.  In short, hover over a property you want to display in the debugger window of the Watch, Autos, and Locals windows, click that pin icon, and immediately see the information you are looking for at the top of your display!

Pin Properties in Debugger
Pin Properties in Debugger

 

Give it a try and let us know what you think

Hopefully, these features make you as excited as your favorite team putting a few points on the scoreboard.  If so, head on over to our downloads page and as always, we love to hear your feedback on our Visual Studio Developer Community.  If you run into any complications, our Report a Problem tool in Visual Studio is the best way to get the attention of our teams 

The post Visual Studio 2019 v16.4 Preview 2, Fall Sports, and Pumpkin Spice appeared first on Visual Studio Blog.

Document Management Improvements: Vertical document tabs are here!

$
0
0

Demonstration of Vertical Tabs

We are excited to announce that the first preview of Vertical Document Tabs is available as part of Visual Studio version 16.4 Preview 2. Vertical tabs give you the option to better utilize horizontal screen space and at the same time gives more vertical space for your code. It lets you see more of your open document tabs and gives an intuitive and flexible way of ordering them.

Enabling Vertical Document Tabs

Vertical Tabs in Tools > Options

To try out vertical tabs, enable Vertical document tab layout feature by going to Tools > Options > Environment > Preview Features. Once the feature is enabled you will be able to see additional settings for vertical tabs under Tools > Options > Environment > Tabs and Windows and to easily change tab layouts between the three orientations (left, right, and top) with the document tab’s right-click context menu.

Two ways to change tab layout

What’s New in the Vertical Layout

While designing for the vertical layout, we took the opportunity to improve on today’s document management experience.

Easily Change Layouts

Easily switch your tabs to the left, to the right, and back to the top as needed with the right-click context menu.

Right-click context menu to change layout

Sorting

Take control of how your tabs will be opened. In addition to the default alphabetical sort, we’ve added the ability to have your tabs open via most recently opened as well. While alphabetical sort has a fixed order, most recently opened will allow you to rearrange the order of your tabs after opening them.

Change tab sort order

Vertical and Horizontal Document Groups

Vertical and horizontal document groups are also easily manageable with just one vertical tab well.

Vertical document groups with vertical document tabs

What’s Next?

Vertical Tabs

This is the first peek at the work we are doing in bringing vertical tabs to Visual Studio. For next steps, we will be monitoring all the feedback to identify any key missing features or enhancements needed for the feature.

Document Management

The Vertical Document Tabs feature is just one step in a larger effort to improve the document management experience in Visual Studio. We will be looking at other features that will help boost productivity like grouping, adding more sort types, and improving today’s horizontal tab experience. For a full list of suggestions we are tracking, take a look at this Developer Community ticket.

Try it out and let us know how we did!

Answer our survey here or through the Give Feedback link listed under our feature in Tools > Options > Environment > Preview Features > Vertical Document tab layout to help improve the feature.

The post Document Management Improvements: Vertical document tabs are here! appeared first on Visual Studio Blog.

Debug JavaScript in Microsoft Edge from Visual Studio

$
0
0

As you may know, the next version of Microsoft Edge will adopt the Chromium open source project to create better web compatibility and less fragmentation of different underlying web platforms. If you haven’t already, you can try out preview builds of Microsoft Edge from https://www.microsoftedgeinsider.com which is now available on Windows 10, 8.1, 8, 7, and macOS!

With Visual Studio today, you can already debug JavaScript running in the current version of Microsoft Edge, built on top of the EdgeHTML web platform. Starting with Visual Studio 2019 version 16.2, we’ve extended support to the preview builds of Microsoft Edge, which leverage Chromium. Head to visualstudio.com/downloads/ to download the latest Visual Studio now!

Visual Studio hearts Microsoft Edge
Visual Studio now supports debugging JavaScript running in Microsoft Edge!

 

Create a new ASP.NET Core Web Application

You can now debug JavaScript in Microsoft Edge for your ASP.NET Framework and ASP.NET Core applications. To try out this feature, let’s start by creating a new ASP.NET Core Web Application.

Screenshot of the "Create a new project" dialog in Visual Studio
Create a new project in Visual Studio and select ASP.NET Core Web Application.

 

To show off support for debugging JavaScript, we’ll use the React.js template which shows you how to integrate React.js with an ASP.NET Core application. Once your project has been created, open ClientApp/src/App.js which you’ll see is a React component for our app.

 

Using JavaScript to calculate the Fibonacci sequence

Let’s assume that as part of this app, a user will input the term in the Fibonacci sequence they want to know and our client-side JavaScript code will be responsible for calculating it and displaying the result to the user. The Fibonacci sequence is a series of numbers where each number is the sum of the two preceding ones, starting with 0 and 1.

Position 1 2 3 4 5 6 7
Value 0 1 1 2 3 5 8

 

To handle this calculation, let’s create a new Fibonacci component and add it to our app. Start by modifying App.js to import our soon-to-be-created Fibonacci component and route to it:

import React, { Component } from 'react';
import { Route } from 'react-router';
import { Layout } from './components/Layout';
import { Home } from './components/Home';
import { FetchData } from './components/FetchData';
import { Counter } from './components/Counter';
import { Fibonacci } from './components/Fibonacci';

export default class App extends Component {
  displayName = App.name

  render() {
    return (
      <Layout>
        <Route exact path='/' component={Home} />
        <Route path='/counter' component={Counter} />
        <Route path='/fetchdata' component={FetchData} />
        <Route path='/fibonacci' component={Fibonacci} />
      </Layout>
    );
  }
}

Now that our app will handle routing the /fibonacci endpoint, let’s modify the NavMenu to navigate to that endpoint. Open ClientApp/src/components/NavMenu.js and add this LinkContainer component at line 36:

<LinkContainer to={'/fibonacci'}>
  <NavItem>
    <Glyphicon glyph='alert' /> Fibonacci
  </NavItem>
</LinkContainer>

before the </Nav> tag. Now, you’ll be able to easily test our new /fibonacci route from the NavMenu. Finally, let’s create our Fibonacci component. Create a new JavaScript file (Ctrl+N) and save it as Fibonacci.js in the ClientApp/src/components/ folder. Add the code below to your new component:

import React, { Component } from 'react';

export class Fibonacci extends Component {
  displayName = Fibonacci.name

  constructor(props) {
    super(props);
    this.state = {
      n: 8,
      f_n: null,
    };
    this.calculateFibonacci = this.calculateFibonacci.bind(this);
  }

  calculateFibonacci() {
    var f_0 = 0;
    var f_1 = 1;
    for (var i = 3; i < this.state.n; i++) {
      var f_2 = f_0 + f_1;
      f_0 = f_1;
      f_1 = f_2;
    };
    this.setState({
      f_n: f_2
    })
    console.log("The " + i.toString() + "th Fibonnaci number is:", f_2);
  }
		
  render() {
    return (
      <div>
        <h1>Fibonacci</h1>
        <p>This is a simple example of a React component.</p>
        <p>The {this.state.n}th Fibonacci number is: <strong>{this.state.f_n}</strong></p>
        <button onClick={this.calculateFibonacci}>Calculate</button>
      </div>
    );
  }
}

Eventually, we’ll add a form to the render function for the user to supply n, the variable we’re using to represent the term in the Fibonacci sequence that they want to know. For now, just to test our logic, we’ll assume that the user wants to know what the 8th term in the sequence is, which is 13. Let’s build our app in the new Microsoft Edge to see if our code is calculating the right answer.

If you don’t have it installed already, head to https://www.microsoftedgeinsider.com to download the preview builds of Microsoft Edge. In Visual Studio, click the dropdown next to IIS Express and select the version of Microsoft Edge (Beta, Dev, or Canary) that you have installed. If you don’t see Microsoft Edge Beta, Dev or Canary in the dropdown, you may need to restart Visual Studio.

Screenshot of Visual Studio, selecting the Microsoft Edge Dev browser to launch
Select Microsoft Edge Beta, Dev, or Canary for Visual Studio to launch

Now click the green Play button or press F5 on your keyboard. Visual Studio will start your web application and Microsoft Edge will automatically launch and navigate to your app.

Screenshot of the app in Microsoft Edge
Your app is successfully running in Microsoft Edge!

You’ll see the entry we added for our Fibonacci component in the NavMenu on the left. Click on Fibonacci.

A screenshot of the Fibonacci component we added in Microsoft Edge
Microsoft Edge is showing the Fibonacci component we added

Now click the Calculate button.

Screenshot of Microsoft Edge where our Fibonacci component calculated the 8th term in the sequence as 8
Our Fibonacci component is calculating the 8th term in the sequence as 8

We know that the 8th term should be 13 but our code is saying that the 8th Fibonacci number is 8!

Debugging JavaScript in Visual Studio

Switching back to Visual Studio, since our calculateFibonacci() function prints to the Console, you can actually see that log in the Debug Output.

Screenshot of Visual Studio with our console.log statement shown in the Debug Output
You can see console.log statements from your client-side JavaScript code in Visual Studio’s Debug Output

To figure out where our code is going wrong, let’s set a breakpoint on Line 19 inside the for loop in Visual Studio. We’ll start by checking if our code is calculating the 3rd and 4th terms in the Fibonacci sequence correctly. Click the Restart button next to the Stop button or press Ctrl+Shift+F5 to bind the breakpoint and start debugging.

Note: If you have not enabled JavaScript debugging before, your JavaScript breakpoint will not bind successfully. Visual Studio will ask if you want to enable JavaScript debugging and then restart the debugging process and bind your breakpoint. Click Enable JavaScript Debugging (Debugging Will Stop and Restart).

Screenshot of Visual Studio asking if you want to enable JavaScript debugging
Click “Enable JavaScript Debugging” and Visual Studio will restart debugging

We know that the first two terms in the Fibonacci sequence are 0 and 1. The third term should also be 1. Switch from the Output view to Watch 1 and add f_2, f_1, and f_0 to watch. This is what Visual Studio should look like now:

Screenshot of Visual Studio with a breakpoint set on Line 19 in Fibonacci.js and f_0, f_1, f_2 added to Watch 1
Visual Studio is paused at Line 19 in Fibonacci.js and you can see the values of f_0, f_1, and f_2 in Watch 1

Click the Step Over button or press F10. You will now see that our code correctly calculated the third Fibonacci number, 1, as the value of f_2.

Position 3 4
Value 1 2
Did our function compute this term correctly? Checkmark

Let’s keep stepping to see if there’s a bug somewhere else in the loop. Step Over two more times and you should see both f_0 and f_1 are now equal to 1, which they need to be to calculate the 4th term in the sequence.

You will now see that our code is paused at Line 18. Let’s add i to our watch as it will tell us which term we’re computing in the Fibonacci sequence. Step Over one more time and you’ll see that the value of i is now 4. Now the code is checking to see if the value of i is less than n, the variable we’re using to represent which term in the Fibonacci sequence we’re trying to find. In this example, we’ve hardcoded n as 8 since we’re trying to calculate the 8th term in the sequence. Since 4 < 8, step over again and we’ll continue looping.

Step Over now and you should see that f_2 is now 2, and since i is 4, we know that our code has successfully computed the 4th term in the Fibonacci sequence as 2.

Position 3 4
Value 1 2
Did our function compute this term correctly? Checkmark Checkmark

We could keep stepping over and over again until we find the problem but since we’ve already proven that we’re calculating the 3rd and 4th terms in the Fibonnaci sequence correctly, let’s jump ahead to the 7th term since it’s the last term we calculate before we see the bug.

Using a conditional breakpoint to jump ahead in the for loop

Stop debugging for now by clicking the Stop button or pressing Shift+F5. Right click your breakpoint and select Conditions… or press Alt+F9. This will allow us to set a condition for our breakpoint and we’ll only break when that condition is true.

Screenshot of Visual Studio, adding a condition to the breakpoint you set on Line 19
You can add a condition to a breakpoint and that means you will only break execution when that condition is true.

Enter i == 7 as the condition we want to break on, which means we’ll only break in the last loop before we see the bug. Start your web app again by clicking the green Play button or pressing F5. This time, we’ll break only when i is 7. Here’s what Visual Studio looks like now:

A screenshot of Visual Studio, breaking on line 19 in Fibonacci.js when i is 7
With the conditional breakpoint, we only break when i is 7

Step over once and you will see that we’ve calculated the 7th term in the Fibonacci sequence correctly since f_2 is equal to 8.

Step over three times and we’ll now be paused at i < n. Since i is now 8, i < n actually evaluates to false which means we’re going to break out of the loop. We’ve found the bug: we aren’t going through the loop to calculate the 8th Fibonacci number!

We can fix this bug by changing the calculateFibonacci() function to:

calculateFibonacci() {
  var f_0 = 0;
  var f_1 = 1;
  for (var i = 3; i <= this.state.n; i++) {
    var f_2 = f_0 + f_1;
    f_0 = f_1;
    f_1 = f_2;
  };
  this.setState({
    f_n: f_2
  })
  console.log("The " + (i - 1).toString() + "th Fibonnaci number is:", f_2);
}

Now when i is 8, we’ll actually go through the for loop since since 8 <= 8. Remove the breakpoint, click the Restart button next to the Stop button or press Ctrl+Shift+F5. Click on Fibonacci in the NavMenu and click on the Calculate button to see that we’ve correctly calculated the 8th term in the Fibonacci sequence as 13! We did it!

A screenshot of your app in Microsoft Edge, correctly calculating the 8th Fibonacci term as 13
Your app in Microsoft Edge correctly calculated the 8th Fibonacci term as 13!

 

Attaching to Microsoft Edge

So far in this post, we’ve been using the green Play button in Visual Studio to build our web application, launch Microsoft Edge, and automatically have Edge navigate to our app. Starting in Visual Studio 2019 version 16.3 Preview 3, you can now attach the Visual Studio debugger to an already running instance of Microsoft Edge.

First, ensure that there are no running instances of Microsoft Edge. Now, from your terminal, run the following command:

start msedge –remote-debugging-port=9222

From Visual Studio, open the Debug menu and select Attach to Process or press Ctrl+Alt+P.

A screenshot of a computer Description automatically generated

From the Attach to Process dialog, set Connection type to Chrome devtools protocol websocket (no authentication). In the Connecting target textbox, type in http://localhost:9222/ and press Enter. You should see the list of open tabs you have in Microsoft Edge listed out in the Attach to Process dialog.

A screenshot of a computer screen Description automatically generated

Click Select… and check JavaScript (Microsoft Edge – Chromium). You can add tabs, navigate to new tabs, and close tabs and see those changes reflected in the Attach to Process dialog by clicking the Refresh button. Select the tab you want to debug and click Attach.

The Visual Studio debugger is now attached to Microsoft Edge! You can pause execution of JavaScript, set breakpoints, and see console.log() statements directly in the Debug Output window in Visual Studio.

Conclusion

To recap:

  • We created an ASP.NET Core web application in Visual Studio 2019 version 16.2 and built it in a preview build of Microsoft Edge
  • We added a new component to our web application that contained a bug
  • We found the bug by setting breakpoints and debugging our web app running in Microsoft Edge from Visual Studio!
  • We showed you how to attach the Visual Studio debugger to an existing instance of Microsoft Edge

We’re eager to learn more about how you work with JavaScript in Visual Studio! Please send us feedback by clicking the Feedback icon in Visual Studio or by tweeting @VisualStudio and @EdgeDevTools.

A close up of a screen Description automatically generated

The post Debug JavaScript in Microsoft Edge from Visual Studio appeared first on Visual Studio Blog.

Java on Visual Studio Code October Update

$
0
0

Welcome to the October update of Java on Visual Studio Code! This month, we’re bringing some new features for code navigation, code actions and refactoring, code snippet along with Java 13 support. There’re also improvements in debugger, maven, checkstyle and Test Runner. Please checkout and let us know what you think!

Code Navigation

Go to super implementation
You can now keep track of class implementations and overriding methods by clicking the Go to Super Implementation link when hover.

See the code navigation in action.

Code Actions

A couple new code actions have been added to VS Code for Java recently.

Create non existing package

Now when your package name doesn’t match the folder name, you have the options to either change the package name in your code, or move the folder in file system (even when the destination folder doesn’t exist yet).

Add quick fix for non accessible references

This quick fix helps you resolve non accessible reference

Automatically trigger auto-import on paste

If you paste blocks of code that contain references to classes or static methods and fields that are not yet imported, VS Code now can automatically add missing imports. The new feature is enabled via the java.actionsOnPaste.organizeImports preference in VS Code preferences. If true (the default value), triggers “Organize imports” when Java code is pasted into an empty file.

Refactoring

Inline refactoring

The Inline refactoring lets you reverse the refactoring for a local variable, method, and constant.

Convert for-loop to for-each loop

The enhanced for-loop is a popular feature. Its simple structure allows you to simplify code by presenting for-loops that visit each element of an array/collection without explicitly expressing how one goes from element to element.

Convert anonymous class to nested class

This refactoring allows you to convert an anonymous class into a named inner class.

Deprecation tags for symbols and completions

Java extension now shows source code that references deprecated types or members with a strike-through line.

Code Snippets

Now VS Code Java supports server side code snippets, which means it will provide more code snippets options in a context aware way. You can also also see more detailed information during the preview of code snippets during selection.

Java 13 support

Java 13 is out and VS Code is ready for it. It supports Java 13 through latest Java Extension. For developers use Java 12 with preview features, you will need to upgrade to JDK 13 to keep working with them.

Debugger

Show Run/Debug when hover

In case you don’t like the Run/Debug button on the Code Lens of your main method, but still want easy access to the functionality, you can now configure to disable the Code Lens but still accessible by hover.

In this release, we’ve also made a lot of improvements in error handling and message to help user resolve issues during debugging. One example is to add fix suggestions when a build failure occurs when launching the program.

By clicking Fix... a list of suggestions would be provided.

A more detailed troubleshooting guide is also provided.

Maven Support

Resolve unknown type

Maven extension now supports searching Maven Central to resolve unknown type in your code. You can achieve this easily by clicking the link in hover.

Other improvements in Maven extension includes

  1. Enable search artifact by groupId and/or artifactId when auto completing dependency.
  2. Add inline action buttons in Maven explorer. Add icons for Maven explorer items.

Checkstyle

Enhanced setting configuration command

Checkstyle: Set the Checkstyle Configuration command will now detect potential Checkstyle configuration files and list them. You can also provide a configuration file by directly writing a URL in the input box now.

Setting checkstyle version support

A new command Checkstyle: Set the Checkstyle Version is added to the extension. It supports:

  • List the latest Checkstyle version from main repo.
  • List all the download versions.
  • List all the supported versions.
  • Mark the currently used version with a check symbol.

When the version is too high (with breaking changes) for a user defined checkstyle configuration.

And when the version is too low (with new features) for google_check.xml fetched from checkstyle master branch.

Other improvements

  1. Provide more granularity of progress of loading project. We’re working on making the language server more transparent with what it’s working on behind the scene.
  2. Test Runner updates
    • Add java.test.saveAllBeforeLaunchTest setting to specify whether to automatically save the files before launching the tests.
    • Add java.test.forceBuildBeforeLaunchTest setting to specify whether to automatically build the workspace before launching the tests.

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.

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

Update Visual Studio for Mac for an improved Unity experience!

$
0
0

glasses focused on Visual Studio for Mac and Unity on a computer

The past year has been an exciting one for Unity developers. Unity is the leading real-time 3D creation platform. It’s rooted in game development and expanding into other industries, too. Unity Reflect enables developers to view BIM (Building Information Modeling) data in real-time. Did you know that over 60% of AR/VR content is created with Unity? Likewise, there were also many other innovations for film, automotive, and marketing announced. With all that excitement, you may have missed the debugging improvements and productivity features we’ve made to Visual Studio for Mac.

Update for better debugging on Mac

Earlier this month we talked about the New Editor in Visual Studio for Mac and the shared language services with Visual Studio. That brings a native experience, new features, and closer parity of experiences. Visual Studio Tools for Unity continues that theme by sharing the debugger experience for Unity projects between the two IDEs. This means if you’re working on a Mac, you’ll get an improved experience from the enhancements we made on Windows over previous years. We’re already hearing great feedback from developers on these improvements. That’s not all, let’s look at the other improvements we’ve made to Visual Studio for Mac.

Easily follow best practices and focus on what matters

I’m excited to share that Visual Studio for Mac and Visual Studio now have diagnostics unique to Unity projects. To begin, we’ve started with over a dozen Unity-specific scenarios where both IDEs recognize and offer informational suggestions or refactoring options. Even better, the IDE suppresses general C# diagnostics that don’t apply to Unity projects. For example, it will no longer recommend that you change your [SerializeField] members to readonly and break Unity Inspector links. This means you’ll find less noise in your error list, allowing you to focus on what really matters – scripting your games. To further improve on this, we plan to partner with you and the rest of the community by open sourcing these diagnostics. Together, we’ll improve how the IDE impacts your productivity and best practices.

Visual Studio for Mac showing refactoring of Unity specific diagnostics

Iterate faster with background-building and more

We’re continuing the productivity theme with more quality of life improvements. We noticed that developers don’t always need Visual Studio for Mac to build, which resulted in longer wait times. We made it faster to iterate and debug by reducing the (sometimes) unnecessary work the IDE was doing. In addition, save time with background building using the Automatic refreshing of Unity’s AssetDatabase on save setting. True by default, this triggers Unity to compile in the background while you’re editing in Visual Studio for Mac.

Finally, save some time by using Attach to Unity and Play when starting a debug session. This attaches the debugger to Unity and signals for the Editor to Play all in a single step. You can seamlessly iterate on your debugging workflow right from the IDE.

animated image showing Attach to Unity and Play from Visual Studio for Mac

Ready for a more reliable debugger and productive scripting experience?

Now is a great time to update to the latest version of Visual Studio for Mac to take advantage of all the improvements and time-saving productivity features for Unity projects. We’re continuing improvements for Visual Studio for Mac by listening to your feedback and sharing code between the IDEs. If you’d like to help make these tools better, share your feedback and report issues on Developer Community. Be sure to follow @VisualStudioMac for the latest news and updates!

The post Update Visual Studio for Mac for an improved Unity experience! appeared first on Visual Studio Blog.

New learning resources for building ASP.NET Core apps using Visual Studio for Mac

$
0
0

Visual Studio for Mac has support for the latest C# 8 IntelliSense and code refactoring capabilities across C#, HTML, JS, CSS and Razor files. Along with NuGet package management, source control, debugging and publishing features, Visual Studio for Mac provides the best experience for building .NET Core and ASP.NET Core apps on the Mac.

Getting started with ASP.NET Core in Visual Studio for Mac

If you’re just getting started with ASP.NET Core and Visual Studio for Mac, take your first steps with the Getting started with ASP.NET Core in Visual Studio for Mac tutorial. This tutorial will first walk you through installing Visual Studio for Mac with a one-click setting that will include all tools required for .NET Core and ASP.NET Core development before showing you how to create your first “Hello world!” ASP.NET Core website.

ASP.NET Core Beginners Workshop

In this step-by-step ASP.NET Core Beginners workshop, you will learn the basics of building a simple ASP.NET Core web app that uses Razor pages. This tutorial consists of the following four modules and includes creating the project, adding an Entity Framework model, working with a database and much more:

  1. Creating a Razor Page project
  2. Adding a model to an ASP.NET Core Razor Pages app
  3. Updating the generated pages
  4. Adding search to a Razor Pages app

eShopOnWeb tutorial

If you’re already familiar with ASP.NET Core and are looking for a more realistic sample application, we have you covered with the eShopOnWeb sample application. eShopOnWeb is a sample application demonstrating a layered application architecture with a monolithic deployment model. Head over to extending an existing ASP.NET Core web application for the video tutorials and step-by-step guides for Visual Studio for Mac. This tutorial consists of the following modules:

  1. Getting started with eShopOnWeb
  2. Working with the eShopOnWeb solution
  3. Adding Docker and running it locally
  4. Deploying to Azure App Services

And if you don’t have an Azure account to work on this tutorial, you can get one totally free here! This also comes with over $200 free Azure credits to spend as you see fit.

Additionally, there is also a fantastic 130 page PDF ebook available which goes over all the details of this full sample application that you can download from GitHub.

Thanks for trying out these tutorials and Visual Studio for Mac. If you have any feedback or suggestions, please leave them in the comments below. You can also reach out to us on Twitter at @VisualStudioMac. For any issues that you run into when using Visual Studio for Mac, please Report a Problem.

The post New learning resources for building ASP.NET Core apps using Visual Studio for Mac appeared first on Visual Studio Blog.

Azure IoT Tools October Update: new experience of sending device-to-cloud messages and more!

$
0
0

Welcome to the October update of Azure IoT Tools!

In this October release, you will see the totally new experience of sending device-to-cloud messages and Azure IoT Device Provisioning Service support in Visual Studio Code.

New experience of sending device-to-cloud messages

Z, a software engineer, developed an application about a smart home assistant using Azure IoT service, and he wonders if the application works fine. He wants to send messages indicating time and temperature to IoT Hub from many devices simultaneously each for many iterations. In this case, these messages should be formed in a similar template but the data should be randomly generated for each message. In addition, he wants to send these messages repeatedly, each with a fixed interval, like one second, as is done by true temperature sensors.

This is a very common scenario in IoT development, frustrating a lot of programmers. Here is the good news for Z, and for all of you: You can get rid of all these trivial things with the help of our new feature!

We improved the function in Azure IoT Hub Toolkit (part of the Azure IoT Tools extension pack now) to help you quickly send D2C messages. You only need to specify the device(s), the number of iteration(s), the delivery interval, and the data template. And then we will randomly generate data in your specified format for you and send it out.

For more details, you can check out this blog post to see how to use this feature with the step-by-step instructions.

Support Azure IoT Hub Device Provisioning Service in Visual Studio Code

The Azure IoT Hub Device Provisioning Service is a helper service for Azure IoT Hub that enables zero-touch, just-in-time provisioning to the correct Azure IoT hub without requiring human intervention, enabling customers to provision millions of devices in a secure and scalable manner.

We’re pleased to announce that Azure IoT Tools extension for Visual Studio Code now supports the Azure IoT Hub Device Provisioning Service. You can now view your Azure IoT Hub Device Provisioning Services without leaving Visual Studio Code.

Try it out

Please don’t hesitate to give it a try! If you have any feedback, feel free to reach us at https://github.com/microsoft/vscode-azure-iot-tools/issues. We will continuously improve our IoT developer experience to empower every IoT developers on the planet to achieve more!

The post Azure IoT Tools October Update: new experience of sending device-to-cloud messages and more! appeared first on Visual Studio Blog.


Get Started with Visual Studio for Mac

$
0
0

The first step is often the hardest. Do you find yourself with great ideas for the next awesome app, website, or game but you never get around to making that first leap into the unknown? Today, I’ll help you with that! In this blog post, I’m going to walk through how to get started with Visual Studio for Mac.

Visual Studio for Mac is a macOS-native .NET IDE that focuses on .NET Core, Xamarin, and Unity. It provides many of the same features as Visual Studio for Windows, such as a shared C#, XAML, and web editor. For more information on Visual Studio for Mac, see our documentation.

Installation

Before writing any code, you’ll first need to download Visual Studio for Mac from https://visualstudio.microsoft.com/vs/mac/. Once downloaded, click on the .dmg to launch it. Double-click the installer icon to mount it and start your install experience. Click Open if you’re prompted with security messages.

Once the installer launches, agree to the licensing terms by pressing Continue.

On the component selection screen, illustrated below, you can select the components you want to install. The component you need to install depends on the type of app that you want to create:

  • .NET Core: Allows you to create .NET Core apps and libraries, ASP.NET Core Web apps, and Azure Functions.
  • Android: Allows you to build native Xamarin or Xamarin.Forms apps targeting the Android platform. Selecting this will also install OpenJDK and the latest Android SDK, both of which are required for Android development.
  • iOS: Allows you to build native Xamarin or Xamarin.Forms apps targeting iOS.
  • macOS: Allows you to build native Xamarin.Mac apps.

Note that you’ll need to separately install Xcode if you want to develop for iOS or Mac. I recommend that you do this once Visual Studio for Mac has finished installing.

In this post, I want to create an Azure Function, so I want to select the .NET Core option. Once you click Install, the installation will take approximately 10 minutes depending on how many components you selected and your internet speed.

You’ll be prompted to log in with your Microsoft account if this is your first time launching Visual Studio for Mac. I’m going to log in now to activate my Enterprise license and make it easier to publish my Function to Azure.

if you don’t have an Azure or Microsoft account, you can get one totally free ! This also comes with over $200 free Azure credits to spend as you see fit.

Next, you can configure the IDE to work in a way that works for you through keyboard shortcuts. I’m going to stick with Visual Studio for Mac shortcuts, but the bindings can be changed later through the Preferences menu item.

Visual Studio for Mac will then greet you with the Start Window. From here you can open an existing project from your machine, create a new project, or browse through a list of recent projects. However, before you go any further, you might want to make some changes so the IDE really works for you. This can all be done through the Preferences menu item (Visual Studio > Preferences), similar to Tools > Options in Visual Studio. Personally, I like to change to the dark theme and change my font to something bigger. I also like to show invisible characters on selection.

Create a new project

Now that you have the IDE configured in a way that works for you, you’re ready to start writing code! In the Start Window select New and then select Cloud > General > Azure Functions. In this example, I’m just using the HTTP Trigger, but you can use any template. For more information on other templates, see the Azure Functions documentation on docs.microsoft.com.

Name your project, press Next, set the Authorization level to Anonymous and click Next. If you want to use Git for version control, you can set that while creating the project. Click Create to open your project in Visual Studio for Mac:

Your solution and project will be loaded and should look like the image above. The most important parts of the IDE are described below:

  1. Solution Pad ­– The solution pad organizes all the projects, files, and folders in a solution. You can right-click on any item here to see its context actions allowing you to do things such as add references and publish to azure.
  2. Code Editor – This is where you will likely spend most of your time. This editor shares the same code components with Visual Studio, but with a native macOS UI. For more information in the editor, see the Source Editor docs.
  3. Debug/Run Controls ­– You can use the dropdown menus to set your run configuration, including the device or platform that you want to deploy to. When you’re ready to go, press the triangular “Start” button.
  4. Search Box – Search within your project, commands, or for a NuGet package from here.
  5. Workspace – The workspace consists of a main document area (an editor, designer surface, or options file) surrounded by pads containing useful information for the task at hand.
  6. Additional Pads – Visual Studio for Mac Pads are analogous to Panes in Visual Studio – they’re used to show additional information, tools, and navigation aids. Depending on the type of task, different pads will be displayed automatically. For more information on using pads in your workspace, refer to the Customizing the IDE documentation.

You’re now ready to start writing some code and creating something great!

Going further

Happy Developing! If you have any feedback or suggestions, please leave them in the comments below. You can also reach out to us on Twitter at @VisualStudioMac. For any issues that you run into when using Visual Studio for Mac, please Report a Problem.

The post Get Started with Visual Studio for Mac appeared first on 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.

Update Visual Studio for Mac for an improved Unity experience!

$
0
0

glasses focused on Visual Studio for Mac and Unity on a computer

The past year has been an exciting one for Unity developers. Unity is the leading real-time 3D creation platform. It’s rooted in game development and expanding into other industries, too. Unity Reflect enables developers to view BIM (Building Information Modeling) data in real-time. Did you know that over 60% of AR/VR content is created with Unity? Likewise, there were also many other innovations for film, automotive, and marketing announced. With all that excitement, you may have missed the debugging improvements and productivity features we’ve made to Visual Studio for Mac.

Update for better debugging on Mac

Earlier this month we talked about the New Editor in Visual Studio for Mac and the shared language services with Visual Studio. That brings a native experience, new features, and closer parity of experiences. Visual Studio Tools for Unity continues that theme by sharing the debugger experience for Unity projects between the two IDEs. This means if you’re working on a Mac, you’ll get an improved experience from the enhancements we made on Windows over previous years. We’re already hearing great feedback from developers on these improvements. That’s not all, let’s look at the other improvements we’ve made to Visual Studio for Mac.

Easily follow best practices and focus on what matters

I’m excited to share that Visual Studio for Mac and Visual Studio now have diagnostics unique to Unity projects. To begin, we’ve started with over a dozen Unity-specific scenarios where both IDEs recognize and offer informational suggestions or refactoring options. Even better, the IDE suppresses general C# diagnostics that don’t apply to Unity projects. For example, it will no longer recommend that you change your [SerializeField] members to readonly and break Unity Inspector links. This means you’ll find less noise in your error list, allowing you to focus on what really matters – scripting your games. To further improve on this, we plan to partner with you and the rest of the community by open sourcing these diagnostics. Together, we’ll improve how the IDE impacts your productivity and best practices.

Visual Studio for Mac showing refactoring of Unity specific diagnostics

Iterate faster with background-building and more

We’re continuing the productivity theme with more quality of life improvements. We noticed that developers don’t always need Visual Studio for Mac to build, which resulted in longer wait times. We made it faster to iterate and debug by reducing the (sometimes) unnecessary work the IDE was doing. In addition, save time with background building using the Automatic refreshing of Unity’s AssetDatabase on save setting. True by default, this triggers Unity to compile in the background while you’re editing in Visual Studio for Mac.

Finally, save some time by using Attach to Unity and Play when starting a debug session. This attaches the debugger to Unity and signals for the Editor to Play all in a single step. You can seamlessly iterate on your debugging workflow right from the IDE.

animated image showing Attach to Unity and Play from Visual Studio for Mac

Ready for a more reliable debugger and productive scripting experience?

Now is a great time to update to the latest version of Visual Studio for Mac to take advantage of all the improvements and time-saving productivity features for Unity projects. We’re continuing improvements for Visual Studio for Mac by listening to your feedback and sharing code between the IDEs. If you’d like to help make these tools better, share your feedback and report issues on Developer Community. Be sure to follow @VisualStudioMac for the latest news and updates!

The post Update Visual Studio for Mac for an improved Unity experience! appeared first on 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>