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

Preview Features in Visual Studio

$
0
0

The Preview Features page under Tools > Options > Environment has a new look! We introduced the Preview Features page so that you can easily find these capabilities and be able to control their enablement. The new layout provides more information and an opportunity to give feedback on the features. While these features are in development, you can disable any of these features if you run into issues.  We also encourage you to provide feedback on the capabilities or any issues you find. Some features you may find on this page includes ones in early development that affect existing functionality, ones that are still evolving, and ones that are experiments that are meant to inform future development.

As we continue to iterate on these features, the list of preview features will fluctuate for each Visual Studio release as some features get added into the product and others are cut. You can learn more about the preview features available in each release in the release notes.

The post Preview Features in Visual Studio appeared first on The Visual Studio Blog.


Async loaded .NET projects may impact Visual Studio extensions

$
0
0

In Visual Studio 2019 version 16.3, the CSProj project system (C#/VB non-SDK style) introduces a new way of loading called Partial Load Mode (PLM). After the solution loads, the project system is doing design time builds in the background, leaving the UI responsive and interactive. However, for the time it takes to run the design time build, certain features may not be working as they used to. Extenders, read on.

Today, CSProj projects block the UI thread and wait for design time build and Roslyn initialization before firing the project load event. To further reduce solution load time, CSProj will now fire the project load event immediately after evaluation, since that is early enough to display the project tree in Solution Explorer and provide project and source code files to Roslyn.

Design time builds will happen on a background thread. This means that IntelliSense, code navigation, and designers will be in the Partial Load Mode after solution load and until the design time build results are ready. Most users will not even notice this happening beyond faster loading solutions.

This will match the current behavior of .NET SDK-style projects that has had this capability since Visual Studio 2017. Now the experience is consistent between CSProj and SDK-style projects.

Breaking change

Calls to Roslyn APIs, such as Workspace.CurrentSolution or ProjectItem.FileCodeModel, may return an incomplete code model in PLM because project references are not yet known to Roslyn. You may have to update your extension if it’s calling on the Roslyn API shortly after solution load.

Here’s how:

var operationProgressStatusService = await this.GetServiceAsync(typeof(SVsOperationProgressStatusService)) as IVsOperationProgressStatusService;
var stageStatus = operationProgressStatusService.GetStageStatus(CommonOperationProgressStageIds.Intellisense);

await stageStatus.WaitForCompletionAsync();

Learn more in the OperationProgress sample.

Editor owners should make an explicit decision regarding delaying the initialization of documents when IntelliSense is in progress.

To opt-out of deferring document creation, set the following in the .pkgdef file:

[$RootKey$\Editors\<Editor-type-Guid>]
"DeferUntilIntellisenseIsReady"=dword:00000000

To opt into deferring document creation (this is the current default behavior to avoid breaking compatibility with extensions depending on Roslyn data), set the following in the .pkgdef file:

[$RootKey$\Editors\<Editor-type-Guid>]
"DeferUntilIntellisenseIsReady"=dword:00000001

Test your extension

This change brings a feature currently used by SDK-style projects to the CSProj based ones. As such, it is unlikely going to cause issues for most extensions unless they have different code paths for each of the two project systems. We therefore regard this as low impact for the extension ecosystem, but it could have a big impact on an individual extension.

To find out if this change affected your extensions, download Visual Studio 2019 v16.3 Preview 1 today.

Then drop a .json file containing the below code into %LocalAppData%\Microsoft\VisualStudio\RemoteSettings\LocalTest\PersistentActions

{
  "ActionPath": "vs\\core\\remotesettings",
  "ActionJson": {
    "FeatureFlags": {
      "CPS.UseOperationProgress": 0,
      "CSProj.PartialLoadMode": 1,
      "Designer.PartialLoadMode": 1,
      "Completion.PartialLoadMode": 1,
      "Roslyn.PartialLoadMode": 1
      }
  },

  "TriggerJson": null,
  "MaxWaitTimeSpan": "14.00:00:00",
  "Categories": [
  ]
}

Then restart Visual Studio twice. Yes, twice. This will enable PLM for CSProj based projects.

To revert the feature flags change – delete the .json file and restart Visual Studio twice. Disabling PLM is only an option in the initial preview of Visual Studio 2019 v16.3. The option will be removed in a future update.

The post Async loaded .NET projects may impact Visual Studio extensions appeared first on The Visual Studio Blog.

Visual Studio 2019 version 16.3 Preview 2 and Visual Studio for Mac version 8.3 Preview 2 Released!

$
0
0

Visual Studio version 16.3 Preview 2 and Visual Studio for Mac version 8.3 Preview 2 are available. Because many of the features in this release are a response to Developer Community feedback, we are excited to share our changes. First of all, the latest Preview versions both PC and Mac are available to download from VisualStudio.com. You can also upgrade internally by clicking the notification bell within Visual Studio 2019. Likewise, within the Visual Studio 2019 for Mac IDE, click the Visual Studio > Check for Updates menu item. Our release notes contain many more details, so make sure to take a look.

Be More Productive with Visual Studio Container Tools

Developers creating serverless solutions using Azure Functions (v2) can now add Docker container support to their C# projects. Among other benefits, this makes Azure Functions much more portable. Furthermore, the Container Tools enhance productivity by easily containerizing Azure Functions in a Linux container. To try it out, right-click the project name in Solution Explorer and select Add > Docker Support.

We didn’t stop there! First, the tools add a Dockerfile to the project and automatically builds the Docker image. Next, you can ensure your code works as expected with the added the ability to debug Azure Functions running inside the container. Make sure the debug target is set to Docker to enable this feature. Moreover, you can set breakpoints, inspect variables, and step through your Azure Functions.

Visual Studio 2019 Container Tools
Visual Studio 2019 Container Tools

 

Find What You Need Faster with Installer Search and IDE New Project Dialog Labels

A search box in the Visual Studio Installer’s Individual components tab allows you to quickly locate all available components for installation. In addition, updating Visual Studio will automatically install updates to the Visual Studio Installer without interrupting the update process for the IDE. 

Search box in Visual Studio 2019 Installer
Search Box in the Visual Studio 2019 Installer

 

A New label highlights recently installed project templates, thus, making identification easier. As well, filters show selected values in the New Project Dialog.  You can easily organize recently used templates by pinning, unpinning, and removing them from the Recent project templates list.

New Label and Pin Features in the New Project Dialog
New Label and Pin View of the New Project Dialog.

Productivity Improvements in C++

On the C++ side, we’ve made a variety of productivity improvements including semantic colorization and on-by-default IntelliCode. Next, we’ve added support for parallel builds in MSBuild-based Linux projects that leverage the native WSL experience.  Finally, there are new C++ Core Guideline rules. You can learn more about what’s new on the C++ Team Blog. We frequently release in-depth blog posts delving into these features throughout the week.

Rapidly Iterate on your UIs with the Public Preview of XAML Hot Reload for Xamarin.Forms

In July, we announced the private preview of XAML Hot Reload for Xamarin.Forms in Visual Studio 2019 and Visual Studio 2019 for Mac. XAML Hot Reload enables you to quickly make changes to your XAML UI and see them reflected without requiring another build and deploy. Notably, this feature requires no setup.  Start debugging, change your XAML, and hit Save to go live. Thanks to the amazing feedback from the private preview, we were able to iterate quickly on the tool.  Consequently, we are excited to launch our public preview as part of this release! Start using it today by enabling it in Tools > Options > Xamarin > Hot Reload. Learn more in our blog about XAML Hot Reload for Xamarin.Forms and how to move off the private preview.

XAML Hot Reload for Xamarin.Forms
XAML Hot Reload for Xamarin.Forms

Browser Selection for ASP.NET Core Projects in Visual Studio 2019 for Mac

Also available today is Visual Studio 2019 for Mac version 8.3 Preview 2. As part of our continual focus on making the .NET Core experience better on the Mac, we’ve made it easier to launch your ASP.NET Core project in browsers that aren’t your default macOS browser. For example, you can now select a particular browser to be used for run or debug via the configuration selector when working with ASP.NET Core web projects in Visual Studio 2019 for Mac.

Example of Select Browser Feature
Select Browser Feature in Visual Studio 2019 for Mac

 

We Can’t Wait for you to Give it a Try!

We encourage you to update to Visual Studio 2019 version 16.3 Preview 2 by downloading directly from VisualStudio.com or, likewise, through the notification bell inside of a previous Preview Channel release. Similarly, to get the Preview of Visual Studio 2019 for Mac version 8.3 Preview 2, use the updater via the IDE’s Visual Studio > Check for Updates menu item.

Finally, we love feedback. Visual Studio Developer Community is the most effective way to address issues and suggest improvements. Within out robust community, you can track your issues, suggest a feature, ask questions, and find answers from other developers. On behalf of our entire team, thank you for being so engaged in the life of our product.

The post Visual Studio 2019 version 16.3 Preview 2 and Visual Studio for Mac version 8.3 Preview 2 Released! appeared first on The Visual Studio Blog.

Code, Recent Items, and Template Search In Visual Studio

$
0
0

We are introducing the ability to search for code, recent items, and templates through the new search experience in Visual Studio. These features can all be accessed by one single shortcut (Ctrl+Q) and are currently available in our Preview build (https://visualstudio.microsoft.com/vs/preview/). They will be available in Visual Studio 2019, version 16.3, targeted for the end of September.

Background

One of the focus areas in Visual Studio 2019 is to improve search efficiency and effectiveness. Our journey started with the introduction of the new search experience in Visual Studio component (Ctrl+Q), along with improved search accuracy for menus, commands, options, and installable components.

Code Search

Code search has arrived in the search (Ctrl+Q) control. It is now possible to search for types and members with C# and VB, as well as file search for all languages.  Results will show up as you type your search query, as well as in a dedicated ‘Code’ group accessible via keyboard shortcut or mouse click. Keep an eye out for support of additional languages in the near future!

It is also possible to search by camel-case. This allows you to type in an abbreviation of the code search term with just capitalized letters instead of the full name.

Recent Items Search

Recently opened items can be searched through search (Ctrl+Q) and in the start window (Alt+F, W). Both entry points will be enabled with fuzzy search (to help automatically rectify typos) and the ability to see highlighted matches to your search query in the results.

Template Search

Your favorite templates can now be accessed faster when you are starting up Visual Studio, or already in the IDE!  Templates can be accessed through search (Ctrl+Q) and in the “New Project Dialog” (Ctrl+Shift+N). Both entry points will also be enabled with fuzzy search (to help automatically rectify typos), highlighted matches to your search query in the results, and improved ranking to ensure increased accuracy.

What’s Next?

We are continuing to integrate new and easier access to features, commands, and more through our search (Ctrl+Q) component.  These updates will be shared regularly through future blog posts and release notes. Please share any suggestions below, on developer community: https://developercommunity.visualstudio.com/, or use the hashtag #vssearch on Twitter.

The post Code, Recent Items, and Template Search In Visual Studio appeared first on The Visual Studio Blog.

Find solutions faster by analyzing crash dumps in Visual Studio

$
0
0

When unexpected crashes occur in your managed application you are often left with little evidence of the issue; capturing and analyzing memory dumps may be your last best option. Thankfully Visual Studio is a great tool for analyzing your apps memory dumps! In this post we show you how easy it is to get important insights from a crash dump, and the steps to resolve the issue using Visual Studio.

What is a crash?

There are several different things that might be causing your managed application to crash, the most common are typically unhandled exceptions. These occurs where an exception is raised (First Chance Exception), but your code does not handle it (typically using a try-catch code construct). The exception goes up the stack and becomes, what we refer to as, a Second Chance Exception and crashes your app’s process.

Out of Memory Exceptions, Stack Overflow Exceptions and Execution Engine Exceptions also cause crashes. Stack Overflow Exceptions and Out of Memory Exceptions can occur when your app has insufficient memory space for any function to handle the exception, which again causes the process to crash.

Capturing a memory dump

Memory dumps are a great diagnostic tool because they are a complete snapshot of what a process is doing at the time the dump is captured. There are several tools available for capturing memory dumps including Visual Studio, ProcDump, DebugDiag and WinDbg. The relative strength of each tool depends on your environment and the scenario you are investigating (e.g. high CPU, memory leaks, first/second chance exceptions, etc.).

In the following example, I use the versatile ProcDump command-line utility from Sysinternals to capture a full user-mode dump (-ma) when an unhandled exception (-e) occurs (1145 is the process id of my application).

procdump.exe -ma -e 1145

Once the crash occurs ProcDump immediately writes the memory dump to disk (*.dmp).

Debugging crashes is made easier with the Visual Studio memory tools, so let me show you how I debug a Stack Overflow Exception in my application, and how the tools navigate me directly to the line of code that caused the problem.

Analyzing a crash dump with Visual Studio

I can open my memory dump directly in Visual Studio and will be presented with the Dump Summary page.

Visual Studio - Dump Summary Page

The Dump Summary page highlights several pieces of important information from the dump file including the OS Version and CLR Version. I can also search through a list of the modules that were loaded into memory at the time I captured the memory dump.

In this example the Exception Code and Exception Information state that the problem is “The thread used up its stack”. Simply put, we have a stack overflow exception. Knowing the problem is one half of the equation, but I also want to know the root cause of the issue, and this is where I think Visual Studio shines.

On the right side of the Dump Summary page, I can choose from several Actions, but as this is a managed application, I will select the Debug with Managed Only option and Visual Studio immediately drops me onto the thread and code line that caused the stack overflow exception!

Visual Studio - Crash Dump Exception

I now have a more complete view of the problem, it’s as if I had managed to set a break point at the exact moment of the stack overflow. This also presents me with the opportunity to review my Call Stack (which confirms the issue), review other threads, and even verify the state of any Local variables at that point in time.

In this instance Visual Studio is pointing me to a clear error on my definition of the get property. Instead of returning the private variable m_MyText I have mistakenly returned the public property MyText. This circular reference is the cause of the stack overflow exception.

Finding the root cause of the problem may not always be this clear, so you could also collaborate with a colleague directly from the exception by using Visual Studio Live Share. This gives you the ability to co-debug in real time without teammates needing to set up their environment.

Visual Studio - Start Live Share Session from an Exception

Conclusion

Over the years Visual Studio has developed first class support for handling and debugging memory dumps. It allows you to consider the impact your code is having during the exact moment of a catastrophic failure. Having the ability to investigate a problem with the same tools used for developing code can help save time determining and providing a solution.

Please let us know what you’d like to see next by suggesting feature requests or reporting issues via Developer Community.

The post Find solutions faster by analyzing crash dumps in Visual Studio appeared first on The Visual Studio Blog.

The PowerShell you know and love now with a side of Visual Studio

$
0
0

While we know that many of you enjoy, and rely on the Visual Studio Command Prompt, some of you told us that you would prefer to have a PowerShell version of the tool. We are happy to share that in Visual Studio 2019 version 16.2, we added a new Developer PowerShell!

Using the new Developer PowerShell

We also added two new menu entries, providing quick access to not just the Developer PowerShell, but also for the Developer Command Prompt. These menu entries are located under Tools > Command Line.

C:\Users\rurios\AppData\Local\Microsoft\Windows\INetCache\Content.MSO\7DF5E1ED.tmp

Also, you can access the Developer Command Prompt and Developer PowerShell via the search (Ctrl +Q):

Selecting either of these tools, will launch them in their respective external windows, and with all the predefined goodness (e.g. preset PATHs and environment variables) you already rely on.

Opening them from Visual Studio automatically adjust their directories based on current solution or folder’s location. Additionally, If no solution or folder is open at the time of invocation, their directories are set based on the “Projects location” setting. This setting is located under Tools > Options > Locations.

Try it out and let us know what you think!

We’d love to know how it fits your workflow. Please reach out if you have any suggestions or comments around how we could further improve the experience. Send us your feedback via the Developer Community portal or via the Help > Send Feedback feature inside Visual Studio.

The post The PowerShell you know and love now with a side of Visual Studio appeared first on The Visual Studio Blog.

Make games with Visual Studio for Mac and Unity

$
0
0

Do you want to make games? Maybe you’re like me and thought it sounded too hard. I’ve tinkered in game development for the past few years and learned it can be simpler than I thought. If you’re curious about game development like I am, follow along to learn how you can get started creating your first game using C# with Unity and Visual Studio for Mac.

Getting started

Download and install Unity and Visual Studio for Mac using the Unity Hub. The Unity Hub manages Unity installation, project creation, and links to additional learning resources like sample projects. You can use the Hub to install a version of Unity and create a new project. First, visit the Installs tab, click Add and install the latest Official Release. When that is finished, visit the Projects tab and click the New button to launch the project creation wizard. It’s important to note that project creation is done here instead of inside Visual Studio, though it should feel familiar. Name the project, select 2D, and click Create.

Creating new project in Unity Hub

Once the project is created, the Unity Editor will launch. I recommend spending a few minutes on the Unity Basics workshop at Unity Learn for free. The workshop will introduce you to the layout, what each piece of the UI does, and the information it contains.

Creating a game board for tic-tac-toe

You have a lot of options on how to create a game board for tic-tac-toe – dynamically using code, primitive shapes, and static images just to name a few. A tic-tac-toe board isn’t traditionally dynamic, so let’s keep it simple by using a static image. You can download the image and all the project files on GitHub.

the game board image

You can display a static image in your Unity project by creating a new Image object in the Scene. To do this, right-click in an empty area of the Hierarchy panel and select UI > Image. You should see a new object created named Image. Clicking on it will reveal its Properties in the Inspector panel where you can customize which graphic it displays. Drag the image file for the game board onto the Project panel of the Unity Editor to import it and then select it from the Source Image property of the Image.

animated image showing input of game board into Unity

If you’re having trouble seeing the game board in the Scene view, use your middle mouse button or press Q to quick-select the Hand Tool to pan the view. You can also select the Image object in the Hierarchy view and make sure the Transform property in the Inspector panel has an X,Y,Z position of (0,0,0).

Handling user input with a Button

Next, you can start handling how to accept user input to your game. Again, you have a lot of options, but one simple way is to use a Button. To create a Button, right-click in the Hierarchy and select UI > Button. Use the Scene view to move, resize, and align the button to the upper-left space of the game board image. For now, make one button and I’ll show you how to make a reusable component out of it by using a Unity concept called Prefabs.

animated image showing button creation

You can remove the background on the button by selecting the Button object in the Hierarchy and unchecking the Image component in the Inspector. You can also customize the color and font for the Button in the Inspector to improve visibility.

Implementing gameplay using C#

Your scene is now set up and you’re ready to write code to tell the buttons what to do. Create a new C# script from Unity by right-clicking in the Project panel and selecting Create > C# Script and naming it GameManager. Repeat this process and create another script named ClickableSpace. This creates two C# classes that inherit from a special Unity class – MonoBehaviour. The MonoBehaviour class provides Unity-specific functionality to the object which we’ll use Visual Studio for Mac to explore.

Editing C# with Visual Studio for Mac

Double-click on the GameManager class to open the file in Visual Studio for Mac. The Tools for Unity provide you with C# editing, debugging, IntelliSense support, productivity enhancements and are included in Visual Studio for Mac by default.

Exploring the Unity API

To create an entry point for your game logic, you can add a special Unity message function to the GameManager class. The syntax of this method is important, but you can always explore what’s available using the MonoBehaviour Scripting Wizard (Command+Shift+M) and learn about the special Unity message functions that can be called during the lifecycle of a script. In this case, the Awake method is perfect for initializing the game board and will be called when we start the game.

The GameManager class handles the logic for keeping track of all board space values, checking if there is a win or draw condition, whose turn it is, and restarting the game.

public class GameManager : MonoBehaviour
{
    [SerializeField]
    GameObject[] boardSpaces;

    [SerializeField]
    GameObject restartButton;

    Text[] boardSpaceTexts;

    string player1 = "x";
    string player2 = "o";
    int moveCount = 0;
    int maxMoveCount = 9;

    public string CurrentPlayer { get; set; } = "x";

    private void Awake()
    {
        restartButton.SetActive(false);
        boardSpaceTexts = new Text[boardSpaces.Length];

        for (int i = 0; i < boardSpaces.Length; i++)
        {
            boardSpaces[i].GetComponentInChildren<ClickableSpace>().GameManager = this;
            boardSpaceTexts[i] = boardSpaces[i].GetComponentInChildren<Text>();
            boardSpaceTexts[i].text = string.Empty;
        }
    }

    public void CompleteTurn()
    {
        moveCount++;

        if(boardSpaceTexts[0].text == CurrentPlayer && boardSpaceTexts[1].text == CurrentPlayer && boardSpaceTexts[2].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[3].text == CurrentPlayer && boardSpaceTexts[4].text == CurrentPlayer && boardSpaceTexts[5].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[6].text == CurrentPlayer && boardSpaceTexts[7].text == CurrentPlayer && boardSpaceTexts[8].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[0].text == CurrentPlayer && boardSpaceTexts[3].text == CurrentPlayer && boardSpaceTexts[6].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[1].text == CurrentPlayer && boardSpaceTexts[4].text == CurrentPlayer && boardSpaceTexts[7].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[2].text == CurrentPlayer && boardSpaceTexts[5].text == CurrentPlayer && boardSpaceTexts[8].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[0].text == CurrentPlayer && boardSpaceTexts[4].text == CurrentPlayer && boardSpaceTexts[8].text == CurrentPlayer)
        {
            GameOver();
        }
        else if (boardSpaceTexts[2].text == CurrentPlayer && boardSpaceTexts[4].text == CurrentPlayer && boardSpaceTexts[6].text == CurrentPlayer)
        {
            GameOver();
        }
        else if(moveCount >= maxMoveCount)
        {
            Draw();
        }
        else
        {
            if (CurrentPlayer == player1)
                CurrentPlayer = player2;
            else
                CurrentPlayer = player1;
        }
    }
    void Draw()
    {
        Debug.Log($"It's a draw!");        
    }

    void GameOver()
    {
        Debug.Log($"Player {CurrentPlayer} wins!");
        restartButton.SetActive(true);
    }

    public void Restart()
    {
        moveCount = 0;
        restartButton.SetActive(false);

        for (int i = 0; i < boardSpaceTexts.Length; i++)
        {
            boardSpaceTexts[i].text = string.Empty;
        }
    }
}

You might notice the special [SerializeField] attributes on the fields. This Unity-specific attribute signals that the Unity Editor should show this property in the Inspector so it can be customized from the Editor. To see that in action, switch back to the Unity Editor. Right-click in the Hierarchy panel and select Create Empty. Name the new object GameManager and click it to select it. With it selected, click the Add Component button at the bottom of the Inspector panel and choose your GameManager class. Only MonoBehaviour classes can be added to a GameObject.

With your GameManager added to the object, select it again. You should see the GameManager component in the Inspector panel with two customizable properties for Board Spaces and Restart Button. Unity automatically transformed the naming of the fields with [SerializeField] to be Title Case.

Saving time with Prefabs

Earlier, you created a single Button object to handle user input. You need eight more of these to complete the board. You could copy paste the one you already created, but what if you wanted to make a change to it? Then you would have to update each object in the scene. Prefabs let you create reusable objects that let you make a change to a single instance and choose to propagate those changes to all children copies of it. First, set up what a button should do for your game.

Adding behavior to a button

Next, define what happens when a space is selected by implementing some logic in the ClickableSpace class. Switch back to Visual Studio for Mac and copy this code into it:

using UnityEngine;
using UnityEngine.UI;

public class ClickableSpace : MonoBehaviour
{
    public GameManager GameManager { get; set; }

    public void SelectSpace()
    {
        GetComponentInChildren<Text>().text = GameManager.CurrentPlayer;

        GameManager.CompleteTurn();
    }
}

Head back to the Unity Editor to finish configuring the button.

Linking the C# script to the Button object

Select the Button you created in the Hierarchy view and click the Add Component button at the bottom of the Inspector panel. Choose your ClickableSpace class. Next, click the + icon under the On Click() section in the Inspector to add a new event handler for the Button. Click the small circle icon to open the Select Object window where you can select the Button object. This tells the Button component to look for event handlers on itself, and you can choose the ClickableSpace.SelectSpace method we just created from the drop-down.

Now that a single Button is configured, drag it to an empty area of the Project panel to save it as a Prefab. You’ll know it’s a success because it will be blue in color and have a special icon. To add more instances of your new Prefab to the scene, drag them from the Project panel to the Hierarchy. Do this for each of the remaining spaces on the board.

Connecting the final pieces

Remember the inspector fields on GameManager? You can now configure those by first clicking on the GameManager object in the Hierarchy panel. You’ll need to view the Inspector for the GameManager but select a few different objects while doing that. Normally, every time you select an object the Inspector panel will update with that objects properties. To prevent that, click the small Lock icon in the upper right of the Inspector panel to stay focused on the GameManager. Now, select all of the Button objects in your scene with Shift + left-click and drag them onto the Board Spaces variable. This fills in the array with the Button objects.

Animated image of buttons dragged to GameManager object

When the GameManager detects a win or draw condition, it will unhide a button that can be used to restart the game. Create that button now using the same methods as before, except there is no need to make a prefab this time. Like before, register an On Click method to the Restart function of the GameManager class.

Playing the game

Test out your game by clicking the Play button at the top of the Unity Editor. Click around on some of the board spaces to trigger the Button objects and test out your game. If you’ve hit an error, you can debug it using Visual Studio for Mac.

animated image of the tic tac toe game play in the Unity editor

Debugging your game

A powerful feature of Tools for Unity in Visual Studio for Mac is the ability to set breakpoints and debug C#. If you’re familiar with debugging in any other .NET project, you’ll know what to expect. Set your breakpoints and press the Play button in Visual Studio for Mac to attach the debugger to Unity. Switch over to Unity and make sure the Play button is pressed. When the code with your breakpoint is executed, it will halt and you’ll be able to step through code using the debugger controls. You can attach the debugger and play Unity all in a single step directly from Visual Studio for Mac by first selecting the Attach to Unity and Play configuration next to the Play button. This can save you some time and make the workflow smoother.

animated image showing debugging in Visual Studio for Mac

Conclusion

If you’ve made it this far – congratulations! You just created tic-tac-toe using your skills in C#, .NET, and Visual Studio for Mac. I encourage you to make the game your own. Here are some ideas:

  • Add a scoring system
  • Animate when a space is selected
  • Play sounds
  • Make it truly multiplayer

Unity Learn has a great tutorial for creating tic-tac-toe using only Unity UI components, too. If you have any feedback or questions about working with Unity and Visual Studio for Mac, reach out to the team on the Visual Studio for Mac Twitter.

The post Make games with Visual Studio for Mac and Unity appeared first on The Visual Studio Blog.

Getting Started with GitHub Actions in Visual Studio

$
0
0

GitHub Actions uses a clean new syntax for expressing workflows based on YAML scripts—so you can edit, reuse, share, and fork them like code. By including actions in your repositories, others would be able to easily test and build projects using the same actions used on the original projects.

GitHub Actions allows you to build, test, and deploy applications in your language of choice including .NET, C/C++, and Python. Feel free to explore all the supported languages. This blog will go over the steps needed to add actions to a new Visual Studio project and automate deployment to a Linux environment using Visual Studio.

As of the date of this post GitHub Actions is still a beta feature. In order for you to try it out, you will need to sign up for the beta first. Feel free to jump to step 4 if you already have a project published on GitHub.

1- Start by creating any new Visual Studio project. For this blog, I am creating a new Flask Web Project. For more information on how to get started with Flask in Visual Studio take a look at this documentation: Get started with the Flask web framework in Visual Studio

New Flask Project
New Flask Project

 

2- Let’s make sure that our app runs locally without any issues by selecting Debug > Start Debugging (F5) or by using the Web Server button on the toolbar.

 

3- Use the Add to Source Control option on the right-hand side of the status bar to Publish to GitHub as shown below.

Team Explorer
Team Explorer

 

4- To add an actions script, create a new YAML file for your workflow in a new directory called .github/workflows as shown below.

Actions File
Actions File

 

For this tutorial I am using the following basic YAML script that allows us to deploy our Flask web app on the latest version of Ubuntu using four different Python versions. To learn more about writing GitHub Actions take a look at the following two links:

name: Python package

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      max-parallel: 4
      matrix:
        python-version: [2.7, 3.5, 3.6, 3.7]

    steps:
    - uses: actions/checkout@master
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt

 

5- After saving your YAML script, make sure to commit and push your changes using Team Explorer’s Changes and Sync. After that visit your GitHub repository by clicking on the URL that shows under the GitHub title as shown below.

Team Explorer - Home Page
Team Explorer – Home Page

 

6- On your GitHub repository click on Actions and select your workflow to see more details about your workflow. As you can see below, our code runs successfully on the four different versions of Python.

GitHub Actions
GitHub Actions

 

GitHub Actions Workflows
GitHub Actions Workflows

 

7- With GitHub Actions you can quickly build, test, and deploy code from GitHub repositories to the cloud with Azure. To do that lets create a new workflow by making an Azure_Deploy.yml file under the same directory .github/workflows as shown below:

on: push

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    # checkout the repo
    - uses: actions/checkout@master
    
    # install dependencies, build, and test
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
        
    # deploy web app using publish profile credentials
    - uses: azure/appservice-actions/webapp@master
      with: 
        app-name: MyFlaskApp
        publish-profile: ${{ secrets.azureWebAppPublishProfile }}

 

8- Deploying to Azure requires an Azure account. If you don’t have one, you can get started today with a free Azure account! And follow these steps to configure your deployment credentials:

    • Download the publish profile for the WebApp from the portal. For more information on how to do that take a look at Create the publish settings file in Azure App Service
    • Define a new GitHub secret under your repository settings and paste the contents for the downloaded publish profile file into the secret’s value field. Make sure the title of your secret matches the publish-profile value on your YAML script. In my case it is azureWebAppPublishProfile

 

9- The last step would be to commit and push your changes using Team Explorer’s Changes and Sync sections as shown on step-5. After that, visit actions on your GitHub repository to make sure that all of your actions are working correctly.

GitHub Deploy Actions Workflows
GitHub Deploy Actions Workflows

 

To learn more about deploying your GitHub code to the cloud take a look at the GitHub Actions for Azure blog and try out the GitHub Actions for Azure. If you encounter a problem during the preview, please open an issue on the GitHub repository for the specific action.

 

We Need Your Feedback!

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

The post Getting Started with GitHub Actions in Visual Studio appeared first on The Visual Studio Blog.


Get more fresh content on Visual Studio’s YouTube channel

$
0
0

Whether you like short how-to videos or longer deep dives, the Visual Studio YouTube channel has something for you. With fresh content published several times a week, there are always new and interesting videos to help you stay current on everything Visual Studio.

The channel receives content from Channel 9, the Visual Studio product teams, and other sources. It’s a great one-stop-shop for staying up to date on the latest news and tutorials on Visual Studio.

The videos range from very short 3-minute screen capture tutorials to longer technical deep dives in the TV show format. Here’s a screenshot of some of the latest videos, to give you an idea of the type of content you can expect to find:

Related channels

Not that into Visual Studio? No problem, there’s a channel for every type of developer:

And your favorite products:

Hit the subscribe button

So, head on over to the Visual Studio YouTube channel and make sure to subscribe so you won’t miss out on any new videos. Are there any types of videos you’d like to see us make? If so, let us know in the comments below.

The post Get more fresh content on Visual Studio’s YouTube channel appeared first on The Visual Studio Blog.

Azure IoT Tools August Update: IoT Plug and Play tooling public preview and more!

$
0
0

Welcome to the August update of Azure IoT Tools! 

In this release of August, we have made several feature and improvements! 

IoT Plug and Play tooling public preview 

On August 22, 2019, we released a preview of IoT Plug and PlayIoT solution developers can start using Azure IoT Central or Azure IoT Hub to build solutions that integrate seamlessly with IoT devices enabled with IoT Plug and Play. IoT Device partners will also benefit from investments in developer tooling to support IoT Plug and Play. The Azure IoT Tools extension for Visual Studio Code adds IntelliSense for easy authoring of IoT Play and Play device models. It also enables code generation to create C device code that implements the IoT Plug and Play model and provides the logic to connect to IoT Central, without customers having to worry about provisioning or integration with IoT Device SDKs. The new tooling capabilities also integrates with the model repository service for seamless publishing of device models. For details, checkout this announcement for more information about IoT Plug and Play. You could also checkout this quickstart guide on how to use a device capability model to create an IoT Plug and Play device. 

Arm64 preview in Azure IoT Tools extension for Visual Studio Code 

With the release of IoT Edge 1.0.8Azure IoT Edge is supported on ARM64 IoT Edge devices. Last month, we have released the support of developing and debugging ARM64 IoT Edge C# custom modules in Visual Studio Code. In this month, we are glad to share with you that we have added support for more languages including C, Node.js and JavaFor more details, you could checkout this blog post for more information. 

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 August Update: IoT Plug and Play tooling public preview and more! appeared first on The Visual Studio Blog.

Visual Studio 2019 for Mac version 8.3 Preview 3, now available

$
0
0

We’re in the endgame of finishing the Visual Studio for Mac 8.3 release, and we need your help testing out Preview 3 today. To use it, install the latest Visual Studio 2019 for Mac release, and then update to the Preview channel. This is one of the most exciting releases for us to date, with a focus on some top feedback themes we’ve heard our avid users:
• Improving the ASP.NET Core developer workflow (including brand new web editors).
• Enabling the development of libraries targeting multiple .NET frameworks.

Along with this work, we’ve fixed numerous bugs and improved the overall IDE performance. You can read all about the work to date (including Previews 1 & 2) in our release notes.

Optimizing the ASP.NET Core developer workflow  

major focus of the Visual Studio for Mac v8.3 release is optimizing the ASP.NET Core developer workflow. We’ve heard from hundreds of .NET Core developers and focused our efforts on addressing the community’s feedback. In this preview, we’re introducing new web editors based on the same editor (and code) as Visual Studio on Windows, and support for managing NuGet packages across multiple projects at solution level. This is in addition to support for file nestinglaunchSettings.json, and launch in target browser released in prior Preview releases. 

All web editors, now updated

Since the initial release of Visual Studio 2019 for Mac in April, we’ve been working to update all the editors within the IDE. In v8.1, we introduced the new C# editor. v8.2 brought the new XAML editor to Visual Studio for Mac. In v8.3, we’re updating all the web editors! The new web editors are based on the same native UI as the C# and XAML editors and provide all the advanced features recently introduced to Visual Studio for Mac, such as multi-caret editing, RTL support and native input supportIn addition to these highlevel editor features, the new web experience is also powered by the same core as Visual Studio on Windows, so you can expect the same language service features that make Visual Studio such a productive IDE. These language services provide vital features, such as IntelliSense as well as code formatting, syntax highlighting and navigation support.   

The new editors support a variety of web files, including HTML, CSHTML, JS, CSS as well as CSHTML embedded support for JS, C# and CSS! This means you get all features as appropriate for the file types you are working within, so you will see advanced IntelliSense in JS, CSHTML and more. We have also improved support for LESS and SASS files. The web experience in Visual Studio for Mac has never been better! 

JavaScript editor with code completion suggestions, in Visual Studio for Mac

NuGet solution-level package management 

We’ve also added support for NuGet solution-level package management functionality. As the number of projects grow within a solution, it becomes difficult to keep packages updated across the projects. With the improvements we made in this area, now it’s easier to consolidate to a single version of packages across the solution. 

NuGet package management dialog, showing package consolidation in Visual Studio for Mac

Multi-Targeting 

When building modern .NET libraries, it’s common for library authors to target a variety of platforms and devices. .NET Standard is the best solution for adding support for multiple platforms, but sometimes it’s necessary to use APIs in .NET frameworks that don’t support it. In that casethe best solution is to use multi-targeting to build for multiple .NET frameworks. Recently, we included support for working on projects that support multi-targeting, and in Preview 3 we’ve continued to improve upon that experience. When editing code in one of these projects, you can use a Target Framework drop down at the top of the editor window to focus your editing experience on a specific target framework. 

Dependencies are also now displayed broken down by target framework: 

Viewing project dependencies separated by Target Framework, in Visual Studio for Mac

Additionally, when running your project you can choose the target framework against which to debug.

Let us know what you think!

Please download and try out the v8.3 Preview 3 release today, by updating to the latest release in the Preview channel! We’ll continue our work on improving the other code editors in the IDE as well as the features we planned on our roadmap.

If you run into any issues with the v8.3 Preview release, please use the Help > Report a Problem menu in the IDE to let us know about it. You can also provide suggestions for future improvements by using the Provide a Suggestion menu.

report a problem menu

Finally, make sure to follow us on Twitter at @VisualStudioMac to stay up to date on the latest Visual Studio for Mac news and let us know what your experience has been like. We look forward to hearing from you!

The post Visual Studio 2019 for Mac version 8.3 Preview 3, now available appeared first on The Visual Studio Blog.

Refactoring made easy with IntelliCode!

$
0
0

Have you ever found yourself refactoring your code and making the same or similar changes in multiple locations? Maybe you thought about making a regular expression so you could search and replace, but the effort to do that was too great? Eventually you probably resigned yourself to the time-intensive, error prone task of going through the code manually.

What if your developer tools could track your edits and learn about the repeatable changes you were making? After only a couple of examples they would spot you doing something repetitive and offer to take the remaining actions for you? With Visual Studio 2019 version 16.3 Preview 3 we are happy to announce that refactorings can now be enhanced by IntelliCode. IntelliCode spots repetition quickly and suggests other places in your code where you might want to apply that same change, right in your IDE:

 

Try it now

Refactoring is a preview feature of IntelliCode, so when you get Visual Studio 2019 version 16.3 Preview 3  it will be off by default. Visit the Tools-Options page, IntelliCode General tab, Preview features area, and switch C# refactorings to “Enabled” to turn it on.

Once you change this setting, close any files you may have open, then restart Visual Studio:

How to turn on the refactorings feature in tools-options

How it works

Under the hood, IntelliCode looks at each of your edits as you type. It uses PROSE (PROgram Synthesis by Example) to synthesize generalized edit scripts that can take your code from the “before editing” state to the “after”. When IntelliCode discovers that it can apply one of these scripts elsewhere in your code (which can be based on as few as 2 examples in your code), we let you know via the Visual Studio lightbulb in the margin or when hovering the affected code, and through green “squiggles”. The lightbulb offers actions to apply the refactorings for you. The underlying technology is similar to the Excel’s Flash Fill feature and is described in this research paper. More details will be presented at the upcoming OOPSLA 2019 conference.

This isn’t just tracking text changes – IntelliCode is aware of the syntactic structure of your code. This syntactic awareness allows it to detect cases where the variable names in your refactoring examples differ but the essential structure of the change is the same:

Illustration showing how IntelliCode can detect patterns syntactically and offer suggestions

If you don’t like a suggested change you can select the ignore option on the lightbulb, and we won’t bother you about that detected pattern again unless you recreate it.

Let us know what you think!

We would love to hear about your experiences as you try this new feature. Good or bad, they will help us improve. Please raise issues and comments via Visual Studio “report a problem” .  We’re interested to hear feedback about the recommendations themselves, the performance of the feature, or any capabilities you might be missing. When sending your feedback it would be really useful if you can share details of what was detected and what sort of edits you were making; we’ll follow up.

The post Refactoring made easy with IntelliCode! appeared first on The Visual Studio Blog.

Say hello to the new Visual Studio terminal!

$
0
0

 

Building on the momentum from the recently announced Developer PowerShell, we are excited to share the first preview of the new Visual Studio terminal. This new preview experience is part of Visual Studio version 16.3 Preview 3.

 

Rather than build everything from scratch, the Visual Studio terminal shares most of its core with the Windows Terminal. For you, that translates into a more robust terminal experience, and faster adoption of new functionality.

 

Enabling the new Visual Studio terminal

To try the terminal preview, you’ll first need to enable it by visiting the Preview Features page. Go to Tools > Options > Preview Features, enable the Experimental VS Terminal option and restart Visual Studio.

Once enabled, you can invoke it via the View > Terminal Window menu entry or via the search.

Creating Terminal profiles

Launching the terminal automatically opens an integrated PowerShell instance. However, you can customize the startup experience by using shell profiles.

With shell profiles, you can target different types of shells, invoke them using unique arguments, or even set a default shell that better fits your needs.

In future updates, we plan to optimize the experience by pre-populating the terminal with a few basic profiles. In the meantime, you can manually add additional profiles on the terminal’s Options page.

 

As an example, here’s how you can set profiles for some popular options:

Developer Command Prompt

Shell location:
C:\Windows\System32\cmd.exe
Arguments:
/k "C:\Program Files (x86)\Microsoft Visual Studio\2019\IntPreview\Common7\Tools\VsDevCmd.bat"

Developer PowerShell

Shell location:
C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments:
-NoExit -Command "& { Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview_master\Common7\Tools\vsdevshell\Microsoft.VisualStudio.DevShell.dll'; Enter-VsDevShell -InstanceId f86c8b33}"

Note: You’ll need to update the above argument to match your specific configuration. You can extract the argument information by looking into the Target string for the Developer PowerShell shortcut.

WSL

Shell location:
C:\WINDOWS\sysnative\wsl.exe

 

Try it out and let us know what you think!

While we are excited to share this preview, we want to ensure a solid experience before we enable this experience in the release version of Visual Studio. As a result, the terminal will initially only be available in the preview versions of Visual Studio 2019.

As next steps, we’ll look to deliver improvements around rendering (the terminal currently needs to be resized to render correctly), accessibility and theming. We’ll also add new productivity boosters such as multiple terminal instances and deeper integration with Visual Studio.

We’d love to know how it fits your workflow and how we could further improve your terminal experience. Send us your feedback via the Developer Community portal, or via the Help > Send Feedback feature inside Visual Studio.

The post Say hello to the new Visual Studio terminal! appeared first on The Visual Studio Blog.

Java on Visual Studio Code September Update

$
0
0

Welcome to the September update of Java on Visual Studio Code!

There’re a lot we’ve been working on during the summer which we’d like to share with you now. You will see new refactoring and code action features such as move member and class, live linting as well as improvements for Debugger, Test Runner and Maven. We’ve also improved getting started experience with our new Pack release.

Refactoring and Code Actions

Move refactoring support

The Move refactoring lets you move packages and classes between the source roots of a project, class members to other classes and inner classes to upper hierarchy levels.

For example, you can perform the move refactoring on static method if it is used more in another class than in its own class.

You can also move a class to another package.

And move inner class to new a new file.

Other new code actions

A couple of other code actions and quick fixes are also included in the latest release

  1. Invert local variable lets you change the sense of a Boolean variable to the opposite one.
  2. Convert lambda to anonymous class (as we already support Convert to lambda expression).
  3. Create unresolved types which covers create simple class/enum/interface/annotation in various scenarios.

Linting and Checkstyle

We now support Live Linting and batch check for Java through Checkstyle extension so you no longer need to save the file one by one to update the check result. 

See live linting in action.

And batch check is now also available.

Other improvements in Checkstyle extension include

  1. Open problems panel when click the status icon in the status bar
  2. Automatically detect potential Checkstyle configuration files when using command to set the configuration

Debugger

One of the changes we’ve recently made is to use integrated terminal as default debug console. With this change, you no longer need to make specific configuration to allow the console to accept your input. The only drawback of this change is the integrated terminal doesn’t support expression evaluation. In order to use this feature, you would now need to change the console to use the Internal Console in launch.json.

"console": "internalConsole"

If you’d like to use that setting each time you launch a Java program, you can configure it as a global user setting with java.debug.settings.console.
In order to make run and debug even easier, another change we’ve made is to add menu entries to Run and Debug a Java application when you right click a Java file in file explorer or opened editor.

Test Runner

More JUnit 5 annotations are now supported by VS Code Java Test Runner.

Support JUnit 5 meta-annotations and composed annotations.

Support JUnit 5 @TestTemplate.

Getting Started Experience

For developers new to Java or new to VS Code, we’re now providing a refreshed Getting Started experience. Once you’ve installed the Java Extension Pack, you can use the command Java: Getting Started to get the quick start guide.

The new Getting Started view provides a quick start guide as well as tips for code editing and debugging. It also has an FAQ to answer some of the most asked questions. We plan to add more section to it in future.

One of the other hurdle for new Java developer is to get the JDK right. For that, we’ve also upgraded our Configure Java Runtime page which now shows the JDK configuration we detect with priority order and allow you to jump to the setting by a simple click. If a working JDK configuration is not detected, this page will be presented automatically, otherwise you can also use the command Java: Configure Java Runtime to get there.

With those new features, we’ve also released our new version of VS Code Installer for Java. You can try it at https://aka.ms/vscode-java-installer-win with improved downloading and installation experience.

External contributions

As VS Code becomes popular among Java developers, we’re getting more and more issues reported. They’re very helpful and please keep them coming! In addition, we’d like to express our gratitude for those from the community who spend more time with us to make the product even better.

  • Contribution from pi1024e: User face change: say “Do not show again” instead of “Not show again”. https://github.com/microsoft/vscode-java-debug/pull/630
  • Contribution from Christian Lutz thccorni: Typo ‘gourpId’ in hoverProvider. https://github.com/microsoft/vscode-maven/issues/368

There’re also a few pull requests from community currently under review. We’d like to thank all of you to help us build better tool for the Java community.

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 September Update appeared first on The Visual Studio Blog.

How to debug and profile any EXE with Visual Studio

$
0
0

Have you ever needed to debug or profile an executable (.exe file) that you don’t have source for or can’t build? Then the least known Visual Studio project type, the EXE project, is for you!

In Visual Studio you can open any EXE as a ‘project’. Just go to File->Open->Project/Solution and browse to the .exe file. Like you would if it was a .sln file. Visual Studio will then open that EXE as a project. This feature has been around for a long time. It works on all currently supported Visual Studio versions and the docs for it are at  ‘Debug an app that isn’t part of a Visual Studio solution‘.

.Opening an exe file with Visual Studio 2019

Debugging

Just as with a normal project you can start debugging with F5, which will launch the EXE and attach the debugger. If you want to debug startup you can launch with F11, which will launch the EXE and stop on the first line of user code. Both of these options are available on the context menu for the EXE project in Solution Explorer window as illustrated below:

Starting debugging from the solution node

For debugging will need to have symbols, PDB files, for the EXE and any DLLs you need to debug. Visual Studio will follow the same process to try to obtain symbols as it does when debugging a normal project. Since it’s not likely that the PDB files were distributed alongside the EXE you might want to locate them from a build drop or, better yet, from a symbol server. More information and best practices for symbols can be found in this blog.

To effectively debug you’ll also need the source code that was used to build the EXE, even for just a few files that you care about. You’ll need to locate those files and open them in Visual Studio. If the source code isn’t the exact same as the source code that was built the EXE Visual Studio will warn you when you try to insert a breakpoint and the breakpoint won’t bind. That behavior can be overridden from the Breakpoint Settings peek window. In the settings peek window click on the Must match source link text and then check the box to allow mismatched source, as illustrated below. Of course, with mismatched source you never really know what’s going to happen, so use at your peril.

Setting the breakpoint to not require exact source.

If the EXE was built with SourceLink enabled then information about the source will be included in the PDBs and Visual Studio will try to download the source automatically. This is a really good reason to use SourceLink with your projects. Even if you have a local enlistment you might not have the same version that was used to build the binary. SourceLink is your sure-fire way to make sure that the right source is linked with the right binary.

If you can’t obtain any source code you still have a couple of options:

  1. Use a tool to decompile the assemblies back into C#, which you can recompile into new assemble to patch the old one.
    1. ILSpy is a great choice for this, but there’s plenty of other good paid and free tools out there.
  2. Use the Disassembly tool window in Visual Studio.
    1. The Source Not Found document has a link to view disassembly. Be warned, if you’re use to debugging C# code the disassembly view is a tool of last resort.

Lastly, if you need to pass in any arguments to the EXE that’s being debugged you can configure them along with other options in the Project Properties page (Right Click->Properties on the project node in solution explorer).

Project properties page for the exe project.

Profiling

You can also use the profiling tools with the EXE by launching them from the Debug -> Performance Profiling. From the launch page of the profiling tools you can select what tools to use against the EXE. More information on profiling can be found in this docs (https://docs.microsoft.com/en-us/visualstudio/profiling/profiling-feature-tour?view=vs-2019).

Launching the performance profiler for an exe project.

Conclusion

That’s it. A brief overview of how you can use Visual Studio to debug and profile applications that you aren’t building and might not even have source for. So, next time you need to debug or profile an EXE don’t forget you can open it as a Solution in Visual Studio!

 

 

The post How to debug and profile any EXE with Visual Studio appeared first on The Visual Studio Blog.


.NET Core Support and More in Visual Studio 2019 version 16.3 – Update Now!

$
0
0

As we continue to deliver on our mission of any developer, any app, any platform, it’s always an exciting time on the Visual Studio team when we get to launch major features.  Today we’ve released Visual Studio 2019 version 16.3 which contains support for the release of .NET Core 3.0, significant C++ improvements, and great updates for Python developers as well as TypeScript 3.6 support. You can download version 16.3 on visualstudio.com or update from the Visual Studio installer.

We are also releasing the first preview of Visual Studio 2019 version 16.4 which can be downloaded from visualstudio.com. For additional information on what’s in Preview 1, check out the release notes.

So, grab your favorite fall beverage, click the update button in the Visual Studio Installer or download the latest version, and while the update commences, peruse this overview of what’s new and awesome in this release.

.NET Core 3.0

Visual Studio version 16.3 includes support for .NET Core 3.0.  Why is .NET Core 3.0 exciting?  Here’s what Scott Hanselman has to say:

“.NET Core is open source and cross-platform.  You can use .NET Core to run server applications on Windows, Mac, a dozen Linuxes, iPhone, IoT devices, and more! .NET Core is open source, cross-platform, and fast as heck. And it’s out today. Fully supported. Open source, yes, but fully supported with the full weight of Microsoft.

Together with .NET Core 3.0, C# 8.0 is out today!  It’s also open source and is the language that many of you will use to make your applications.  Visual Studio 16.3 supports both C# 8.0 and .NET Core 3.0, and provides tooling support for all new .NET Core 3.0 features.  This includes support for building desktop applications with Windows Forms and WPF, client-side web applications with Blazor and back-end microservices using gRPC.

While .NET Core 3.0 is cross-platform, you can also create platform-specific applications!  This means your apps can “light up” with operating system-specific features.  For example, if you want to talk to a light sensor on a Raspberry Pi with .NET Core, you can!

Taking this to obvious next steps, you take (if you want) a 15-year-old existing Windows Forms or WPF app and swap out it’s “engine” for all new .NET Core 3.0 and reap the benefits. It’s a brain transplant that can make your application faster, easier to deploy, and easier to maintain but it will still be a Windows app using your existing code.

You might think because .NET Core 3.0 includes support for Windows Forms and WPF that it might be heavier or take up more space.  In fact, this support exists in optional NuGet packages.  Your .NET Core apps are smaller than ever (and will get even tighter in future releases) and run amazingly well in containers/Docker and in the cloud where density is needed.”

There are so many exciting features in .NET Core 3.0. Head over to the .NET Blog to read all of the details.

NOTE if you are working with .NET Core 3.0, you will need to use Visual Studio version 16.3 or greater.

.NET Core Desktop Application Support

.NET Core 3.0 includes full support for Windows Forms and WPF applications. 

In Visual Studio 2019 version 16.3, you have the familiar tooling you expect for building and publishing WPF applications, including the WPF XAML designer, tools for creating MSIX packages for WPF applications and more. 

Also, we are happy to announce that the first preview version of the Windows Forms Designer for .NET Core projects is available today! We are in the very early days of the designer, so it’s available as a Visual Studio extension (“VSIX”). Once you install the .NET Core Designer, Visual Studio will automatically pick the correct designer based on the target framework of your application. This preview of the designer supports a subset of controls, but more will be added every month in further preview versions. That’s why we don’t recommend porting your Windows Forms applications to .NET Core yet if you need to use the designer on a regular basis.

In addition to supporting WPF and Windows Forms with .NET Core, we recently introduced support for WPF and Windows Forms in Visual Studio App Center as a public preview.  This blog post will give more details.

Please reach out with your suggestions, issues, and feature requests. We appreciate your engagement!

Download .NET Core Windows Forms Designer Preview 1 

.NET Applications in Containers

Developers building Azure Functions (v2) can now add Docker container support (Linux only) to their C# projects. This can be done by right-clicking the project name in Solution Explorer and selecting Add > Docker Support. In addition to adding a Dockerfile to your project, the debug target will be set to “Docker” which means when you debug your Function app it will happen inside the running container.

.NET Applications in Containers
.NET Applications in Containers

 

Also, be sure to check out the Visual Studio Container Tools Extensions (Preview) for a glimpse of even better tooling coming in Visual Studio 2019 version 16.4 Preview 2.

.NET Productivity

Since C# 8.0 and .NET Core 3.0 are out today, Visual Studio tooling is updated to make you more productive when using these new tools.  Here’s a taste of the dozens of refactorings and happiness features we’ve added.

You can wrap chains of fluent calls with a refactoring.  To try this out, place your cursor on a call chain and press Ctrl + . to open the Quick Actions and Refactorings menu.

Wrap Chains of Fluent Calls
Wrap Chains of Fluent Calls with Quick Actions and Refactoring

 

Now you are also able to rename a file when renaming an interface, enum or class.  To do so, just place the cursor in the class name and type Ctrl + R, R to open the Rename dialogue and check the Rename file box.

Easily rename a file when renaming interface, enum or class
You can easily rename a file when renaming an interface, enum, or class.
.NET in version 16.4 Preview 1

If you are a developer wanting to try the cutting-edge tools in .NET, check out the features in Visual Studio 2019 version 16.4 Preview 1.  It includes new .NET Core 3.0 app publishing options:  Ready to Run (Crossgen), Linking, and SingleExe (make tiny .NET Core 3.0 apps) as well as new templates. Again, the release notes contain a larger list of features.

C++

Visual Studio 2019 version 16.3 brings new productivity features to all C++ developers and enhancements to the C++ cross-platform development experience.

Beyond those two aspects (which we’ll dive into next), those of you following our C++ Standard conformance efforts will be glad to hear that in the C++ Standard Library (STL), several new preview features are available under the /std:c++latest switch, including C++ Concepts! Concepts are predicates that can be used to express a generic algorithm’s expectations on its template arguments.

C++ Productivity

There are several improvements for C++ developers to be excited about. For example, you can toggle line comments using the keyboard shortcut Ctrl + K, Ctrl + / to easily set aside code you don’t want to compile just yet.

Set Aside Code to Compile for Later
Set Aside Code to Compile for Later

 

The IntelliSense completion list is now more powerful than ever with a built-in filter that considers type qualifiers. For example, if you type after const std::vector, the list will now filter out functions that would illegally modify it, such as push_back.

Intellisense Improvement
Intellisense Build-in Filter that Considers Type Qualifiers

 

Next, a new default semantic colorization scheme allows you to better understand your code at a glance. You will notice new colors in the following areas: functions, local variables, escape characters, keyword – control (if/else/for/return), string escape characters, and macros. There is also an option to differentiate between global and member functions and variables. The screenshots below illustrate new colorization for the blue and dark themes of Visual Studio:

The Colorization for the blue and dark themes of Visual Studio

 

Lastly, we turned IntelliCode on by default for C++ developers for AI-powered IntelliSense, added a way to configure the Call Stack window to hide or show template arguments for improved readability, and added some new CppCoreCheck rules to Visual Studio Code Analysis, including a new ‘Enum Rules’ rule set and additional const, enum, and type rules.

C++ Cross-Platform

Switching gears from productivity to cross-platform development, we made several user experience improvements. First of all, for CMake projects, you can now install missing 3rd party libraries that your application depends on straight from the IDE, using Vcpkg, our cross-platform C++ library manager. You will need to have Vcpkg installed on your machine, have run ‘vcpkg integrate install’ to set it up, and have a vcpkg toolchain file in your CMake project to take advantage of this feature. When you activate this feature, Vcpkg will download your library from source, compile it for you, and make it available for use for your future builds. This quick action will also install the package’s upstream dependencies for you.

Install Missing 3rd Party Libraries

 

Next, the CMake Settings Editor has been updated with better settings descriptions and links to documentation so it is easier than ever to configure your project. Below is a screenshot of the new experience:

CMake Editor Updates
CMake Settings Editor has been Updated

 

There were a few more improvements to the cross-platform development experience. This includes environment variable support for configuring debug targets and custom tasks in launch.vs.json and tasks.vs.json. In addition, remote header copies for Linux projects now run in parallel for improved performance. Visual Studio’s native support for WSL also supports parallel builds for MSBuild-based Linux projects. Lastly, you can now specify a list of local build outputs to deploy to a remote system with Linux Makefile projects.

Python

With this release you will enjoy a revamped testing experience for your Python projects. Not only there is now support for the popular pytest framework, but the support for the unittest framework has been improved to provide you with a more seamless testing experience. Let’s walk through some of those improvements from configuring & executing tests, to debugging, and finally code coverage.

Configuring and Executing Tests

Let’s look at how you do this for Python projects, and then for the Open Folder scenario.

To enable the testing experience within Visual Studio for Python projects, right-click on the project name and select the ‘Properties’ option. This option opens the project designer, which allows you to configure tests by going to the ‘Test’ tab. From the ‘Test’ tab, simply click the ’Test Framework’ dropdown box to select the testing framework you wish to use, as you can see in this screenshot:

Test Framework Dropdown Box
Test Framework dropdown box for configuring testing.

 

Pressing CTRL+S initiates test discovery for the testing framework you have selected, whether that is pytest, or unittest.

For Open Folder scenarios, the testing experience relies on the PythonSettings.json file for configuration. This file is located within your ‘local settings’ folder as shown here:

Configuring the .json file
Configure the PythonSettings.json file for Open Folder scenarios.
Code Coverage for Tests

Below you can see how Code Coverage is supported for unittest and pytest in both project mode and open folder scenarios:

Code Coverage is supported for unittest and pytest
Code Coverage supported for unittest and pytest in both project mode and open folder scenarios.

 

To enable Code Coverage for your currently opened project/folder, you must install the Python package, coverage, into your active virtual environment. Then, you can analyze Code Coverage by going to the Test Explorer and selecting Analyze Code Coverage for All Tests.

Read our Python documentation for further details on making the most of the new testing experience.

Version 16.4:  Our Next Servicing Baseline

When version 16.4 moves to the release channel later this year, it will be the second “servicing baseline” for Visual Studio 2019. We introduced servicing baselines with Visual Studio 2019 to provide large organizations increased flexibility over when they adopt the new features in minor version updates included in the Enterprise and Professional editions. Unlike versions 16.1, 16.2, and 16.3, which received servicing fixes only until the next minor update is releases, we offer fixes for servicing baselines for an extended period. We will service version 16.4 for 12 months after the next servicing baseline is declared.

As version 16.0 is the first servicing baseline, it will continue to receive servicing fixes for one year after version 16.4 releases later this year. Full details can be found at Visual Studio Product Lifecycle and Servicing.

Update now and let us know what you think

If the above summary got you as excited as we are, head on over to visualstudio.microsoft.com/downloads to get the latest releases. As always, you can continue to use the Report a Problem tool in Visual Studio or head over to the Visual Studio Developer Community to track issues or suggest a feature. We continue to make many tweaks and improvements along the way to address your feedback, and rest assured that we will continue doing so in releases going forward.

The post .NET Core Support and More in Visual Studio 2019 version 16.3 – Update Now! appeared first on Visual Studio Blog.

Visual Studio 2019 for Mac version 8.3

$
0
0

Today, we’re releasing version 8.3 of Visual Studio 2019 for Mac – our .NET IDE, built natively for macOS. This release is predominantly driven by your feedback: delivering a faster and more reliable ASP.NET Core web developer experience, reducing the time between coding and testing Xamarin UI changes, and including a few “delighters” to make your experience even better. 

These are the 3 top requests we’ve focused on in this release: 

ASP.NET Core developers will find this release really exciting. In addition to the items mentioned above, we’ve made the following improvements for your daily coding lives: 

Mobile developers using .NET and Xamarin also have new features to look forward to: 

Finally, v8.3 also includes several “delighters” across the product such as tab pinning, support for launchSettings.json in .NET Core projects, and an easier way to get started with your preferred keyboard shortcuts.  

In this post, we’ll cover a few of the highlights mentioned above. To learn about all the changes in this release, be sure to check out therelease notes. 

Support for .NET Core 3.0, .NET Standard 2.1, and C# 8.0 

This release officially supports .NET Core 3.0. .NET Standard 2.1, and C# 8.0Whether you install the IDE for the first time or update from a previous release, the .NET Core 3.0 SDK will be installed automatically for you. You can create, build, run, debug, and publish .NET Core 3.0 applications. 

When you’re editing C# 8.0 files in Visual Studio for Mac, you’ll have access to new C# 8.0 features like readonly members and switch expressions. All the existing editor functionality, such as IntelliSense and Quick Fixes, will also continue to work. For more info on what’s new in C# 8.0, head over to the docs to read about  What’s new in C# 8.0. 

NuGet solution-level package management 

We’ve also added support for NuGet solution-level package management functionality, a top requested item on the Developer Community site. As the number of projects grow within a solution, it becomes harder to keep same version of packages across the projects. With the improvements we made in this area, now it’s easier to consolidate to a single version of packages across the solution. 

NuGet package management dialog, showing package consolidation in Visual Studio for Mac

Multi-Targeting 

When building modern .NET libraries, it’s common for library authors to target a variety of platforms and devices. .NET Standard is the best solution for adding support for multiple platforms, but sometimes it’s necessary to use APIs in .NET frameworks that don’t support .NET Standard. In that case, the best solution is to use multi-targeting to build for multiple .NET frameworks. Recently, we included support for working on projects that support multi-targeting, another highly requested feature. When editing code in one of these projects, you can use a Target Framework drop down at the top of the editor window to focus your editing experience on a specific target framework. 

 

Dependencies are also now displayed broken down by target framework, and when running your project you can choose the target framework against which to debug.  

All web editors, now updated 

A major focus of the Visual Studio for Mac v8.3 release is optimizing the ASP.NET Core developer workflow. We’ve heard from hundreds of .NET Core developers and focused our efforts on addressing the community’s feedback. In this release, we’re introducing new web editors based on the same editors (and code) as Visual Studio on Windows, and support for managing NuGet packages across multiple projects at the solution level.  

 Since the initial release of Visual Studio 2019 for Mac in April, we’ve been working to update all the editors within the IDE. In v8.1, we introduced the new C# editor. v8.2 brought the new XAML editor to Visual Studio for Mac. In v8.3, we’re updating all the web editors! The new web editors are based on the same native UI as the C# and XAML editors and provide all the advanced features recently introduced to Visual Studio for Mac, such as multi-caret editing, RTL support, and native input support. In addition to these high-level editor features, the new web experience is also powered by the same core as Visual Studio on Windows, so you can expect the same language service features that make Visual Studio such a productive IDE. These language services provide vital features, such as IntelliSense as well as code formatting, syntax highlighting, and navigation support.   

The new editors support a variety of web files, including HTML, CSHTML, JS, JSON, and CSSThis also brings support for a common request, IntelliSense and syntax highlighting for languages embedded in .cshtml: JavaScript, C#, and CSS! This means you get all features as appropriate for the file types you are working within, so you will see advanced IntelliSense in JS, CSHTML and more. We have also improved support for LESS and SASS files. The web experience in Visual Studio for Mac has never been better! 

Typing CSS into a .cshtml file in Visual Studio for Mac, showing suggestions for CSS properties while typing. 

ASP.NET Core: File Nesting support 

We’ve also added automatic File Nesting for ASP.NET Core projects. The auto file nesting rules applied are the same as what you find in Visual Studio. With file nesting enabled, you can focus better on the files that you edit most frequently. Generated files, and less frequently edited files will be nested under other related files. Check out the screenshot of the Solution Pad showing the nesting behavior. 

The solution pad open, showing an Index.cshtml.cs file nested underneath an Index.cshtml file

 

Debugging ASP.NET Core apps on multiple web browsers 

Finally, for ASP.NET Core development, we’ve added one more popular feature request – support for targeting multiple web browsers. Now, when debugging an ASP.NET Core app, you can pick the browser in which you want to run your app. This makes it a lot easier to make sure you’ve got just the right experience in each browser your app supports. 

Drop down menu in Visual Studio for Mac showing target web browser selection  

XAML Hot Reload for Xamarin.Forms Preview 

We are making XAML Hot Reload for Xamarin.Forms available in this release as a preview. XAML Hot Reload enables you to rapidly iterate on your Xamarin.Forms UI without needing to build and deploy. When debugging your app, you can now edit your XAML and hit save to see the changes immediately reflected on the running appThis works on all valid deployment targets, including simulators, emulators, and physical devices. To get started, check out the XAML Hot Reload documentation. 

Editing .xaml files in VS for Mac, seeing the UI update automatically in the simulator while editing.

Android 10, Xcode 11, and iOS 13 Support for Xamarin 

With Visual Studio for Mac version 8.3, Xamarin developers can take advantage of the latest-and-greatest features from both Google and Apple.  

Android 10 introduces a variety of new features such as dark theme, gestural navigation, and optimizations for foldable devices. iOS 13 provides the next generation of existing features like SiriKit and ARKit, while also introducing new features such as Dark Mode and Sign In with AppleTo learn more about how you can use these new features in your apps, head over to our Android 10 with Xamarin and Introduction to iOS 13 documentation pages. 

New “Delighters” for all developers 

A common request we’ve heard from developers who use both Windows and macOS is to support more of the same keyboard shortcuts as Visual Studio on Windows. Visual Studio for Mac has long had support for configurable “Key Bindings” that allow you to select from a set of pre-defined profiles and customize shortcuts to your liking. You can configure these from the Preferences > Key Bindings screen. 

In this release, we’ve added a new prompt on first launch of the IDE, to make it easier for you to customize the IDE to work the way you want it. 

Selecting Visual Studio for Mac keyboard shortcuts, with a list of shortcuts for Visual Studio (Windows), Visual Studio Code, or Xcode

Another helpful improvement added into this release is support for document pinning. Now, you can take any document in the IDE, right-click on it, and choose to “pin” it to remain open on the left-hand side of all your document tabs. 

Selecting to pin a tab, and then unpinning it

 

Download today 

Download the Visual Studio 2019 for Mac v8.3 release todayor if you have it installed already – updatto the latest release using the Stable channel 

If you run into any issues with the v8.3 release, please use the Help > Report a Problem menu in the IDE to let us know about it. You can also provide suggestions for future improvements by using the Provide a Suggestion menu. 

report a problem context menu

Finally, make sure to follow us on Twitter at @VisualStudioMac to stay up to date on the latest Visual Studio for Mac news and let us know what your experience has been like. We look forward to hearing from you! 

The post Visual Studio 2019 for Mac version 8.3 appeared first on Visual Studio Blog.

Tracepoints: Debug with less clutter

$
0
0

Have you ever accidentally shipped a log statement to production? Are you tired of cleaning up log statements while debugging? The tool to solve your problems has been here all along!

Do you use log statements to debug?

Let’s be honest we have all done it at some point. Whether it be Debug.WriteLine(), console.log(), print(), etc. logging output to the console is a common practice that leads to what some might call “immediate feedback”. But what seems like a simple and enjoyable approach to debugging quickly turns into a lot of cleanup work because the log statements are now littered through your code. After all no one wants to see your log statements shipped to production.

Do you find code cleanup tedious?

If so, then Tracepoints are a great tool you can use in Visual Studio. This feature allows you to log desired information without modifying your code and is initialized in a similar fashion to breakpoints. When you are done debugging simply click on a tracepoint to remove it.

The solution has been here all along

Tracepoints are not a new feature. In fact, they have existed in Visual Studio since 2005, but we feel that many developers do not know about this capability. In this post, we will go over what tracepoints can do, how to use them, and why they are a feature worth using.
For an even more thorough explanation of tracepoints, see our docs page: https://docs.microsoft.com/en-us/visualstudio/debugger/using-tracepoints?view=vs-2019.

Let’s look at an example

The following program is a for loop with a counter variable increasing by one each time the loop iterates. Let’s say we wanted to print out the value of counter for each iteration of the for loop. One solution is to use a log statement such as Debug.WriteLine(counter) to print out the values. Let’s see what that would look like:

While that certainly accomplished this simple task, it required us to modify our code and will necessitate we delete the statement later so that the log statement is not shipped to production. You also will need to delete log statements periodically even before shipping to production as you add newer log statements so that the Output window in Visual Studio is not cluttered with irrelevant information. Furthermore, there is no conditional logic to when these statements print such as only printing the “counter” variable when it is an odd number. Adding conditions would require more code, further complicating the debugging process and creating more cleanup for later. We believe that there is a better way to handle these situations.

Tracepoints to the rescue

The GIF below demonstrates how to initialize a tracepoints.

Notice how when you add a message in the “Show a message in the Output window field” under the actions menu you are not modifying your original code in any way. By this I mean you do not need to add print statements or functions such as Debug.WriteLine() in the middle of your code just to see information in Visual Studio’s Output window. This allows you to get the desired information in Visual Studio’s Output window that you wanted before without compromising the readability of your code. Furthermore, when you are done debugging simply click on the tracepoint once to delete it. Simple as that. If you forget to delete a tracepoint don’t fret about the extraneous output showing up in production. That’s because tracepoints only exist locally on your machine.

You can add conditions too

What about those cases earlier when we wanted conditions? Let’s say we wanted every other count or the value of counter during a specific iteration of the for loop. Well it turns out we can add conditions too in a similar fashion to conditional breakpoints.


There are three condition types:

  • Conditional Expression: Output message displayed only under certain conditions such as “counter >= 5”.
  • Hit Count: This condition allows you to output only after a pre-specified number of times the line the tracepoint was set on has been executed.
  • Filter: Tracepoint will only be activated on specified devices, processes or threads.

Adding these conditions will not modify your original code and unlike breakpoints does not stop the program and require a user to repeatedly step into or over a program (as long as the “Continue code” box under Actions is checked).

Tips and tricks

Currently tracepoint messages go to Visual Studio’s Output window. It is easy to lose track of the messages amongst the many other things that get sent to the same window.

  • If you right click within the Output window, you can turn off classes of messages such as Exception Messages, Step Filtering Messages, Process Exit Messages, etc by clicking on them. By turning off some of these classes of messages that you may not want, it will make it easier to focus on your tracepoint output.
  • If your current task requires you keep all the classes of messages on, another trick to make it easier to find your output is to prefix your action’s message with a unique phrase like “AA”. Once you start debugging your program you can use the CTRL-F command in the Output window to search for the prefix you set and it will take you straight to your output message (see image below).

  • To temporarily disable a tracepoint without deleting it is to hit “Shift + left click” on the tracepoint.
  • To view, disable, and/or delete all the Tracepoints and Breakpoints in your current file at once hit Debug -> Windows -> Breakpoints to access the Breakpoints window.

When logging might be useful

In some cases, a language’s log statement such as Debug.WriteLine() in C# may be a better choice than using tracepoints. For example, if you want to always see some output in the debugger that persists beyond the current debug session then Debug.WriteLine() might be the right option in that context. Tracepoints do not persist beyond a single (or possibly a few) debug sessions. Another consideration is efficiency. Tracepoints are also less efficient at debug time so if they too slow for your needs try a log statement instead. Lastly, tracepoints have limitations in what data they can collect because they can only virtually execute function evaluations. Despite some of these restrictions, we still feel like tracepoints are a great tool to have in your debugging toolkit.

Wrapping up

In conclusion, tracepoints are a great way to keep your code clean during debugging. You will not need to modify your original code or remove statements later. If you want conditions you can add those as well without needing continuously stop and step through your program. We hope you enjoy using tracepoints and that they streamline your workflow! For more information on tracepoints please check out our docs page: https://docs.microsoft.com/en-us/visualstudio/debugger/using-tracepoints?view=vs-2019

If you have any feedback, please feel free to reach out to us. We would love to hear from you!

The post Tracepoints: Debug with less clutter appeared first on Visual Studio Blog.

Watch the latest Visual Studio extensibility videos

$
0
0

We have been posting several short videos about Visual Studio extensibility to our YouTube channel in the past couple of months. We chose the topics for the first videos, but now it’s time for you to tell us what videos to record next.

The idea behind the short videos is to introduce extensibility concepts you may find useful. Perhaps you’ll even go ahead and implement some of them in your own extensions.

Often the concepts aren’t new but relatively unknown to Visual Studio extension authors. There’s always something to learn and we’ve found that short videos are a great way to show and tell.

If you haven’t yet, make sure to check out the first batch of extensibility related videos, which include:

Find these and more videos on the Visual Studio YouTube channel in the Tips & Tricks playlist.

What videos should we do next?

We’d love to make more videos about Visual Studio extensibility and could use your help to come up with the right topics. So, if you want us to make a video covering any specific topic, let us know in the comments below. Please remember that the topic should fit a 5-minute video format.

The post Watch the latest Visual Studio extensibility videos appeared first on Visual Studio Blog.

Azure IoT Tools September Update: Azure IoT Edge remote debug and more!

$
0
0

Welcome to the September update of Azure IoT Tools!

In this September release, you will see the improved remote debugging experience and Azure IoT Device Provisioning Service support in Visual Studio. Additionally, an iotedge-compose tool has been released for you to port compose-based apps to Azure IoT Edge.

Debug Azure IoT Edge C# remote Linux container

With the version 16.3 release of Visual Studio 2019, the remote debugging experience in Linux docker containers has been improved. The feature is intended to help generic container debugging. We can leverage it in Azure IoT Edge module scenario to help developers debug remote Azure IoT Edge C# Linux module container with ease.

For more details, you can check out this blog post to see how to use this feature in your Azure IoT Edge module debugging with the step-by-step instructions.

Support Azure IoT Hub Device Provisioning Service in Cloud Explorer

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 Visual Studio Cloud Explorer now supports the Azure IoT Hub Device Provisioning Service. You can now access your Azure IoT Hub Device Provisioning Services without leaving Visual Studio. You can check out this blog post for more details.

Convert Docker Compose projects to Azure IoT Edge solutions

If you are a container expert, you may want to port your existing Docker Compose application to Azure IoT Edge. We are glad to introduce iotedge-compose to help you convert your Docker Compose project to an Azure IoT Edge solution. iotedge-compose is a CLI tool written in Python. After you have installed Python, all you need to do is to install it through pip:

pip install iotedge-compose

Then, check out this blog post to see how to convert your Docker Compose file or project.

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 September Update: Azure IoT Edge remote debug and more! 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>