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

Snapshot Debugging with Visual Studio 2017: Now Ready for Production

$
0
0

[Hello, we are looking to improve your experience on the Visual Studio Blog. It will be very helpful if you could share your feedback via this short survey that should take less than 2 minutes to fill out. Thanks!]

Earlier this year we previewed the Snapshot Debugger, a tool that enables you to debug web apps running in production in Azure. With the general availability of Visual Studio 2017 Enterprise 15.5 this week, Snapshot Debugger is now available for you to get started. Read more about how here.

Snapshot Debugging Overview

If an issue happens in production, you may find yourself digging through logs or attempting to repro the issue in a local environment. Often, the logs may be insufficient, or a local repro may be hard if not impossible to setup. The Snapshot Debugger enables a safe, non-invasive way for you to use the Visual Studio debugger you know and love directly against the production environment in Azure where the issue is happening.

The Snapshot Debugger works by taking a snapshot of the state of your app at specified lines of code where you set Snappoints. While traditional breakpoints would halt your live server when hit and stop it from serving requests; Snappoints quickly capture state, including locals, watches, and the call stack while your app continues to run. This means that you can debug the actual live, running app, without impacting the experience your customers have while using the app. You can read a further overview of how the Snapshot Debugger can be used effectively in production here.

You can capture snapshots at specified lines of code in by using Snappoints, as shown below. Additionally, you can capture snapshots automatically when exceptions happen in your app by setting up Application Insights.

Using Snappoints

Snapshot Debugging has almost no performance impact on the performance of your production service or the experience end users see while using your application. In the rest of this blog post, we’ll measure the performance impact of using the Snapshot Debugger against a live app with a quick case study using performance load testing.

Production Performance while Debugging

I ran a performance load test to measure the impact of Snapshot Debugging on a deployed app. In a 5-minute load test, I simulated 1,000 users continuously hitting an Azure App Service running the MusicStore ASP.NET Core app. Roughly two minutes into the test, I attached the Snapshot Debugger and set a Snappoint that is hit in the MusicStore app’s home page. I then opened the resulting Snapshot and spent the remaining three minutes inspecting variables and the state at the point of time the snapshot was captured.

Debugging in Production - Performance

Debugging in Production - Throughput

During the load test, my Azure App Service plan was hovering at 80-90% CPU Usage. However, even when I started Snapshot Debugging, the performance and throughput did not degrade. Prior to attaching the Snapshot Debugger, the average response time for my server was between 2.0 and 2.4 seconds, and the throughput was between ~3,400 and ~4,000 requests per second. Attaching the Snapshot Debugger at the 2-minute mark caused no change or degradation to average response time, requests per second, or any other performance metric.

I was able to inspect the full state of my app at a snapshot, yet the performance of the app was unaffected while I was debugging. If I were to attach a live debugger and set a breakpoint, the requests per second would have dropped to zero, as the app would halt when the breakpoint was hit!

The Tech behind Snapshotting

The Snapshot Debugger achieves this minimal overhead by intelligently capturing state at the location you’ve set a Snappoint. When you place a Snappoint in your app, the Snapshot Debugger forks your app’s process and suspends the forked copy, creating a snapshot. You then debug against this snapshot, which sits in-memory on your server. The snapshot is not a copy of the full heap of the app – it’s only a copy of the page table with pages set to copy-on-write. The Snapshot Debugger only makes copies of pages in your app if the page gets modified, minimizing the memory impact on your server. In total, your app will only slow down by 10-30 milliseconds when creating snapshots. As snapshots are held in-memory on your server, they do cost ~100s of kilobytes while they are active, as well as an additional commit charge. The overhead of capturing snapshots is fixed and should therefore not affect the throughput of your app regardless of the scale of your app.

The Snapshot Debugger will only capture one snapshot per Snappoint placed in your code to further limit the performance impact. You can modify a Snappoint’s settings to add conditions to specify when the snapshot should be captured or increase the number of snapshots captured. Additionally, you can set several Snappoints in your app to capture Snapshots at different lines and switch between them. The Snapshot Debugger will ensure these snapshots come from the same end user session, even if there are thousands of requests hitting your app.

When you are finished using the Snapshot Debugger, you can hit the stop debugging button in Visual Studio. Hitting stop will detach the Snapshot Debugger and freeing all existing snapshots from memory on your server.

Try out the Snapshot Debugger

The Snapshot Debugger is available in Visual Studio 2017 Enterprise version 15.5 and greater. Currently, the Snapshot Debugger supports ASP.NET and ASP.NET Core apps running in Azure App Services. The first time you use the Snapshot Debugger you will be required to restart your Azure App Service, but no redeployment is necessary.

Nikhil Joglekar, Program Manager, Visual Studio
@nikjogo

Nikhil is a program manager working on Azure diagnostics tooling. Since joining Microsoft two years ago, Nikhil has worked on the Snapshot Debugger, Visual Studio Profiler, and Azure SDK.


Post-Connect(); 2017 Visual Studio Partner Webinar Series

$
0
0

[Hello, we are looking to improve your experience on the Visual Studio Blog. It will be very helpful if you could share your feedback via this short survey that should take less than 2 minutes to fill out. Thanks!]

Earlier this week, we released 13 Visual Studio partner webinars that build off of some of the major announcement areas of Connect(); 2017 and provide applications of developer tools that, literally, ‘connect’ with the latest and greatest from Azure, SQL Server 2017, and Visual Studio.

VS Partner Logos

Developer Tools for Application Innovation

Scott Guthrie introduced advancements in developer productivity in the cloud, including the GA of Visual Studio App Center, Visual Studio Live Share, and Visual Studio Tools for AI. Telerik by Progress kicks off this series by drilling down into the cross-platform mobile development updates from Connect(); and introducing their app built with Xamarin and Azure’s Computer Vision API. New to our mobile ecosystem, CloudRail walks through the more than 50 APIs they have made available to developers using Xamarin, including Universal APIs targeted at enhancing developer productivity. Aqua discusses how early development choices can help developers eliminate security risks, configuration mistakes, and vulnerabilities in Docker images, and Developer Express walks through object-relational mapping for .NET Core 2.0.

Enterprise-Class DevOps

Brian Harry announced innovations across the development pipeline, including the RTM of Team Foundation Server 2018, a new ‘getting started’ experience with Azure DevOps Projects, and Visual Studio partner GitHub’s announcement of support for GVFS. In this webinar series, Chef details how to use the configuration management features of the Chef Integration extension for Visual Studio Team Services to develop and test a cookbook. 7pace walks through the value of precise time management in conjuncture with Team Foundation Server 2018 to optimize a team’s agile development, and Mobilize.Net illustrates easy migration of legacy client/server apps, using AI and machine learning as an on-ramp to DevOps on Azure.

Tools for Open Source Development

You also saw some killer demos on what the open source community can do with Visual Studio Code (enabling Java debugging and Azure Functions working with Visual Studio Code for Python developers). WhiteSource‘s webinar discusses the difference between detecting and fixing proprietary and open source vulnerabilities and how to automate open source security practices. And through its content delivery network and open edge computing, nuu:bit talks about their integration with Azure CosmosDB.

Developing for the Database

We also demoed how easy it is to create apps for SQL, Windows, .NET and open source frameworks like MySQL, PostgreSQL, Linux, and Java/Node.js using the Microsoft Data Platform. CData‘s webinar drills down into how users can now use powerful analytics applications like Microsoft PowerBI to report directly on live in-memory Redis data structures with their ODBC Drivers. Redgate Software shows how to build database DevOps into your continuous integration and automated release management pipelines. And finally, Syncfusion shows you how to leverage their UI dashboards with Big Data Platforms on Azure.

This is just the beginning. Grab a few hours and a friend or two and dive into the rich content our partners have made available on Channel 9.

Laura Quest, Marketing Manager, Visual Studio Partner Program
@LadyQuestaway

Laura Quest works across the Visual Studio family of products with partners who build extensions published in the Visual Studio Marketplace and components published in NuGet. She was part of the Xamarin Business Development team and now works within the Cloud Application Development, Data, and AI organization.

Visual Studio 2017 Version 15.6 Preview

$
0
0

[Hello, we are looking to improve your experience on the Visual Studio Blog. It will be very helpful if you could share your feedback via this short survey that should take less than 2 minutes to fill out. Thanks!]

A few days ago we released Visual Studio 2017 version 15.5 and an update to Visual Studio for Mac, and today we are releasing the first preview of the next minor update: Visual Studio 2017 version 15.6. You can either download the Preview, or, if you already have it installed, click on the notification you’ll receive in the product informing you that the update is available.

This latest preview contains new features, productivity improvements, and other enhancements that address our customers’ feedback. Read the feature highlight summary below, and check out the Visual Studio 2017 version 15.6 Preview release notes for a more detailed description of what’s new and how to use the new goodness contained in this Preview.

Diagnostics

The CPU Usage tool (available during F5 Debugging in the Diagnostic Tools window and in the ALT-F2 Performance Profiler) now displays source line highlighting based on the CPU consumption of specific lines of code. When you view the Call Tree or Caller/Callee views of the CPU Usage tool, the source for the selected function is displayed with CPU consumption indicated on each source line of the function. If CPU performance of a function is a concern, now you can determine specifically what source lines of the function are responsible for the CPU consumption when the function is executing. This feature requires that source information be included in the generated PDB which is controlled by the project settings. Projects for which PDBs do not have source information will be unable to display either the line attribution or the source file.

Diagnostics Improvements

Productivity

Team Explorer: In this Preview, we made some improvements to the Git tags functionality, largely based on your feedback via UserVoice. There’s a new Tags tile available in the Team Explorer window so that you can view all the tags in your repo. In addition to create, you can now delete tags, push tags, and create a new branch from tags. Visual Studio Team Services users can now check out pull request branches, which makes it easier to review pull requests, test changes, and build your code.

Managing Secrets: Many of you know that it’s a best practice to keep sensitive settings like connection strings, passwords, or other credentials outside of source code and in a safe place like Azure Key Vault. Last month we introduced the App Authentication Extension which makes it easy to configure your machine to use these protected settings so that you can develop and debug apps locally using your Visual Studio credentials. With Visual Studio Version 15.6 Preview 1, we’ve moved this functionality directly into the main setup, so now everyone has access to this feature by default. Learn more about managing secrets in the cloud.

C++ Development

With Visual Studio 2017 version 15.6 Preview, you now have the ability to create CMake projects the Add New Project dialog. This Preview also provides built-in support for Android NDK r15c and guaranteed copy elision per the C++17 standard. In addition, the ImageWatch extension has been updated to work with Visual Studio 2017

CPlusPlus Development

Python Development

IntelliSense for Python code now no longer requires a completion database. Instead of waiting up to four hours after installing a new package, you can start using it immediately. We have also added experimental support for managing Anaconda packages, new code snippets, and more customizable syntax highlighting. Read our blog post for full details on these improvements and how to enable our experimental features.

Test Explorer

Real time test discovery is a new Visual Studio feature for managed projects that uses the Roslyn compiler to discover tests and populate the Test Explorer in real-time without requiring you to build your project. This feature was introduced behind a feature flag in version 15.5, and it will now be on by default in version 15.6. This feature not only makes test discovery significantly faster, but it also keeps the Test Explorer in sync with code changes such as adding or removing tests. Since real-time discovery is powered by Roslyn, it is only available for C# and Visual Basic test projects using xUnit, NUnit, and MSTest. To learn more, check out the Real Time Test Discovery blog post and Channel9 video.

Real Time test discovery

Azure Development

With this Preview, Visual Studio now supports configuring continuous delivery to Azure for Team Foundation Version Control (TFVC), Git SSH remotes, and Web Apps for containers. Read more about these features on this post about Continuous Delivery Tools for Visual Studio.

WCF Connected Services

The WCF Web Service Reference connected service provider now supports updating an existing service reference. This simplifies the process for regenerating the WCF client proxy code for an updated web service. To use this new feature, open the context menu of a service reference folder to be updated and select the ‘Update Microsoft WCF Web Service Reference Provider…” option. This will regenerate the Reference.cs file using the settings for which the file was originally generated. Please note, this feature is not supported for service references added to the project using a previous version of Visual Studio 2017.

WCFWebService

Try it out today!

If you’re not familiar with Visual Studio Previews, take a moment to read the Visual Studio 2017 Release Rhythm. Remember that Visual Studio 2017 Previews can be installed with other versions of Visual Studio and other installs of Visual Studio 2017 without adversely affecting either your machine or your productivity. Previews provide an opportunity for you to receive fixes faster and try out upcoming functionality before it becomes mainstream. Similarly, the Previews enable the Visual Studio Engineering team to validate usage, incorporate suggestions, and detect flaws earlier in the development process. We are highly responsive to feedback coming in through the Previews and look forward to hearing from you.

Please Install the Visual Studio 2017 Preview today, exercise your favorite workloads, and tell us what you think. You can report issues to us via the Report a Problem tool in Visual Studio or you can share a suggestion on UserVoice. You’ll be able to track your issues in the Visual Studio Developer Community where you can ask questions and find answers. You can also engage with us and other Visual Studio developers through our Visual Studio conversation in the Gitter community (requires GitHub account).

Christine Ruana, Principal Program Manager, Visual Studio

Christine is on the Visual Studio release engineering team and is responsible for making Visual Studio releases available to our customers around the world.

Share UI Code in any iOS and Android App with .NET Embedding

$
0
0

One of the most exciting announcements during this year’s Connect(); event was the ability to embed .NET libraries into existing iOS (Objective-C/Swift) and Android (Java) applications with .NET Embedding. This is great because you can start to share code between your iOS and Android applications, and you can also share the user interface between your apps when you combine .NET Embedding with Xamarin.Forms Native Forms. This means that you can leverage your existing investments and apps without having to re-write them from scratch to start adding cross-platform logic and UI. In fact, during the Connect(); keynote I showed how I was able to extend the open source Swift-based Kickstarter iOS application with .NET Embedding and Xamarin.Forms Native Forms. You can check out the clip below.

Today, let’s take a deeper look at how we can start sharing our native user interfaces and business logic in an iOS app written in Objective-C and an Android app written in Java using .NET Embedding.

Getting Started

.NET Embedding tooling is supported in both Visual Studio 2017 for Android, and Visual Studio for Mac for iOS, Android, and macOS. Since we will be working on an iOS and Android application, we will be using Visual Studio for Mac which can be downloaded from visualstudio.com. If you are on Windows you can still follow along for the Android portion.

.NET Embedding works by compiling a .NET assembly into a native library for the specified operating system. This can be a single .NET Standard Library or platform specific Xamarin.iOS and Xamarin.Android libraries that share code. The latter will enable us to access platform specific capabilities and utilize Xamarin.Forms’ Native Forms capability to share user interface code.

For this sample we will want to create three projects:

  • HelloSharedUI – Portable Class Library
  • HelloSharedUI.iOS – Xamarin.iOS Library
  • HelloSharedUI.Droid – Xamarin.Android Library

Inside of Visual Studio for Mac we will find the multiplatform node in the New Project Dialog, where a Xamarin.Forms class library template exists. This will create a Portable Class Library for our shared code with the Xamarin.Forms NuGet package installed and some sample code. We’ll start with this.

Shared Project

Next, we will want to create the iOS and Android Class Libraries.

Class Library iOS and Android

Then we must ensure that we have installed the Xamarin.Forms NuGet Package in the iOS and Android projects and that the shared portable class library’s NuGet is also up to date. If you are new to .NET Development, NuGet is package management for .NET project similar to CocoaPods and Maven packages.

Add Xamarin Forms

Finally, we should ensure that our iOS and Android libraries have a reference to the portable class library that has our shared code.

Add Reference

Shared User Interface

The default template gives us the following shared user interface with a button that when clicked will update its label.

We will use this page for this example, but we can easily add additional pages written in XAML or C# with Xamarin.Forms.

New file

Accessing Shared User Interface

With our shared user interface in place we need a way to get access to it from the iOS and Android libraries. Let’s add a class called UIHelpers.cs to the iOS and Android libraries that will contain helper methods to initialize Xamarin.Forms and display or return the page on each platform.

iOS UIHelpers

On iOS we are able to directly push the page on the navigation stack or display it modally. This is accomplished by creating an instance of MyPage, finding the root view controller, and presenting it:

Android UIHelpers

On Android we also have access to the navigation stack, but it is easier to directly return a Fragment that can then be used anywhere in the Android application:

With our code in place we are now ready to compile the libraries to embed in the native language apps.

Adding .NET Embedding NuGet Packages

The .NET Embedding tooling can be installed directly on to our development machine or added directly to the project via the Embeddinator-4000 NuGet package. This means we can add the NuGet package to our iOS and Android projects.

Nuget Packages

After we compile the library we need to run it through the .NET embedding tooling to generate the framework. This can easily be done by adding custom commands that run after the build is successful. These can be added by right clicking on the iOS project and going to options and finding Custom Commands. For this demo we will generate an iOS framework in debug mode with the following command:

Custom commands

For Android we will use a similar command:

Now, when we compile the library a folder named **iosoutput** will contain HelloSharedUI.iOS.framework that we can import into an iOS Objective-C or Swift project and another folder named **androidoutput** that will contain HelloSharedUI.Droid.aar for Android.

Calling .NET Code from Xcode and Objective-C

The final step for iOS is to import the .framework into Xcode and add it as an embedded binary. Follow the simple steps on our .NET Embedding documentation to import it. I created a simple UIViewController that has a button and a TouchUpInside Action that is all wrapped in a UINavigationController.

On the top of the ViewController.m we need to add an import for our header and then implement the click event to show the embedded page:

Now simply run the application to see the embedded page and C# logic:

iOS Embedding

Adding the Framework to Android Studio

Android goes through a similar process of importing the generated .aar that is explained on our .NET Embedding documentation page. After we have the .aar imported it is ready to be used an application. I generated the default application in Android Studio that displays a single Fragment in an Activity with a FloatingActionButton that has a click listener. Instead of displaying toast when the button is clicked, we can navigate to the shared user interface that we exposed as a Fragment. To get access we can import our library and then we can create the UIHelpers class, create our fragment, and replace the current view:

Now, let’s go ahead and run the app:

Android Embedding

Embed Everywhere

In just a few minutes we were able to create shareable native user interface and business logic in XAML and C#, and embed it into a native language iOS and Android application. This is only the start as .NET embedding also supports creating embeddable libraries for not just iOS and Android, but also Objective-C/Swift macOS applications, and even C++ code for Linux based apps.

Learn More

Be sure to read through our full documentation on .NET Embedding to start leveraging .NET libraries in native language applications. You can grab the source code on my GitHub and also the full Kickstarter app source code that I demoed at Connect(); from my GitHub.

To get started with all of this, for free, head on over to VisualStudio.com and download Visual Studio 2017 or Visual Studio for Mac. You can learn more about .NET Embedding and all of our other announcements by reading our full announcement from the event.

James Montemagno, Principal Program Manager, Mobile Developer Tools

James has been a .NET developer since 2005, working in a wide range of industries including game development, printer software, and web services. Prior to becoming a Principal Program Manager, James was a professional mobile developer and has now been crafting apps since 2011 with Xamarin. In his spare time, he is most likely cycling around Seattle or guzzling gallons of coffee at a local coffee shop. He can be found on Twitter @JamesMontemagno, blogs code regularly on his personal blog http://www.montemagno.com, and co-hosts the weekly development podcast Merge Conflict http://mergeconflict.fm.

Sky’s the limit with Azure, ASP.NET Core, and Visual Studio for Mac

$
0
0

[Hello, we are looking to improve your experience on the Visual Studio Blog. It will be very helpful if you could share your feedback via this short survey that should take less than 2 minutes to fill out. Thanks!]

Cloud services represent a huge leap in functionality, performance, and management simplicity for web apps, APIs, mobile backends, and more. To help you get started with cloud-based development in Visual Studio for Mac, today we’re publishing two new hands-on labs: publishing your ASP.NET Core web app to Azure, and connecting your ASP.NET Core web app to Azure SQL Database.

These two labs will help develop cloud-ready ASP.NET web apps and APIs with Visual Studio for Mac, using an Azure hosted SQL database, and then publish the web app itself to Azure. What’s more, you can try Azure out for free!

Lab 7: Publishing ASP.NET Core websites to Azure

This lab builds on the earlier Getting Started with ASP.NET Core lab, by showing you how to publish the website to Azure using Visual Studio for Mac in just a few steps:

  1. Creating an Azure account
  2. Creating an ASP.NET Core website
  3. Publishing to Azure
  4. Managing your website in Azure

To complete the lab, follow these instructions which will guide you through the process.

VS4Mac ASPNET Core Azure

Lab 8: Using Azure SQL Database in ASP.NET Core web apps

Every website needs a database. It is easy to set up an Azure SQL database to connect and develop locally on Visual Studio for Mac and migrate it to a production instance later. This lab will walk you through getting your first cloud database and ASP.NET Core web app up and running:

  1. Creating an Azure SQL Database
  2. Setting up the ASP.NET Core app
  3. Configuring the SQL Azure Database
  4. Connecting the ASP.NET Core website to Azure SQL

These step-by-step instructions will show you how to set up and connect to the Azure database from ASP.NET Core. The same steps will work for ASP.NET Core web API projects, which you can use as a mobile app back-end.

Visual Studio for Mac, version 7.3

On December 4, we released Visual Studio for Mac, version 7.3, bringing an even better Visual Studio for Mac to you as a free update. This release brings performance and stability enhancements, as well as new features. Visual Studio Test Platform (VSTest) now provides more flexibility in choosing your test frameworks and automatic iOS app signing, reducing the number of manual steps needed to build your app. Check out the full blog post for more details and be sure to download or update to Visual Studio for Mac, version 7.3 today!

Get Started

Download Visual Studio for Mac today, and visit the VS4Mac labs repo on GitHub to check out the new Azure hands-on labs, as well as the previous ones that help you get started building apps, games, and services for Xamarin mobile, web, and cloud.

Check out the docs for more in-depth information on Visual Studio for Mac features, and let us know what you think of the labs and Visual Studio for Mac in the comments below.

Craig Dunn, Principal Program Manager
@conceptdev

Craig works on the Mobile Developer Tools documentation team, where he enjoys writing cross-platform code for iOS, Android, Mac, and Windows platforms with Visual Studio and Xamarin.

Easily Create IoT Edge custom modules with Visual Studio Code

$
0
0

At the recent Connect(); 2017 in November, we announced public preview of Azure IoT Edge. Now you can bring the intelligence of the Cloud right to the IoT Edge as well as easily create and manage business logic for your devices. The new Azure IoT Edge extension for Visual Studio Code along with the updated Azure IoT Toolkit extension will make your IoT Edge developments a real pleasure, providing a set of functionalities including:

  • Creating new IoT Edge projects
  • Building and publishing IoT Edge modules
  • Debugging IoT Edge modules locally
  • Managing IoT Edge devices in IoT Hub
  • Deploying IoT solutions to IoT Edge devices
  • Stopping and restarting IoT Edge

Azure IoT Edge Extension

Get Started with IoT Edge in Visual Studio Code

First things first, let’s start by answering the obvious question – What is IoT Edge? What can it do and how does it work? Azure IoT Edge moves cloud analytics and custom business logic to devices so that your organization can focus on business insights instead of data management. Enable your solution to truly scale by configuring your IoT software, deploying it to devices via standard containers, and monitoring it all from the cloud. Here is the Azure IoT Edge introduction page where you can find more in details.

Create a simulated Edge Device

Azure IoT Edge enables you to perform analytics and data processing on your devices, instead of having to push all the data to the cloud. To achieve this, you need a device having IoT Edge runtime installed to start with. Here are the tutorials about deploying Azure IoT Edge on a simulated device from end to end for both Windows and Linux operating environments.

Develop and deploy a C# IoT Edge module

Once you have the IoT Edge runtime deployed on your device (or simulator), you can then start working on modules. At the time we are writing this post, only C# is available for developing modules, but soon you will be able to develop them using C, Java, Node or Python as well. We have published a page talking about develop and deploy a C# IoT Edge module to your simulated device using Visual Studio Code, check it out first, then we’ll show you how to debug it in VS Code with the IoT Edge extension.

Debug your IoT Edge C# module

  1. To start debugging, you will need to use the dockerfile.debug to rebuild your docker image and deploy your Edge solution again. This is to add debugging support and rebuild the Docker image through dockerfile.debug configurations.
     
    In Visual Studio Code explorer, select Dockerfile.debug and right-click to select Build IoT Edge module Docker image. Then containerize and publish your module image as usual. It’s recommended you use a local registry to host your images for debugging purposes if you are working on a Linux container.
    Select Docker file debug
  1. You can reuse the deployment.json file (click here to know more about IoT Edge deployment) if you already have the desired modules and routes configured for your IoT Edge device. In command Palette (Ctrl+Shift+P), type and select Edge: Restart Edge to get your module started in debug version.
  2. Now you can setup the debug configuration. Visual Studio Code provides a configuration file launch.json that allows you to configure your own debugging environment (click here to read more). In this scenario, configure your launch.json file as follows:
    • If you don’t have a launch.json file yet, navigate to the VS Code debug window, press F5 and select IoT Edge (.Net Core). The launch.json file will be generated for you.
      Add new launch json file
    • If the launch.json file already exists, open it in VS Code, click Add Configuration…, and select Edge: Debug IoT Edge Module (.NET Core).
      Add configuration to existing json file
  3. In launch.json, navigate to the Debug IoT Edge Module (.NET Core) section and specify the <container_name>.
    Update configuration name
  4. Navigate to Program.cs. Add breakpoints and press F5 again. Then select the dotnet process to attach to.
    Start debugging
  5. In the Debug window, you can see the variables in the left panel.

Azure IoT Edge extension also supports developing, debugging and deploying Azure Function for IoT Edge. For more information, please visit here.

Try it out

Now that you have learnt the basics about debugging an IoT Edge module with Visual Studio Code, go download the Edge extension and create your first Module, then join Gitter to let us know what you think or if you need help.

Xinyi Zhang, Senior Engineering Manager, IoT Tools and Services

Xinyi is a engineering manager working on IoT tools and services, focusing on providing great dev experience on IoT related tools.

Connect(); 2017: SmartHotel360 Demo Apps and Architecture

$
0
0

Last month we hosted Microsoft Connect(); in New York City. Connect(); is a three-day, in-person and online developer event. If you missed it, no worries! You can watch our keynotes, sessions, and on-demand videos on Channel 9.

For the past five months our keynote demo team worked on a new set of reference apps. We used most of these apps and Azure backend for our keynote demos. As every year, today we are delighted to share the availability of our newest reference sample apps and Azure backend: SmartHotel360 in GitHub.

SmartHotel360Logo

SmartHotel360 is a fictitious smart hospitality company showcasing the future of connected travel.

Their vision is to provide:

  • Intelligent, conversational, and personalized apps and experiences to guests
  • Modern workplace experiences and smart conference rooms for business travelers
  • Real-time customer and business insights for hotel managers & investors
  • Unified analytics and package deal recommendations for campaign managers.

There’s never been a better time to be a developer. Our intent with these set of reference apps and Azure backend is to show developers how to get started building the apps of the future, today!

The heart of this application is the cloud – best-in-class tools, data platform, and AI – and the code is built using a microservice oriented architecture orchestrated with multiple Docker containers. There are various services developed in different languages: .NET Core 2.0, Java and Node.js. These services use different data stores like SQL Server, Azure SQL DB, Azure CosmosDB, and Postgres.

In production, all these microservices run in a Kubernetes cluster, powered by Azure Container Service (ACS) as shown in the accompanying architecture diagram.

Architecture diagram

You can find everything you need to run the backend services locally and/or deploy them in a Azure environment at our SmartHotel360 Backend repository in GitHub.

Websites

SmartHotel360Website SmartHotel360 has multiple apps that share a common Azure backend, including a public website where hotel guests can book a room, smart conference rooms, and even include their accompanying family travelers and their pets! The site was built using ASP.NET Core 2.0. We published the SmartHotel360 Public Website code in GitHub and a few simplified versions on our demo scripts as well.
SentimentApp For hotel managers, we built a simple Node.js website to analyze customer sentiment from Twitter by using Text Analysis Cognitive Services APIs. This website was built with Visual Studio Code and we used multiple of our newest extensions for Cosmos DB, App Service, Azure Functions, and Docker for Visual Studio Code and Azure to build this app. You can find this app at our Sentiment Analysis GitHub repo.

Mobile and Desktop Apps

For hotel managers and maintenance crew, we built a maintenance iOS app and used Xamarin Forms embedded. This is a great way to showcase how companies can modernize existing line-of-business apps with Xamarin. In this app, hotel managers and maintenance crew can get notifications of issues and resolve those directly from their mobile app.

SmartHotel360GuestApp Travelers are always on the go, so SmartHotel360 offers a beautiful fully-native cross-device mobile app for guests and business travelers built with Xamarin. In this app guests and business travelers can book rooms and smart conference rooms as well as customize room temperature and lighting settings. The mobile app is available in iOS, Android, and Windows.
SmartHotel360DesktopApp We also built a desktop app. This is a version of the SmartHotel360 Xamarin app. With this app, travelers can adjust the temperature and lighting settings of their rooms and find nearby recommended places to go, like coffee shops. All based on deeply personalized preferences.
SmartHotel360SmartDoorNFCApp Travelers need quick access to their rooms. What if we can provide an automated way to have them go straight to their room when they get to the hotel? We used the power of mobile development with Android and NFC to provide this experience. We included NFC access from the SmartHotel360 traveler application and we also created a digital door application to check-in and open your room. All you need is to tap your phone on the digital door. No need to get a key from the lobby.
SmartHotel360MaintenanceApp For hotel managers and maintenance crew, we built a maintenance iOS app and used Xamarin Forms embedded. This is a great way to showcase how companies can modernize existing line-of-business apps with Xamarin. In this app, hotel managers and maintenance crew can get notifications of issues and resolve those directly from their mobile app.

Given the interest, we published all the SmartHotel360 mobile and desktop apps code in GitHub and we are very excited to share those with you as well.

Watch demos in action and download the code!

We used most of the SmartHotel360 reference apps and our Azure backend in multiple Connect(); 2017 keynote demos. If you missed it, you can watch Scott Guthrie’s Keynote: Journey to the Intelligent Cloud in Channel 9 or you can watch individual demo videos at our Microsoft Visual Studio YouTube Channel as well.

You can also grab all the presentations, links to workshops and demos, and creative assets to host your own Re-Connect(); events, also available in our Connect-Event-in-a-Box repo on GitHub.

Our Microsoft Application Platform gives developers the power or Azure, our best-in-class tools, our data platform, artificial intelligence, and cross-device apps to start building the apps of the future. We hope you can use SmartHotel360 as a great learning resource to start building what you need today with any apps, any tools, and any platform.

Enjoy SmartHotel360 from our demo team: Brady Gaster, Beth Massi, PJ Meyer, Bowden Kelly, David Ortinau, Rajen Kishna, Thomas Dohmke, Maria Naggaga, Steve Lasker, Stephen Provine, Tara Shankar Jana, Anitah Cantele, Sachin Hridayraj, Paul Stubbs, Giampaolo Battaglia, and Nishant Thacker.

Erika Ehrli, Director of Product Marketing, Cloud Apps Dev, Data + AI
@erikaehrli1

Erika has been at Microsoft for 14 years. In her current role she manages a creative and energetic team of technical product managers for Developer Tools and DevOps building tier 1 event keynote and general session demos, reference content apps, and technical content to showcase App Innovation.

Visual Studio Updates for Office 365 APIs Tools

$
0
0

As we recently detailed on the Office Developer blog, we are making it simpler and easier for developers to connect to Office 365 through the Microsoft Graph. For Visual Studio developers currently using the Office 365 API Tools to create applications, you should plan to transition your apps to use Microsoft Graph to access Office 365 data directly.

Call to Action

You can use the Microsoft Graph Quick Start Guide to learn the quickest way to get started with Microsoft Graph for the platform of your choice. Or, you can use Office 365 Connected Services docs for Microsoft Graph if you have Visual Studio 2017 (version 15.3 or later) installed. If your app requires SharePoint APIs that are not yet available in Microsoft Graph, update your code to use Microsoft Graph to discover your service endpoints.

As a reminder, starting January 10th, 2018, new apps will not be able to use on Office 365 Discovery Service. Existing apps can continue to use the service until November 1st, 2019. From November 1st, 2019 onward, the Office 365 discovery service will be fully decommissioned, and no apps will be able to use the service anymore. For Outlook v1.0 endpoint, on November 1st, 2019, we will decommission the Outlook REST API v1.0 in order to transition to Microsoft Graph and Outlook REST API v2.0.

We are here to help. If you have questions, please let us know via Stack Overflow with the [MicrosoftGraph] tag.

Keyur Patel, Senior Program Manager, Office Platform team.

Keyur is focused on building great experiences for developers across Office and the Microsoft Graph.


Visual Studio Code Java Debugger Adding Step Filter and Expression Evaluation

$
0
0

Happy new year! We’d like to thank you all for using Visual Studio Code for your Java development as well as for sharing your feedback. Within just three months, we’ve published 5 releases for our Debugger for Java extension for Visual Studio Code and received 400K+ downloads. With our new 0.5.0 release, we’re adding two new exciting features: Expression Evaluation and Support Step Filters.

Expression Evaluation

The debugger now enables you to evaluate expressions in variable watch window as well as debug console at runtime. So now you can see the value of both the simple variables, single-line expressions, as well as short code fragments within the running context. You can then monitor and validate the change of the value when your code is being executed. See below

VS Code Java Debugger Adding Expression Evaluation

Support step filter

Step filters are commonly used to filter out types that you do not wish to see or step through while debugging. With this feature, you can configure the packages to filter within your launch.json so they could be skipped when you step through. See below

VS Code Java Debugger Adding Step Filters

Other updates

This release also includes a few other enhancements:

  1. Publish the binaries to the maven central repository
  2. Adopt new Visual Studio Code 1.19.0 debug activation events
  3. Improving searching performance by looking up the stack frame’s associated source file from source containers directly instead of leveraging the original jdt search engine
  4. Bug fixes

You can find more details in our changelog.

Try it out

If you’re trying to find a performant editor for your Java project, please give Visual Studio Code a try

Xiaokai He, Program Manager
@XiaokaiHe

Xiaokai is a program manager working on Java tools and services. He’s currently focusing on making Visual Studio Code great for Java developers, as well as supporting Java in various of Azure services.

Visual Studio for Mac as the default editor for Unity

$
0
0

Unity is a powerful solution to create games for a multitude of platforms, from mobiles to consoles, desktop and web games. Since Unity 5.2, Visual Studio and the Visual Studio Tools for Unity have been the default experience on Windows.

When we released Visual Studio for Mac last year, Unity was among the first scenarios we supported out of the box. I’m happy to share that Unity will include Visual Studio for Mac as the default for MacOS developers starting with version 2018.1.

This means that everyone will be able to utilize the benefits of the .NET 4.6 scripting runtime upgrade in Unity (currently an experimental feature) , including all the goodies of C# 6.0 and access to the Microsoft Azure SDK to add powerful cloud services to your games. This is all in addition to the existing one-click debugging, customized solution pad, IntelliSense autocompletion, and many more productivity features.

Check out my post “Unity game development with Visual Studio for Mac” for more information on all that Visual Studio for Mac has to offer for Unity developers, or watch the video below on how Visual Studio 2017 and Visual Studio for Mac boost your development productivity.

You can also read Unity’s announcement for more details.

To get started today, download Visual Studio for Mac and set it as the default editor in Unity. Visual Studio Community for Mac is free to use for students, open-source and individual developers, as well as small teams. Check out the license terms for more information.

As always, let us know what you think in the comments below.

Jb Evain, Principal Software Engineer Manager
@jbevain

Jb runs the Visual Studio Tools for Unity experience He has a passion for developer tools and programming languages, and has been working in developer technologies for over a decade.

Support for Continuous Delivery to Containers and TFVC in Visual Studio 15.6 Preview 2

$
0
0

We have an update for the Configure Continuous Delivery feature in Visual Studio. For Solutions with an ASP.NET or ASP.NET Core projects you can right click on the solution node and select “Configure Continuous Delivery…”with and without container support. You can always configure Continuous Delivery for solutions under source control in GitHub and VSTS Git repositories to App Service.

With the release of Visual Studio 2017 15.6 Preview 2, you can also configure Continuous Delivery to Web App for Containers – App Service on Linux for solutions under source control in GitHub, VSTS Git repositories as well as TFVC repositories on VSTS. When you click configure Continuous Delivery on the solution menu, the configure continuous delivery automatically detects the source control provider to determine if it is TFVC or Git and the remote source control host to determine if it is VSTS or GitHub.

Configure Continuous Delivery on Solution Menu

If the remote source control host is VSTS and the source control provider is TFVC, the Configure Continuous Delivery dialog automatically selects the remote server path that your local solution folder is mapped to as your source control folder for the continuous integration build definition.

Remote server path auto selected to match local solution folder mapped to source control folder

You can select the target Azure subscription and Azure service host. When you click OK, CD4VS will automatically configure a build and release definition that will fire a build and release whenever anyone on your team checks in code to that source control folder.

Other enhancements

In this preview, we also introduced inline creation of a new Azure App Service for Linux and an Azure Container Registry (ACR) as well as support for SSH authentication to GitHub and VSTS Git repositories. While you are configuring Continuous Delivery for a containerized solution you can target an existing App Service on Linux and ACR or opt to create new ones.

When configuring continuous delivery for a containerized solution you can target an existing App Service on Linux and ACR

When you opt to create a new ACR, you can edit the new Container Registry details to change its name, resource group and location.

Edit New Container Registry

As you configure Continuous Delivery, the dialog will now recognize solutions under source control in VSTS repositories that only accept authentication over SSH and populate the dialog with repository details and list of available remote branches in that repository.

Please keep the feedback coming!

Thank you to everyone who has reached out and shared feedback and ideas so far. We’re always looking for feedback on where to focus on our efforts. There’s a team alias vsdevops@microsoft.com where you can reach out to the team and others in the community sharing ideas on this topic.

Ahmed Metwally, Senior PM, Visual Studio
@cd4vs

Ahmed is a Program Manager on the Visual Studio Platform team focused on improving team collaboration and application lifecycle management integration.

Visual Studio 2017 Version 15.6 Preview 2 and Visual Studio for Mac Version 7.4 Preview

$
0
0

We’re excited to start the new year off with great updates to the Visual Studio 2017 15.6 Preview for both Windows and Mac, and we hope that you will install and use it, and then tell us what you think. If you’re on a Windows machine, you can either install it from here or, if you already have it installed, click on the notification you’ll receive in the product informing you that the update is available. If you’re on a Mac, switch to the Visual Studio for Mac Beta updater channel to try out the new preview features.

This second preview builds upon the first preview of Visual Studio 2017 version 15.6 and contains new features, bug fixes, and other enhancements that address your feedback. We’re also releasing a new Visual Studio for Mac version 7.4 Preview, available in the Beta channel of the updater.

While this post shares the top highlights in this Preview, you can view the complete list of new features and details on how to enable them in the Visual Studio 2017 version 15.6 Preview release notes. For Mac users, the Visual Studio for Mac Preview release notes contain more details on what’s new for you. We appreciate your early adoption and feedback as it helps us ship the most high-quality tools to everyone in the Visual Studio community. Thank you for engaging in Visual Studio previews!

Performance

We continued our efforts to improve solution load performance, and in this Preview, we specifically focused on scenarios when the project has already been opened on the machine. We optimized our use of the design time build cache and parallelized the way project data is loaded, which enables Visual Studio to leverage disk and CPU more efficiently. Our lab measurements of this change show that large C# and Visual Basic solutions will “warm” load twice as fast as before. If you have a large solution project, we know you’ll appreciate this feature.

Productivity

When you’re in the flow of editing code, we know it’s the little details that often help make you more productive. One such detail: want to quickly duplicate a line of code without losing the contents of your paste buffer? Now you can, with duplicate line (Ctrl+E,V).

We’ve added the ability to navigate to decompiled sources. When enabled, invoking Go To Definition or Peek Definition on any referenced type or member will show its definition with reconstructed method bodies via ILSpy decompilation.

Decompiled

Diagnostics

The CPU Usage Tool, when used during post-mortem profiling with the ALT-F2 Performance Profiler, now displays logical call stacks for asynchronous code (aka ‘Async Call Stack Stitching’). This means that asynchronous code running on behalf of a parent function or Task will appear as a child in the Call Tree and Caller/Callee views. This view makes it easier to navigate asynchronous code and understand its performance characteristics.

CPUUsage Call Stack Stitching

C++ Development

C++17 Standards Conformance: We’ve also made further progress toward implementing the C++17 Standard Library, including APIs such as stable_sort, partition, inline vector::emplace_back in parallel, and <memory_resource>.

Open Folder improvements: Missing include files are now automatically discovered for C++ Open Folder if they exist under the workspace root, even if they are not explicitly added to the include path. Debug options are now available for Embedded ARM GCC support – right click your binary, choose Debug and Launch Settings, and then select C/C++ Debug microcontroller.

C++ IntelliSense in Open Folder & CMake: IntelliSense errors for inactive configurations will now be shown as purple squiggles in the editor (the number of configurations to process is configurable in Tools > Options):

Intellisense

CMake improvements: CTest, Google Test, and Boost.Test tests in CMake projects are automatically discovered and listed in the Test Explorer. If you have the Google Test adapter or the Boost.Test adapter, after you build, you will have an even more granular view of your tests:

Tests

Templates: We’ve included Boost.Test item templates and support for the Boost dynamic library.

C++ Code Analysis enhancements: We’ve added 5 new checks enforcing rules around integer overflow and additional rules from the C++ Core Guidelines, along with a C++ Core Checker extension to detect use of indirections with a lifetime that is out of scope. Additionally, the “Run Code Analysis” command no longer runs code generation, which speeds up analysis runs. We’ve also added support for running single file Code Analysis (or on your selection of files from the Solution Explorer) and have cleaned up the Build and Analyze menus.

Code Analysis

Azure Development

With this Preview, Visual Studio now supports configuring continuous delivery for solutions with ASP.NET Core projects and Docker support targeting Azure Web App for Containers. We also added support for new source control providers. You can now configure Continuous Delivery for your solution if it is under TFVC source control on VSTS or used SSH authentication for Git repositories on GitHub or VSTS. Read more about these features on this post about Continuous Delivery Tools for Visual Studio.

Test Explorer

Hierarchy View: The Test Explorer in Visual Studio now has a hierarchy view that organizes your tests by Project, Namespace, and then Class. This feature not only makes navigating through your tests much easier, but also gives better feedback on tests at a glance. Refer to the release notes for details on how to enable this view and what type of test information you’ll now be able to see. Adding a hierarchy view to the Test Explorer has been at the top of many wish lists and we are excited to hear feedback on the design and how it affects your workflow.

Test Heirarchy

Real time test discovery is a new Visual Studio feature that uses a Roslyn analyzer to discover tests and populate the test explorer in real time without requiring you to build your managed project. This feature was introduced in Visual Studio 2017 15.5 behind a feature flag, and in this Preview is now on by default. This feature not only makes test discovery significantly faster, but it also keeps the test explorer in sync with code changes such as adding or removing tests. Note that unlike Hierarchy View feature described above which is available for all types of projects, the automatic test discovery feature is only available for C# and Visual Basic projects.

Xamarin

Xamarin.Android: Android 8.1 Oreo is the latest version of Android available from Google. Android 8.1 Oreo offers many new features of interest to Xamarin.Android developers. These features include Android Go, Neural Networks API, Autofill Framework updates, SharedMemory API, and many more. These APIs are available to Xamarin.Android apps when you use Xamarin.Android 8.2 and later.

Visual Studio Tools for Xamarin:

Building iOS apps with Visual Studio on Windows just got even easier. This release adds a brand-new feature called macOS environment provisioning. Rather than installing and updating a Mac build machine manually, just connect to the Mac and we will handle the heavy lifting of setup, all from Windows.

You can also now deploy your iOS apps over the network with Wi-Fi debugging – no cables required, on both Windows and Mac. Just make sure you pair a wireless device with Xcode first.

The Xamarin Live Player enables developers to continuously deploy, test, and debug their apps using just Visual Studio and an iOS or Android device. Visual Studio 2017 version 15.5 added support to enable developers to preview real-time XAML changes directly in the Android emulator without requiring a recompile or redeploy. This release brings this functionality to the Remoted iOS Simulator for Windows.

Try it out today!

If you’re not familiar with Visual Studio Previews, take a moment to read the Visual Studio 2017 Release Rhythm. Remember that Visual Studio 2017 Previews can be installed side-by-side with other versions of Visual Studio and other installs of Visual Studio 2017 without adversely affecting either your machine or your productivity. Previews provide an opportunity for you to receive fixes faster and try out upcoming functionality before it becomes mainstream. Similarly, the Previews enable the Visual Studio Engineering team to validate usage, incorporate suggestions, and detect flaws earlier in the development process. We are highly responsive to feedback coming in through the Previews and look forward to hearing from you.

Please install the Visual Studio Preview today, exercise your favorite workloads, and tell us what you think. If you’re on a Mac, switch to the Visual Studio for Mac Beta updater channel to try out the new preview features. You can report issues to us via the Report a Problem tool in Visual Studio or you can share a suggestion on UserVoice. You’ll be able to track your issues in the Visual Studio Developer Community where you can ask questions and find answers. You can also engage with us and other Visual Studio developers through our Visual Studio conversation in the Gitter community (requires GitHub account).

Christine Ruana, Principal Program Manager, Visual Studio

Christine is on the Visual Studio release engineering team and is responsible for making Visual Studio releases available to our customers around the world.

New Visual Studio Code Extensions for Java Developers: Maven, Tomcat, and Checkstyle

$
0
0

Alongside the release of Debugger for Java and Java Test Runner this week, we’re welcoming a few new members to our Visual Studio Code Java Extension family. We think you’ll find them helpful for your Java development when you’re dealing with maven, Tomcat or making sure your Java code to follow the standard styles.

Maven Project Explorer

Maven is extremely popular in the Java community and we’d like to make it even easier to use with Visual Studio Code. The new Maven Project Explorer extension:

  • Scans your pom.xml in your workspace and displays all maven projects and their modules in the sidebar to make them easy to access.
  • Provides shortcuts to common maven goals, namely clean, validate, compile, test, package, verify, install site and deploy. So you won’t need to type any of those in your command line window anymore.
  • Preserves history of custom goals for fast re-run long commands (e.g. mvn clean package -DskipTests -Dcheckstyle.skip), our data shows custom goals are very popular for maven users, so we believe this will be a useful feature for your repeating tasks.
  • Generates projects from Maven Archetype
  • And much more…

Maven Project Explorer

You can find more information on the extension home page.

Tomcat

For developers working with Tomcat, now there’s a handy tool with Visual Studio Code. With the Tomcat extension, you can manage all your local Tomcat servers within the editor and easily debug and run your war package on Tomcat and link Tomcat into workspace.

Tomcat Explorer for Visual Studio Code

Checkstyle

Checkstyle is a convenient tool to apply Checkstyle rules to your Java source code so you can see the style issues and fix them on the fly. It automates the process of checking your Java code so you would be freed from this boring task while keeping your format correct.

Try it out

If you’re trying to find a performant editor for your Java project, please try out those new extensions and let us know what you think! We plan to keep updating and releasing new extensions to make VS Code a better editor for Java.

Following the steps below to get started

Xiaokai He, Program Manager
@XiaokaiHe

Xiaokai is a program manager working on Java tools and services. He’s currently focusing on making Visual Studio Code great for Java developers, as well as supporting Java in various of Azure services.

Xamarin University Presents: Ship better apps with Visual Studio App Center

$
0
0

At Microsoft Connect(); last November, we announced the general availability of Visual Studio App Center to help (Obj-C, Swift, Java, React Native, and Xamarin) developers quickly build, test, deploy, monitor, and improve their phone, tablet, desktop, and connected device apps with powerful, automated lifecycle services. As a .NET developer, you may already use the power of Visual Studio Tools for Xamarin to develop amazing apps in C#.

Now, with Visual Studio App Center, you can easily tap into automated cloud services for every stage of your development process, so you get higher quality apps into your users’ hands even faster.

XamU Presents Ship better apps with Visual Studio App Center

To learn how to simplify and automate your app development pipeline, join Mark Smith for “Xamarin University Presents: Ship Better Apps with Visual Studio App Center” on Thursday, January 25th at 9 am PT / 12 pm ET / 5 pm UTC. Mark will demo the services available in App Center – from setting up continuous cloud builds to automated testing and deployment to post-release crash reporting and aggregate user and app analytics. You’ll leave ready to connect your first app and start improving your development process and your apps immediately.

Jam-packed with step-by-step demos, this session has something for everyone, from app development beginners to seasoned pros who’ve built dozens of apps.

[REGISTER]

Xamarin University Logo

In this webinar, you’ll:

  • Connect your apps and add the Visual Studio App Center SDK in minutes
  • Kick off continuous cloud builds, straight from your source control repo.
  • Run automated UI tests on hundreds of real devices and hundreds of configurations
  • Distribute to beta testers or app stores with every successful build, or on-demand
  • Use real-time crash reports and analytics to monitor app health, fix problems fast, identify trends and understand what your users need and want
  • Engage your users with push notifications and target specific audiences, geographies, or languages.
  • Get technical guidance and advice from our app experts

We understand every development process is different, so we’ll show you how to use all of Visual Studio App Center services together and how to integrate specific services to work with your established processes and tools.

See you soon! Register now and get ready to start shipping amazing (five-star) apps with confidence.

Mark Smith, Principal Program Manager

Mark leads Xamarin University, where he helps developers learn how to utilize their .NET skills to build amazing mobile apps for Android, iOS, Windows and beyond. Prior to his career at Microsoft and Xamarin (acquired by Microsoft), Mark ran a consulting business, specializing in custom development

Hot Code Replacement for Java comes to Visual Studio Code

$
0
0

Hot code replacement (HCR), which doesn’t require a restart, is a fast debugging technique in which the Java debugger transmits new class files over the debugging channel to another JVM. With this new feature in Visual Studio Code (VS Code), you can start a debugging session and change a Java file in your development environment, and the debugger will replace the code in the JVM running your code. This is the faster and easier way in Java to facilitate experimental development and to foster iterative trial-and-error coding. Below is an illustration of how you can use HCR with Debugger for Java in Visual Studio Code.

Hot Code Replacement for Java in Visual Studio Code

HCR only works when the class signature does not change; you cannot remove or add fields to existing classes, when using HCR. However, HCR can be used to change the body of a method.

Since announcing several new extensions for Java on VS Code in our last blog post, we’ve further enhanced our updates to those extensions to provide a better editing experience for Java developers using VS Code.

Java Test Runner

We have added a few new features to better support JUnit in VS Code.

  1. Added test explorer so now you can view and locate all tests from within the test explorer
  2. Added status bar item to show test status and statistics.
  3. Added command to show test output window, by default it won’t be opened while running tests.

Java Test Runner

Tomcat

With the updated Tomcat extension, you can now create new Tomcat server from server explorer using the newly added “Add” button and run war package on it. You can also create the server during the deployment.

Create new Tomcat Server

Checkstyle

In our latest release of Checkstyle extension, properties in the Checkstyle configuration file get automatically resolved, which makes it easier for you to edit the configuration.

Properties in Checkstyle configuration file get automatically resolved

Please also refer to Checkstyle extension home page to view all the convenient commands that you can use to configure your Checkstyle.

Maven

We’ve also released our latest Maven extension under Microsoft. The new release brings new support to use maven wrapper as executable. The Maven wrapper is widely used to provide a fully encapsulated build setup for the project.

Try it out

Please don’t hesitate to have a try using VS Code, a lightweight code editor, for your Java development and let us know your feedback!

Xiaokai He, Program Manager
@XiaokaiHe

Xiaokai is a program manager working on Java tools and services. He’s currently focusing on making Visual Studio Code great for Java developers, as well as supporting Java in various of Azure services.


Visual Studio 2017 Version 15.6 Preview 4

$
0
0

Today, we are excited to share the final Visual Studio 2017 version 15.6 feature preview, which builds upon earlier previews of Visual Studio 2017 version 15.6. This preview contains new features, bug fixes, and other enhancements that address your feedback.

The top highlights of this Preview are described in this blog post: an enhanced acquisition experience for updates, performance improvements, information about Visual Studio Live Share, better Build and Test Explorer tools, and various C++ improvements.  You can view the complete list of new features and details on how to enable them in the Visual Studio 2017 version 15.6 Preview release notes.

We hope that you will install and use the Preview and share your feedback with us.  If you’re on a Windows machine, you can get it fresh from here or, if you already have a prior Preview installed, you can either click on the in-product notification flag or check for an update directly.  We appreciate your early adoption and feedback as it helps us ship the most high-quality tools to everyone in the Visual Studio community. Thank you for engaging in Visual Studio previews!

Performance

Solution Load: In Visual Studio 2017 version 15.5, we delivered improved solution load performance for large C# and VB solutions and in 15.6 Preview 2 we made “warm” loading of solutions twice as fast. In this Preview, we focused on .NET Core, and according to our lab measurements, we expect customers to see an average of 20 percent faster solution load times. Customers with large solutions (30+ projects) will see the most gains. UI Responsiveness: A consistent piece of feedback over the past several Visual Studio releases has been the request for transparency around extensions’ impact on performance and reliability. In this preview, extensions that are suspected of causing the UI to become unresponsive will now be reported too. The notification gives the option to disable the extension as well as the option to disable future notifications for that extension.

Diagnostics: The debugger’s Threads window significantly faster compared to the previous releases. Also, the window now works asynchronously which allows users to interact with Visual Studio while it processes data in the background. Developers will really appreciate these perf improvements, particularly when the target application being debugged uses a lot of threads.

Visual Studio Live Share

A few months ago at our Connect(); developer event we announced Visual Studio Live Share. With Visual Studio Live Share, you get real-time sharing in tools you love. You can share the full context of your code, collaboratively edit while still navigating files independently, securely share local servers, and even collaboratively debug while still retaining the ability to inspect on your own.

We’re excited to announce that we have started a limited private preview of Visual Studio Live Share with Visual Studio 2017 version 15.6 Preview 4! If you’re interested in actively participating, please sign-up and we’ll let you know when you’ve been added to the program.  We are working closely with a small group of developers in order to collect feedback and ensure we can deliver the best experience possible before opening the service more broadly.  For more information, please check out our documentation and FAQ.

C++ Development

CMake: You can now choose whether or not to automatically generate the CMake cache when you open new CMake projects in Visual Studio.

C++ linker improvements: Debugging large solutions with /Debug:fastlink PDBs is more robust. Changes in the PDB lead to reduced latency and a 30% reduction in heap memory consumption in the Visual Studio Debugger. Additionally, mapfile generation overhead is reduced in full linking scenarios. We still recommend using PDB files instead of mapfiles. C++ compiler improvements: The C++ team has made significant compile-time improvements. The compiler now optimizes your code to run faster through improved optimizations of pre-incremented loops and improved identification and propagation of constant global data in LTCG. We’ve also made it so that compile times are shorter compared to 15.5: the compiler front-end is between 3-5% faster on most inputs, the compiler optimizer is 3% faster due to reduced overhead of core optimization algorithms, and large LTCG compilations are 10% faster due to re-architected data structures. Profile-Guided Optimization: Profile-Guided Optimization is enabled and fully supported on ARM64.

Build Tools

The Visual Studio Build Tools allow you to create build servers without installing all of Visual Studio. In addition to supporting C++, ASP.NET, and .NET Core for Desktop projects, the Build Tools will now start supporting TypeScript and Node.js project types, and we expect to add support for more project types in future releases.  Here is the download location for the Visual Studio 2017 version 15.6 Preview Build Tools. There are also other improvements specifically to the MSBuild component of the Build Tools.   For example, MSBuild can now easily and seamlessly leverage NuGet to resolve SDKs without doing any extra package modification. We expect this feature to be popular, so we’ve created a SDK repository for everyone to use.  More information is available here, and please provide MSBuild feedback here.

Unit Testing

Navigate your tests by Project, Namespace, and Class in an expandable list by clicking the Hierarchy View button. In the hierarchy view you may notice that tests are ordered alphabetically. This has been an ask from many customers and we are excited to hear feedback.

Tests will be discovered automatically with Real time test discovery without requiring you to build your managed project. This allows the Test Explorer to stay in sync with code changes such as adding, removing, or editing tests. Note that unlike Hierarchy View feature described above which is available for all types of projects, the automatic test discovery feature is only available for C# and Visual Basic projects.

You can now configure your test discovery options in Tools > Options > Test. This includes the ability to turn off test discovery for managed tests to improve build performance when you are not testing.

Please try out the Preview today!

If you’re not familiar with Visual Studio Previews, take a moment to read the Visual Studio 2017 Release Rhythm. Remember that Visual Studio 2017 Previews can be installed side-by-side with other versions of Visual Studio and other installs of Visual Studio 2017 without adversely affecting either your machine or your productivity.  Previews provide an opportunity for you to receive fixes faster and try out upcoming functionality before it becomes mainstream. Similarly, the Previews enable the Visual Studio Engineering team to validate usage, incorporate suggestions, and detect flaws earlier in the development process. We are highly responsive to feedback coming in through the Previews and look forward to hearing from you.

Please install the Visual Studio Preview today, exercise your favorite workloads, and tell us what you think. You can report issues to us via the Report a Problem tool in Visual Studio or you can share a suggestion on UserVoice. You’ll be able to track your issues in the Visual Studio Developer Community where you can ask questions and find answers. You can also engage with us and other Visual Studio developers through our Visual Studio conversation in the Gitter community (requires GitHub account).

Christine Ruana Principal Program Manager, Visual Studio

Christine is on the Visual Studio release engineering team and is responsible for making Visual Studio releases available to our customers around the world.

Accessing Visual Studio Previews in Azure

$
0
0

In our most recent post, the Visual Studio team announced the availability of Visual Studio 2017 Version 15.6 Preview 4.  Today, I’m excited to announce you can now access the latest Visual Studio previews in the Azure Marketplace.  Just boot a virtual machine and off you go with the very latest features (standard VM charges will still apply).

With this new offering, we’re putting the power of virtual machines to work for developers, making Visual Studio previews even easier to try. By accessing Visual Studio previews in Azure, you can get a new machine up and running in less than 10 minutes, and rest assured the preview won’t impact any other current implementations. The latest features, workloads and each workload’s recommended components are already set up in Azure – just waiting for you to boot a VM and get coding!

In Azure, you find two virtual machine images with the latest Preview installed.  The Marketplace workflow makes it quite easy to provision a VM from these or any other image.

Our current preview of Visual Studio 2017 is Version 15.6 Preview 4; images will be updated in the marketplace as we release new Previews. (Note: although the name/label of the image won’t change, our team will update the image’s description so you can see exactly which Preview version you’re getting.)

In the Azure Marketplace, you’ll also find the current production releases of Visual Studio 2017 and 2015, which include the same recommended product install.  Virtual machines based on these images are amazingly fast to stand up, and enable access to your production dev box from any location with an internet connection for simplicity and ease.  You can read more information about Visual Studio production and preview versions here.

Don’t have an Azure account?  No problem.  You can create a free Azure trial account, and use the free credits to provision a new Preview VM and explore interesting services.  Visual Studio subscribers may have even more free credits available depending on your subscription.

We hope you’ll try out the new features in the latest preview today!  You can report issues to us via the Report a Problem tool in Visual Studio or you can share a suggestion on UserVoice. You’ll be able to track your issues in the Visual Studio Developer Community where you can ask questions and find answers.

Phil Lee, Senior Program Manager, Visual Studio

Phil is on the Visual Studio release engineering team and is responsible for making Visual Studio releases available on Azure.

Fine-tuning the notifications experience inside the Visual Studio IDE

$
0
0

Whether your team is small or large, staying on top of essential information in a timely and efficient manner is key in any successful project. In previous blog posts, we introduced new notification experiences that help you stay updated about team activities such as build failures and work item assignments without having to switch context outside of the Visual Studio IDE.

New toast notifications

With notifications, we saw an opportunity to improve your productivity by alerting you of important events, right on the IDE. We kicked-off our efforts by giving you the ability to be notified about the status of a single build definition. Your feedback to that initial experience was fairly positive, and we decided to expand the scope from a single tracked build definition, to notifying you about all build definitions as well as work item assignments, under a VSTS account.

After expanding the initial scope, you gave us feedback about areas we could improve next (e.g. notifications were not optimized for discovery, call to actions needed clarity & missed notifications were not surfaced), and we set out to not only continue expanding the feature’s scope, but to improve the overall experience of how we notify you inside the IDE.

As a result, in the most recent update to the Continuous Delivery Tools for Visual Studio extension,  we have introduced a new toast notification mechanism.

The new toast notification appears in the top right corner of the IDE, and whenever not acted upon or dismissed by you, it retracts to the notification flag, indicating it can be found inside the Notifications tool window.

For now, toast notifications are gather under a “Miscellaneous” category. As we experiment and refine further, expect to see new categories grouping related toast notifications together.

Looking ahead

As next steps in our notifications roadmap, we’ll be listening closely to your feedback and continue to fine-tune the new toast notification to ensure Visual Studio developers have a great notification experience. We’ll also look to expand the events you can be notified about, as well as customizing the notification experience even further. Stay tuned for future announcements.

Please Share Your Feedback

User feedback continues to be an essential part of our development efforts. On this release, we added a feedback button to simplify how you can send us feedback. We’ll love to hear your thoughts about the overall experience (e.g. new UI design, animation, timing, etc).

Please download or update the Continuous Delivery Tools for Visual Studio extension (aka.ms/cd4vs), and try out this new notification experience, either by creating a new Continuous Delivery pipeline, or by getting a coworker on your same VSTS account to assign you a work item.

Let us know what you think about this experience and what new notification scenarios you like us to explore next, either via the toast’s feedback button, Twitter or our team alias vsdevops@microsoft.com.

Ruben Rios, Program Manager, Visual Studio
@rub8n

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

Your guide to Azure services for apps built with Xamarin

$
0
0

When talking about app development today, the cloud is almost always part of the conversation. While many developers have an idea of the benefits that cloud can offer them – scalability, ready-to-use functionality, and security, to name a few – it’s sometimes hard to figure out where to start for the specific scenario you have in mind. Luckily, our mobile developer tools docs team has you covered!

Today, we’re happy to announce the availability of the “Mobile apps using Xamarin + Azure” poster. This poster serves as your one-stop guide to the most relevant cloud services that Azure has to offer to you as a mobile developer with Visual Studio and Xamarin.

Download Your Poster Here

We’re excited to hear your feedback on the poster and how we can make it even better for you to get the most out of Azure services for your mobile apps built with Xamarin. Leave us a comment below with what you think and happy coding!

Craig Dunn, Principal Program Manager
@conceptdev

Craig works on the Mobile Developer Tools documentation team, where he enjoys writing cross-platform code for iOS, Android, Mac, and Windows platforms with Visual Studio and Xamarin.

Rajen Kishna, Sr. Product Marketing Manager
@rajen_k

Rajen does product marketing at Microsoft for Visual Studio for Mac, as well as mobile and game developer tools, focusing on .NET

Join me on March 2, 2018 for a Developer Tools AMA

$
0
0

A lot has happened since I last hosted a Reddit “Ask Me Anything” (AMA) nearly two years ago.

Our team launched Visual Studio for Mac in late 2016 and released it the following May. Shortly thereafter, we introduced live coding of mobile apps with .NET code with our Live Player. We made it easy to embed .NET into native applications with .NET Embedding and we have been working with Unity to deliver a great experience to their users. We completed Mono ports to the PlayStation 4 and Xbox One, made great progress in unifying Mono and .NET Core, shipped a prototype to run .NET in WebAssembly and brought CSS and Flex layout to Xamarin.Forms.

Note: the following short link will be updated once the Reddit AMA post is live.
Please join me in our Ask Me Anything with Miguel de Icaza on March 2, 12 – 2 PM Pacific Time.

Add to Calendar
03/02/2018 12:00 PM
03/02/2018 2:00 PM
America/Los_Angeles
Ask Me Anything with Miguel de Icaza
Please join the Reddit Ask Me Anything (AMA) with Miguel de Icaza on making .NET developers more successful with Microsoft developer tools: https://aka.ms/miguelama
https://aka.ms/miguelama

I look forward to answering the questions on what we have done, how we have done it and what we think about the future of mobile development in a Reddit AMA this Friday.

Miguel de Icaza, Distinguished Engineer, Mobile Developer Tools

Miguel is a Distinguished Engineer at Microsoft, focused on the mobile platform and creating delightful developer tools. With Nat Friedman, he co-founded both Xamarin in 2011 and Ximian in 1999. Before that, Miguel co-founded the GNOME project in 1997 and has directed the Mono project since its creation in 2001, including multiple Mono releases at Novell. Miguel has received the Free Software Foundation 1999 Free Software Award, the MIT Technology Review Innovator of the Year Award in 1999, and was named one of Time Magazine’s 100 innovators for the new century in September 2000.

Viewing all 1039 articles
Browse latest View live


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