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

Create a CI/CD pipeline to Azure Service Fabric

$
0
0

At //BUILD 2017, we shipped an update to the Continuous Delivery Tools for Visual Studio. This update has support for configuring a Continuous Integration and Continuous Delivery pipeline for ASP.NET Core projects with container support to an existing Azure Service Fabric cluster directly from Visual Studio 2017.

To configure continuous delivery to a Service Fabric cluster, first you need to create a preview version Service Fabric cluster. Start by creating a security certificate to secure administrative access to the cluster. Open a PowerShell console, login to Azure and select the Azure subscription that you want to deploy the cluster in then create and encrypt a password for the certificate used by Service Fabric to secure access to your cluster by running the following commands:

Login-AzureRmAccount

Select-AzureRmSubscription -SubscriptionId <subscription-id>

$pwd = "<your password>" | ConvertTo-SecureString -AsPlainText -Force

Keep your PowerShell console running and download the Azure Resource Management Template for Service Fabric azuredeploy.json and the sample azuredeploy.parameters.json locally. Edit the parameters file to name, size and secure your cluster as well as set its location. Ensure that the clusterCodeVersion is set to the preview version 255.255.5718.255. Once your configuration files are ready, create the cluster by running the following commands:

New-AzureRmServiceFabricCluster

 -TemplateFile C:\<your_working_folder>\azuredeploy.json `

 -ParameterFile C:\<your_working_folder>\azuredeploy.parameters.json `

 -CertificateOutputFolder C:\<your_working_folder>\ `

 -CertificatePassword $pwd `

 -CertificateSubjectName "<your_cluster_name>.<cluster_location>.cloudapp.azure.com" `

 -ResourceGroupName <your_cluster_RGname>

Once the Service Fabric creation is completed, the command will output cluster information to the console window and copy the security certificate to your working folder. Double click on the certificate to import it to the current user certificate store. Remember to mark the certificate key as exportable in the private key protection step and complete the import wizard. This will allow the Configure Continuous Delivery experience to export the key while configuring your release definition.

With a preview version of the Service Fabric Cluster, you can now configure Continuous Delivery from Visual Studio 2017 with the latest version of the Continuous Delivery Tools for Visual Studio extension. Create or open an existing solution with an ASP.NET or ASP.NET Core project. Add Docker support to the project and ensure that the solution is under version control on VSTS or GitHub. Right click on the solution in Solution Explorer and select Configure Continuous Delivery.

Select Configure Continuous Delivery in Solution Explorer Cropped

With Service Fabric Cluster as the Target Host type, select your newly created Serviced Fabric cluster to act as a target for continuous delivery.

Configure Continuous Delivery Dialog

Visual Studio will automatically pick up the cluster certificate from your user certificate store and verify the thumbprint. Enter the password for the certificate and select your Azure Container Registry then click OK. Once the configure continuous delivery completes, you will have a configured build and release pipeline for your project to your new Service Fabric Cluster.

To expose your web service outside its container you need to enable port mapping for your container by modifying the docker-compose.yml file for that project to enable the port mapping for your service. If you have multiple services, you need to do that for each of them.

version: '3'

services:
  <your_service_name>:
    image: <your_image_name>
    ports:
    -	“80:80”
    build:
      context: ./<your_service_context>
      dockerfile: Dockerfile

To expose these services outside the Service Fabric Cluster, you need to configure your load balancer to do so for each service port. By default, the current sample ARM template and parameter files load balance traffic on port 80 and 8081 for the cluster. If you need to configure other ports you can do so by adding new entries in your ARM template

"loadBalancedAppPort1": {
      "type": "int",
      "defaultValue": 80,
      "metadata": {
        "description": "Input endpoint1 for the application to use. Replace it with what your application uses"
      }

and modifying the values in your parameters file.

"loadBalancedAppPort1": {
      "value": 80
    },
    "loadBalancedAppPort2": {
      "value": 8081
    },

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 take this Microsoft DevLabs extension next. There’s a Slack channel and 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.


Getting hands on with Visual Studio for Mac, containers, and serverless code in the cloud

$
0
0

We are looking to improve your experience on the Visual Studio Blog. It would be very helpful if you could share your feedback via this short survey that should take less than 2 minutes. Thanks!

This week we released the second alpha of Visual Studio for Mac version 7.2, as well as some hands-on labs to try out some of the new features.

Visual Studio for Mac 7.2 Alpha

The alpha version of our next Visual Studio for Mac release includes new features such as:

  • Docker Containers – Join the microservices revolution, by testing and deploying your ASP.NET Core web apps to Docker containers. Visual Studio for Mac’s Docker support lets you easily deploy to a container as well as debug projects across multiple containers. Check out the hands-on-lab below to get started!
  • Xamarin Live Player – Get started building Xamarin mobile applications in minutes! Visit xamarin.com/live to learn how easy it is to try out mobile app development with your existing iOS or Android device and Visual Studio for Mac.
  • Azure Functions – Build and deploy serverless code in the cloud. Functions can be accessed by mobile or server apps, scheduled or triggered, and you only pay for the time they run. Follow the hands-on-lab below to write your first Azure Function.
  • IoT projects – Build, test, and deploy apps for Internet of Things devices. You can write IoT apps using C#, and deploy them to a Raspberry Pi, following our simple instructions.

To try out these features, download Visual Studio for Mac and switch to the alpha channel in the IDE.

More Hands-On Labs

Our latest hands-on labs for Visual Studio for Mac will help you get started with new features available in the 7.2 alpha. Visit the VS4Mac labs GitHub repo for past weeks’ projects using the Unity 3D game engine, Internet of Things devices, ASP.NET Core web sites, and Xamarin for mobile app development.

Today we’ve published two additional labs using: Docker Container support and Azure Functions projects.

Lab 5: Deploying ASP.NET Core to a Docker Container

Lab 3 demonstrated how to build, test, and debug an ASP.NET Core website on your Mac. This lab will show you how to run and debug an ASP.NET web site and web API in Docker containers, by completing these 4 tasks:

  1. Create a Docker-enabled ASP.NET Core web site
  2. Create a Docker-enabled ASP.NET Core web API
  3. Integrate two container apps
  4. Debug multi-container solutions

Follow the complete instructions to set up the two ASP.NET Core projects, make them work together, and debug them simultaneously.

Deploying ASP.NET Core to a Docker Container

Lab 6: Serverless computing with Azure Functions

“Serverless computing” is a new type of cloud feature where you can host a “function” without having to worry about setting up a server, or even an application, to run it in. Simply build and deploy your Azure Function, and it will be automatically hosted and scaled as required. You only pay for the time the function is running, it can respond to application requests, you can set up triggers, and it can access many different Azure services.

To build your first Azure Function and get started with serverless computing, follow these 5 steps:

  1. Create an Azure Functions project
  2. Create an Azure Storage account
  3. Create and Debug an Azure Function
  4. Work with function.json
  5. Work with Azure Tables

The hands-on-lab instructions will walk you through creating the Azure Functions project in Visual Studio for Mac, deploying it to Azure, and persisting data with Azure Tables. This feature is so new it is only available in the Alpha channel release of Visual Studio for Mac. You’ll need to install an extension for Azure Functions, which the instructions will help you with.

Get Started

Download Visual Studio for Mac today, and visit the VS4Mac labs repo on GitHub. Both this week’s labs just scratch the surface of the capabilities being demonstrated: Docker support enables new testing and deployment options, and Azure Functions opens up a new, easier way to interact with powerful Azure services.

With the Visual Studio Community edition it is easy and free to get started. Check out the docs for more in-depth information on Visual Studio for Mac, and leave a comment below to suggest additional hands-on-labs you’d like to see.

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.

New Xamarin University Webinar: Exploring UrhoSharp 3D with Xamarin Workbooks

$
0
0

Join me on Thursday, September 21 at 9 am PT / 12 pm ET / 4 pm UTC for my “Exploring UrhoSharp 3D with Xamarin Workbooks” webinar, where I’ll combine my love of graphics programming with my passion for helping developers build better apps. Whether you’re just getting started or an experienced developer, you’ll learn how to use your .NET and C# skills to create native mobile apps, complete with 3D graphics.

[REGISTER]

Xamarin University Logo

Lately, I’ve been exploring UrhoSharp, Xamarin’s C# and .NET wrapper of Urho3D. Urho3D is a sophisticated, powerful open-source 3D game engine written in C++ — and it allows developers to build 3D visualization and augmented reality applications. You can easily integrate UrhoSharp code into your Windows .NET and Xamarin apps, including Android, iOS, Mac, and more.

Part of the reason I’m excited about UrhoSharp: I love how graphics programming allows you to visualize something in your mind, then see it on the computer screen. About 10 years ago, I was heavy into 3D programming in the Windows Presentation Foundation, and I imagined a little two-lane highway in the form of a Möbius strip, with cars driving on the top, bottom, and sides. It looked great in theory, but I never found the time to code it.

As I became more familiar with UrhoSharp, the Möbius mental image came back, and I was determined to make it real.

I knew the math would be tricky, so I needed an immediate and interactive programming environment – and, with UrhoSharp and Xamarin Workbooks, my vision and my code came together. Xamarin Workbooks – an interactive blend of code and documentation that integrates C# code blocks into step-by-step guides – simplify learning mobile development, but it’s also great for coding and testing out new ideas. As you add C# code blocks, you’ll immediately see it executed on the screen, helping you learn as you go and make rapid changes to your apps’ appearance.

Urho Sharp

I’ll dig into the code for this project, share my advice for getting started, and I – plus other Xamarin University instructors and mobile experts – will be on hand to answer your questions.

Register now and join me on Thursday, September 21, at 9 am PT / 12 pm ET / 4 pm UTC for a Möbiusly graphical 3D experience.

We encourage all registrants to attend the webinar live, as we will be answering questions throughout the event. However, we will share recordings with registrants after the session, so sign up even if you’re unable to join us at the scheduled time. You can view an assortment of past sessions here.

Charles Petzold, Senior Content Developer, Xamarin University, Microsoft

Charles Petzold has been working with the documentation team at Xamarin since 2014, focusing primarily on Xamarin.Forms and writing the free downloadable book Creating Mobile Apps with Xamarin.Forms. Prior to joining Xamarin, Charles wrote several books on Windows programming, as well as two unique explorations of computer concepts and technology: Code: The Hidden Language of Computer Hardware and Software and The Annotated Turing: A Guided Tour through Alan Turing’s Historic Paper on Computability and the Turing Machine. He often spends his weekends working on a book about the origins of analog computing. Web site: charlespetzold.com

A significant update to the XAML Designer

$
0
0

The XAML designers in Visual Studio and Blend have been powerful tools for developers and designers alike to build beautiful user experiences for Windows applications. Initially designed for WPF development in 2007, we have made significant changes to support a wide variety of XAML platforms over the last decade. We’ve also added new features along the way to increase developer productivity. Unfortunately, with all these changes, the performance and reliability of the designer have become less than ideal. We’ve heard the community loud and clear and we are working hard to fix that.

Read below to find out what’s new, and try out the updates to the XAML Designer by building UWP applications targeting the upcoming Windows 10 Fall Creators Update in the latest Visual Studio Preview release! If you want to see all the details, check out the release notes.

Important note about this release

This release of the updated XAML designer is a very early preview of what’s to come and might be rough around the edges. The drastic nature of the changes has resulted in us disabling some of the features that previously existed in the XAML designer, as well as shipping with known issues (called out in the release notes). As a result, we are only releasing the updated designer for a small subset of XAML scenarios – specifically, for developers building UWP applications that target the Fall Creators Update. If you were building a WPF application or a UWP application targeting the existing Windows 10 Creators Update or earlier, your experience will remain unchanged.

Design considerations

We have received a lot of community feedback on the XAML designer, and based on the feedback, we’ve prioritized the below design consideration:

  1. Improve the designer performance in a significantly visible way (I can’t reiterate enough how much we are emphasizing performance)
  2. Highest possible fidelity of the designer surface – especially focused on rendering artifacts introduced by the new Windows Fluent Design System
  3. Fewer designer exceptions to keep you as productive in the design surface as possible
  4. While we rapidly iterate on this new experience, do not break or change existing XAML development in Visual Studio and Blend
  5. Last but not the least, create the tools that help you be more productive building Windows experiences

We believe we have made significant progress to achieve these goals and are excited to share our first iteration for you to try and provide feedback. Our ultimate goal is to make the designer load as fast as your app, and offer tooling experiences for your page to render the contents of any of your controls at design time.

Performance

Much of our efforts have been directed at making the design surface process as thin and lightweight as possible. Effectively a wrapper around your UI code, the XAML Designer will now load nearly as fast as your app itself.

You can see this in action below. On the left, we have a project targeting the Fall Creators Update (therefore, leveraging the changes we have made to the designer). On the right, we have an identical project targeting the Creators Update (therefore, using the XAML design experience that you would see today). After reopening the solution, you can tell the XAML designer changes we have made result in an exponentially faster loading time. The designer on the right may look like it is stuck, but if you look closely you can see the loading bar at the top of the designer. Be patient and you’ll see it load eventually!

XAML Designer Performance - side by side comparison

Fidelity

At the Build 2017 event back in May, Microsoft announced the new UI design system known as Fluent. With the Fall Creators Update, we are beginning to introduce new controls built on this new universal design language. Fluent places heavy emphasis on the core building blocks: light, depth, motion, material, and scale. To achieve these UI effects, heavy use of composition is necessary.

The existing XAML designer does not execute code in the design process that leverages composition APIs and therefore cannot render many of these new experiences. A clearly visible example is demonstrated below, with the new Fall Creators Update ‘AcrylicBrush’ resource. The left shows the XAML designer in this preview and the right shows the XAML designer as you would have experienced it in a previous release.

XAML Designer

Reliability

Previously, the XAML designer always executed against the desktop .NET Framework. Since UWP is built on top of .NET Core, this would sometimes result in reliability issues as the design process had problems with .NET Core types (e.g. System.Numerics.Vector2). Going forward, the XAML Designer will always execute against the .NET runtime environment used by your application, so type forwarding issues are mitigated and general reliability of the designer should be improved.

The XAML designer has been successful at providing a meaningful design-time preview of your UI because we try to execute your code as close as possible to the runtime environment of your app. One side effect of this is that misbehaved code doesn’t work well, something that you can continue to protect with design mode APIs.

With that in mind, there are still cases where code in development may cause exceptions and crash the designer. By investing in making the designer load in just a couple of seconds, we believe it will be much easier to iterate more quickly on your work-in-progress code.

Built from the Ground Up

For us to be able to make a big impact on our top priorities, the XAML Designer needed to undergo a drastic architectural change. In addition, we wanted to provide investments that would improve all XAML development experiences, including XAML Edit & Continue. With that in mind, we decided to use the same technology that powers XAML Edit & Continue to power the future of the XAML Designer.

Let’s take a deeper look at some of the other big changes that warrant a reinvestment. This next section is for those of you interested in knowing the nitty-gritty details of the changes we are making to the XAML designer.

Architecture Changes

At a high-level, the architecture change consists of a redesign of the designer surface process (UwpSurface.exe) to be as lightweight and small as possible. The xdesproc.exe process, used by the existing XAML designer, did a lot – it contained the code to all the XAML editor and design features (in WPF), it would load in type metadata for your app and the developer’s ViewModels, and it also executed actual design process to show the preview in the XAML designer. If any one of those had a problem, the design process would crash. Restarting the designer (or opening a new page) would take too long because the process itself would be doing so much work every time you load a new page.

With this XAML designer update, we are making the design surface process (UwpSurface.exe) as thin and lightweight as possible. It is effectively a wrapper around your app’s UI code (this is where the technology that enables XAML Edit & Continue comes in). Since the process itself is doing so little, loading the XAML designer should be as fast as launching your application when we are all done with the effort.

Since UwpSurface.exe will still run your controls, you need to be careful with your code behind to not crash the designer – for instance, you must still not dereference your application object at design time. With the redesign, UwpSurface.exe offers additional rendering capability so we have introduced a new design mode API: Windows.ComponentModel.DesignMode.IsDesignMode2Enabled. This allows you to control runtime code execution for the new designer surface process, and continue to offer checks when the same code executes in the existing designer. Our expectation is that you will be able to relax many of the design time checks you might have added in the past. Check out the docs for more information.

In addition, xdesproc.exe had a significant dependency on the desktop .NET runtime. For UWP applications, this hasn’t had a large impact in the past. Much of the .NET API surface area for UWP was just a subset of the desktop .NET Framework, but xdesproc.exe still had problem instantiating types that did not existing in the desktop .NET Framework (like System.Numerics.Vector2).

With the introduction of the Fall Creators Update and .NET Standard 2.0, this problem becomes worse and needs to be a fundamental design principle. If you were trying to leverage a new .NET API available in .NET Standard 2.0 that wasn’t available in the desktop .NET Framework (e.g. Span<T>), the design surface would have crashed. With this preview of the XAML designer, we are executing your code against the runtime that matches your app – so a UWP application will execute against the .NET runtime environment for UWP.

Feature Impact

It is worth calling out again that this is a very early preview of the XAML Designer, primarily designed to get feedback around your reliability and performance, in addition to helping us identify the tools you rely on most for productivity. The set of functionality that we enabled in this preview was identified as the tools and features that you currently use the most.

The XAML designer does not support the below features:

  • Edit Current Style
  • Device preview settings that allow testing for high contrast, themes, etc…
  • Visual State Management tools
  • Animation tooling
  • Sample data, but designer instance is supported
  • Ordering commands
  • Alignment commands
  • Group into commands
  • Combine commands
  • Path commands
  • Make Into Control
  • Text edit tool
  • Resource panels in Blend
  • Data panels in Blend
  • Design time resource dictionary
  • Some of the tools in Blend tool pane
  • Editing inside of a template
  • Designer extensions
  • Behaviors tooling in Blend

Known Issues with this Release

As we called out earlier, this is a very early preview of what’s to come. In order to get customer input as early as possible, we had to make some hard engineering decisions. With that in mind, we are aware of several issues with the new XAML Designer that are called out in the release notes.

Roadmap

As we continue to acquire feedback from our early preview releases of the XAML designer, we will continue to prioritize reimplementing the top requested tools. We will continue to improve the XAML designer with heavy emphasis on our design considerations. When we have confidence that the designer provides more productivity than the existing designer and does not break any existing workflows, we will deliver these benefits by default for an increasing number of XAML scenarios.

In addition, we will be collaborating with top designer extension developers as we reimplement the XAML designer extensibility model in support of their goals.

We look forward to building the best XAML designer for developers by engaging with the community early and heavily prioritizing our investments around their feedback.

Conclusion

We’ve made a lot of progress with our updates to the XAML designer, but there is still a lot of work to be done in reimplementing the tools you have known and love. For us to provide the most meaningful design-time tooling for all XAML developers, we need your feedback!

If you’d like to help us shape the future of the XAML designer, go ahead and give it a try by creating a UWP project that targets the Fall Creators Update. If you encounter any unexpected behavior, or find that tools that you rely on are missing, please let us know by using the Visual Studio Report-a-Problem tool. In addition, we would love to talk to you about your experience or help you with any blocking issues. Feel free to reach out to us via email at xamldesignerfeedback@microsoft.com. We’re eager to hear what you think!

Daniel Jacobson, Program Manager for Visual Studio
@pmatmic

Daniel is a Program Manager on Visual Studio focused on tools for Universal Windows Platform developers and NuGet. He found his passion in software development after graduating with an M.S. in Mechanical Engineering from Case Western Reserve University in 2014.

Debug live apps in Azure with the Snappoints and Logpoints preview

$
0
0

At Build, we introduced the Snapshot Debugger: a new tool that enables you to debug production environments in Azure with minimal impact. The Snapshot Debugger enables you to get to the root cause of the “but it worked locally!” production issues with ease. We previously released functionality to automatically capture snapshots when your app runs into problems, now you have more fine-grained control to debug your production app with two new features in Visual Studio: Snappoints and Logpoints.

The Snapshot Debugger is currently in preview for ASP.NET apps running on Azure App Services – try it out. Note: the Snapshot Debugger is currently preview software – please use it in a testing or staging deployment of your app.

Debugging production is hard

Quickly diagnosing and fixing production issues is one of the hardest tasks you may face while developing cloud scale apps. There’s several challenges that can make diagnosing the root cause of production issues costly:

  • Issues may not repro locally (due to intricacies in production data, scale, or config)
  • Logs may not contain enough details of the issue
  • It’s not clear what steps a customer took to run into the issue

Due to these challenges, fixing a production issue can feel a little like this:

The Snapshot Debugger extends the Visual Studio debugger you know and love to debug apps running at scale in Azure. You can use the Snapshot Debugger to debug production issues directly in production as they happen. The Snapshot Debugger follows a few key principles:

  • Close to zero impact to production
  • Retain the functionality and ease of local debugging
  • Support debugging highly distributed apps running on multiple servers
  • Secure access to production data: only resource admins can debug

Currently, the Snapshot Debugger preview works for ASP.NET and ASP.NET Core apps running on Azure App Service (additional platform support will be announced in the next few months). You can then right click your Azure App Service in the Cloud Explorer inside Visual Studio and Attach Snapshot Debugger.

Start snapshot debugging

Debug production state without halting

Snappoints bring breakpoint-style local debugging to a cloud scale. Unlike breakpoints, they do not halt your app: instead, they take a snapshot of relevant info (i.e. call stack, objects on the heap), and continue execution. You can also add conditions to Snappoints to only capture information on interesting or problematic requests to your app.

You can place a Snappoint in your code exactly like you would a breakpoint: by clicking the breakpoint gutter on the line you are interested in debugging or by pressing F9. You can then click the Start Collection or Update Collection button to turn on Snappoints placed in your app. When your app executes the line containing the Snappoint, a snapshot will be taken. You can open this Snapshot from the Diagnostic Tools Window to view the Call Stack, Locals, and Watches, as well as evaluate expressions, at the point of time when the snapshot was taken. The app is still running: end users will have no idea you are currently debugging.

Add and Use Snappoint

Snappoints take a full process snapshot of your app when the line you specify executes. This snapshot takes 10-20 milliseconds to capture and consumes a few hundred kilobytes of memory on your server. Almost zero impact can be measured in your app while taking snapshots. Additionally, Snappoints work well against release-optimized code – you can use them directly on your production deployment.

While you cannot step from a snapshot in Visual Studio, you can place multiple Snappoints in your app to see how state changes between lines. The Snapshot Debugger will ensure multiple snapshots are captured from the same end user interacting with your app.

Add logging to live apps, on the fly

Have you ever spent hours sifting through your logs, only to realize your app isn’t logging the data you need? Logpoints enable you to add temporary logging to your app, without modifying code or redeploying.

You can place a Logpoint in your code by hovering over the Settings gear on a Snappoint. In the Settings page, check Actions and type in the Message you would like to log. You can evaluate expressions and variables in your message inside curly braces: {MyInstance.Field}.

Add and Use Logpoint

Log messages can be sent to two places. Check Send to Output Window to live stream new log messages back to Visual Studio. Check Send to application log to send messages to your app’s logging framework. Messages sent to application log will be traced via System.Diagnostics.Trace in .NET Framework and via ILogger in .NET Core: you can add listeners to your app to route these traces wherever you want.

Expressions or variables placed inside messages are virtually interpreted. Due to this, they cannot cause any side-effects to your app. However, some native properties cannot be evaluated.

Try out the preview

The Snapshot Debugger is currently in preview: download and try it out. Currently, you require Visual Studio 15.4 Enterprise, as well as an ASP.NET (4.6.1+) or ASP.NET Core (2.0+) app running in Azure App Services.

We’d love to hear your feedback: please take this short survey or contact our team directly to report issues, provide suggestions, or tell us your success stories.

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.

7 More Lesser-known Debugging Tactics for Visual Studio

$
0
0

So, you really liked learning about 7 Lesser Known Debugging Hacks for Visual Studio? Good news is that there is always more to learn! The Visual Studio debugger is an enchanting creature that can save you loads of time while finding and fixing issues in your application. It is bursting with tools that can make debugging easier… if you know they exist, and where to find them! Let’s look at 7 more lesser-known goodies you can use to #SuperChargeYourDebugging.

1. Edit the value of a variable without changing code

Are you ever debugging when you get to a variable and it isn’t what you think it should be? Or maybe you just want to change it to see how the code would behave with a different value? You can easily do this while debugging simply by editing the value of the variable in memory using whichever method fits best into your flow: DataTips, the Autos, Locals, or Watch windows, or the Immediate window.

A. Hover over the variable to get a DataTip and then single click on the value in the table or right click and choose “Edit value” from the context menu. An edit cursor appears and you can provide a new value for the variable.

Data Tip Edit Value

B. In the Autos, Locals, or Watch windows double click on the value in the grid or right click and choose “Edit value” from the context menu. The value becomes editable and you can provide a new value for the variable.

Local Value Edit

C. In the Immediate window, you can use code syntax to reassign the variable to a new value. For example, you can type “x = 12;” which would change the in-memory value of the in-scope variable x to be the number 12. This method is most beneficial if you need to create or manipulate a variable before assigning it.

Immediate Window Edit Value

2. Look at values throughout recursive function calls

Do you typically find yourself debugging recursive functions using many statements of Debug.WriteLine()? It can be hard to keep in your head how the recursion will play out. One helper for this mental load, can be to use the Parallel Watch window to see the change in the variables of the recursive call.

  1. Open the Parallel Watch window (Debug/Windows/Parallel Watch).
  2. Click “<Add Watch>” and type in the name of a variable you care about.
  3. As you debug through the recursive calls, you will see them added in new rows in the window

Parallel Watch

3. Show parameter values in the Call Stack

Most developers use the Call Stack like a map for their current context in their debugging session. It provides history on where the code calls have happened to get into this state. It can be extra helpful to bring in additional information to orient yourself, like parameter values.

  1. Right click on a frame in the Call Stack.
  2. In the context menu select the option to “Show Parameter Values”
  3. Now see the values are inline directly as part as the input parameters in the Name column

Note: There can be performance impact to your debugging session when “Show Parameter Values” in on and the call stack is visible. We recommend turning the option off when you are not actively using it.

CPP Call Stack Parameter Values

4. Break on a function without manually finding the source

Are you ever thrown into a situation where you know what you need to debug, but finding the source file that contains that code is going to be a bit challenging? One quick way to set a breakpoint in the debugger without needing to know which file and line the code resides in is by setting a Function Breakpoint.

  1. Press CTRL+B. Or select Debug/New Breakpoint/Function Breakpoint.
  2. Type in the name of the function that you wish to break on. Click OK.
  3. Start debugging, trigger your code to execute, and watch as you stop at a magical breakpoint in a source file that you didn’t have to find manually.

Function Breakpoint

5. Flag threads and run all of them to the same location

When debugging multithreaded code, odds are you are going to hit breakpoints and take steps that result in the program advancing other threads. Sometimes to inspect a bug, it might be easier to have all the threads stopped at the same place so you can inspect the state of the program at that time. There is an easy way to do this by flagging threads and then triggering Run Flagged Threads to Cursor.

  1. Figure out which threads you are interested in. You can use Show Threads in Source, the Parallel Debugging windows, or the Threads window.
  2. Choose the Flag icon to mark the threads you are interested in.
  3. Right click on the line of code where you want to inspect the application.
  4. In the context menu select Run Flagged Threads to Cursor.

Note: There can be noticeable performance impact to your debugging session when Show Threads in Source is turned on or any threads related windows are visible. We recommend only choosing these features when you are actively using them to debug.

Run Flagged Threads

6. Switch active threads to see the context

The parallel watch window is great for seeing many variables across threads, even ones that you have not stopped on. But what about when you want to inspect a detailed state of the application on that thread? The yellow arrow shows the current instruction on the current thread and that sets the context for the rest of the debugger. The Watch windows, Data-tips, and Call Stack all show the state at this context. The debugger makes it easier for you to switch this context by letting you Switch to Thread…

  1. Select the thread that you want to inspect. You can identify it using Show Threads in Source, the Parallel Debugging windows, or the Threads window.
  2. Right click on the thread, and select Switch to Thread… and choose your thread.
  3. Notice how the yellow arrow changes to that thread’s location and the other windows now have that context.

Switch Threads

You can also switch your current debugger context by using the Debug Location Toolbar. Click the drop down that enumerates the threads in the program and select a thread to switch to. The Debug Location Toolbar is a great tool to use if you are noticing performance impact from having other thread related features visible. The features of this toolbar do not significantly impact performance and can be used as a shortcut for many threaded scenarios I mention.

Debug Location Toolbar

Note: There can be noticeable performance impact to your debugging session when Show Threads in Source is turned on or any threads related windows are visible. We recommend only choosing these features when you are actively using them to debug.

7. Stop when a variable value changes in C++ code

It can be hard to track down where a specific variable is changing its value. For native developers there is a special breakpoint type, the Data Breakpoint, that can help you track down issues caused by variables being manipulated unexpectedly.

  1. Stop at a place in code after your object has been created in memory.
  2. Select Debug/New Breakpoint/Data Breakpoint.
  3. Type in the address of the variable you want to know about. For example, &MyVariableName, or 0x0085F918
  4. Select the number of bytes starting at that address that you wish to monitor.
  5. Trigger the breakpoint and the debugger will stop on the line of code that modified that memory address.

Data Breakpoint

Note: It is important to remember that memory addresses are different every time you start debugging so you will need to clear out and reset your Data Breakpoints every time you start a new debug session. The number of Data Breakpoints that you can have active at a time is limited by the hardware of your environment and the debugger will warn you when you reach that limit.

Learned Something? Let us know!

What is your favorite lesser known debugging feature? Comment below!

Kaycee Anderson, Program manager, Visual Studio Debugger, and Diagnostics
@KayceeSue

Kaycee is a program manager working on the Visual Studio Debugger. She is passionate about delighting developers with core debugging experiences to help them find and fix issues in their code faster. She wants to help you #SuperChargeYourDebugging.

Source Control Showcase: Integrating Subversion and Perforce into Visual Studio 2017

$
0
0

Last year, we highlighted the new extensibility points for our source control providers. These hooks allowed them to take advantage of our start page and status bar to provide their users a more integrated experience in Visual Studio. Two of our partners, VisualSVN and Perforce, have taken advantage of this opportunity and we’re excited to be able to showcase the work they’ve done!

VisualSVN

With over 400,000 installs, VisualSVN is one of our most popular source control extensions.  In their current extension for Visual Studio 2017, you can now quickly add Subversion source control to your solution via the “Add to Source Control” button in the status bar.

VisualSVN Add to source control
Once you’re in a Subversion-controlled solution, you’ll be able to quickly manage your branches as VisualSVN offers the options to create, switch, or merge branches right from the status bar.

VisualSVN Branches

Keep an eye out for their future updates, which will include integration with the Visual Studio start page!

Perforce

Perforce is a leading source control provider for organizations with scalability and performance needs. While you can’t get your hands on the updated Perforce extension just yet, we’re giving you a sneak peek at what will be available for download at the end of September. You’ll be able to use the status bar to add your solution to source control and leverage the Helix versioning engine. Once in a Helix-controlled solution, you will be able to see and access your pending changes through the status bar.

Perforce Add to Source Control

Perforce Add to Source Control

If you’d like to open an existing project, you can use the Helix provider on the start page. Simply click on the provider and it will lead you through the steps to add a connection to your depot and select the project you’d like to open.

Perforce Start Page

As well, if you open this project later from the start page Recents list, it will automatically prompt you to restore the connection so that you can open the project and get back to work quickly.

Perforce MRU

Try it out

We strive to make our source control integration flexible to allow our various partners to address their customers’ needs and it’s been great to see how VisualSVN and Perforce utilized different features to create the best flow for their users.

We encourage anyone interested in source control to try out our extensibility points for themselves and encourage your favorite source control extensions to take advantage of these features. Check out our status bar and start page integration samples to get started!

We love hearing your feedback so please let us know if there’s anything else we can do to better support source control integration within Visual Studio. For any suggestions or issues, please go to DeveloperCommunity.

Allison Buchholtz-Au, Program manager, Visual Studio Platform

Allison is a Program Manager on the Visual Studio Platform team, focusing on streamlining source control workflows and supporting both our first and third party source control providers.

Visual Studio and Xamarin take iOS support to 11

$
0
0

With the first wave of new iPhone 8 devices landing in people’s hands, and the installed base of iOS 11 users growing rapidly, it’s an exciting time to build apps for iPhone and iPad, as well as macOS and the new 4k Apple TVs and Cellular Apple Watches. Of course, Visual Studio and Xamarin are ready to enable you as .NET developers to create native mobile apps for these new devices with C# and F#. We are excited to share with you that with our latest release of Xamarin.iOS on Mac and Windows, you now have access to all the latest features of the Apple’s new hardware.

iOS apps with Visual Studio Tools for Xamarin

If you haven’t tried app development with Xamarin yet, it’s available as part of Visual Studio on PC and Mac (including the free Visual Studio Community Edition) and enables you to build apps for iPhone, iPad, Apple Watch, and Apple TV – using C# and F#.

This year, we’ve continued our tradition of shipping support for Xcode 9 within 24 hours, with a preview release on September 13 that enabled Visual Studio users to build and submit their iOS 11 apps to the App Store. On September 19, we updated Visual Studio 2017 and Visual Studio for Mac to support Xcode 9.

Xamarin iOS 11 support

Augmented Reality, Machine Learning, and more!

To help you implement the new features, we have made C# samples available for you to take a look at. Here are some of the things we can’t wait to see you add to your apps using Xamarin:

Augmented reality with ARKit

Apps can detect surfaces to host 3D content, place objects in 3D space, and let ARKit track the user’s position and interactions on the screen. Your AR experiences can be built with SceneKit, or the cross-platform UrhoSharp 3D platform, which allows for sharing code with other mixed reality systems including HoloLens.

Applied Machine Learning with CoreML

CoreML provides a simple API for running machine learning models on iOS devices, including difficult problems like image feature recognition. Models must be pre-trained, and Apple provides a number of examples to get started, but you can also train your own models with Azure Custom Vision Service, and include those in your iOS apps using Xamarin.

Vision Framework

The new Vision framework includes image-processing and analysis features, including face and object detection, and barcode recognition. They become even more powerful when coupled with CoreML and Azure Cognitive Services – image and video data from Vision can be analyzed either on the device or in the cloud.

Drag and Drop

iPad users can now drag and drop text, images, and more between apps. New APIs let you implement the functionality in your own apps, with support for multi-touch dragging and spring-loading to assist with mid-drag navigation.

Other improvements

iOS 11 also contains improvements across the board, including clustering support for maps, the ability to work with PDFs, access to the NFC reader, depth maps from supporting device cameras, and lots more.

Get started with iOS 11 today

Put your C# skills to use building mobile apps with Visual Studio and Xamarin:

  1. If you haven’t already, get Visual Studio, which includes Xamarin
  2. Download and install our iOS 11 support by updating to Visual Studio 2017 version 15.3.5 and Visual Studio for Mac 7.1.5.2
  3. Check out our documentation and samples to learn more
  4. If you find a problem, report it via “Report a Problem” in the Help menu
Joseph Hill, Principal Director, Program Management
@JosephHill

As Principal Director PM for Mobile Developer Tools, Joseph Hill is responsible for Microsoft’s mobile development tools in Visual Studio. Prior to joining Microsoft, Joseph was VP of Developer Relations and Co-Founder at Xamarin. Joseph has been an active participant and contributor in the open source .NET developer community since 2003. In January 2008, Joseph began working with Miguel de Icaza as Product Manager for his Mono efforts, ultimately driving the product development and marketing efforts to launch Xamarin’s commercial products.


The Latest in Developer Productivity and App Experiences

$
0
0

Whatever the language or platform, developers want the same thing – to create app experiences that are high-quality, intelligent and personalized. Experiences that delight users and keep them engaged. To do that, we need tools that increase our productivity, so that we spend more time on what matters most to our app’s success.

At Connect(); 2017 we are showcasing new tools and services that demonstrate Microsoft’s commitment to developer productivity and incredible app experiences.

Visual Studio App Center – Build, Test, Deploy, Engage, Repeat.

Today we announced the General Availability of Visual Studio App Center (formerly known as the Mobile Center Preview), a groundbreaking new developer service that helps you ship apps more frequently, at higher-quality, and with greater confidence. App Center is designed for all apps targeting iOS, Android, Windows, and macOS, whether written with Swift, Objective-C, Java, C#, Javascript, or any other language.

Visual Studio App Center - Build Test Deploy Engage Repeat

Delivering fantastic app experiences takes more than great authoring tools. You also need to continuously build, test, deploy, and monitor real-world apps usage, and iterate. One option is to stitch together multiple products into a workflow, but maintaining and building connections between these systems introduces risk and costs time, which takes you away from your mission of creating great apps.

That’s why we created App Center, a one-stop service for everything you need to manage your app lifecycle. Just connect your repo to App Center, and within minutes automate your builds, test on real devices in the cloud, distribute apps to beta testers, and monitor real-world usage with crash and analytics data. All in one place. You can use all of App Center or mix-and-match just the services you need.

Mix and match just the services you need

With App Center, you can:

  • Build your apps in the cloud, with every commit or on-demand, without managing build agents
  • Test apps on thousands of real iOS and Android devices using XCUITest, Espresso, Appium, and other popular test frameworks
  • Distribute your apps to beta testers and users on Android, iOS, Windows, and macOS with every commit or on demand. And when you’re ready, deploy to public app stores or Intune
  • Monitor apps for crashes and create automatic work items in your bug tracker
  • Analyze user behavior with out-of-the-box reports, custom event tracking, and continuous export to Azure Application Insights for deeper analysis
  • Engage your users with push notifications

For a deeper dive on App Center, check out Keith Ballinger’s post on the App Center blog.  Or just give it a try – sign up and let us know what you think.

Visual Studio Live Share

Today we also announced that we’re working on a new feature we call Visual Studio Live Share. Getting quick peer feedback and demonstrating your work can be tough. Screen-sharing solutions don’t convey the full context or enable the developers to independently explore the source code or debugger state. If you need to set up an environment or sync a repo to collaborate, you often won’t bother. Calling someone over to your desk is great, but it’s not possible when you work with remote teammates.

With Visual Studio Live Share, you can share the full context of your code with your teammate instantly and securely. Your teammate can edit and debug with you in real-time in their personalized editor or IDE, enabling real-time collaboration. Learn more about Visual Studio Live Share.

Visual Studio Tools for AI

When creating an application, some features are much easier to build when using a special-purpose library, like compressing files or generating a PDF. Making intelligent applications is no different: trained deep-learning models are like libraries you can include in your app to do amazing new things like recognizing objects in pictures, translating speech, and more.

To make it easier for you to infuse AI into your apps, we’ve made Visual Studio a great place to train the models you need and then use them in your application like any other resource. And today we are proud to announce Visual Studio Tools for AI, a free extension that works with Visual Studio 2015 and Visual Studio 2017.

This new extension makes it easy to get started training models using any of the popular deep learning frameworks including TensorFlow, CNTK, Theano, Keras, Caffe2 and more with new VS Project templates. Visual Studio is a great IDE to train your models because it’s so easy to step through and debug the training code. Models are often written with Python and Visual Studio is a powerful Python IDE.

We also integrated TensorBoard monitoring within Visual Studio. You can use TensorBoard to visualize the quality of your model, plot quantitative metrics about the execution of your graph, and show additional data like images that pass through it.

Visual Studio Tools for AI Run TensorBoard and view Graphs

To make you even more productive when training your models, Visual Studio Tools for AI integrates with Azure Batch AI and Azure Machine Learning services, so that you can submit deep learning jobs to Azure GPU VMs, Spark clusters and more. Many developers test their models on smaller data sets on a dev box, and then train against larger datasets in the cloud. And running your code in the cloud doesn’t mean you have any less visibility with the integrated job monitoring in Visual Studio Tools for AI. You can even upload data and download logs and models all from within Visual Studio.

Visual Studio Tools for AI integrates with Azure Batch AI and Azure Machine Learning services

Once training is complete, building intelligent applications in Visual Studio is as easy as putting your trained model in your app just like any other library or resource. Having your model-training code with your app code, using the same process to manage your complete solution helps provide a seamless way to design, build, validate, and deploy your intelligent app end-to-end.

For more details on Visual Studio Tools for AI, check out the extension in the marketplace.

Visual Studio for Mac

The latest Visual Studio for Mac offers something for everyone. For mobile developers, our iOS development experience is smoother, as Visual Studio can now make use of Fastlane to automatically set up your devices for development and manage the provisioning profiles for you. It also fully supports the new iOS 11, tvOS 11 and watchOS 4 APIs. Along with support for the new .NET Core 2, we also have added Docker support allowing your web backends and applications to be deployed directly to Azure App Service from the IDE. And VSTest support gives Visual Studio for Mac developers an integrated experience for a wide array of popular test frameworks, including MSTest and Xunit.

For more details, check out the Visual Studio for Mac release notes.

Xamarin

With .NET Embedding, developers can now turn their .NET Code into native libraries for Android and iOS, which can be integrated into existing codebases written in Swift, Java or Objective-C. And, we are now shipping the Xamarin Live Player as a preview in Visual Studio and Visual Studio for Mac, enabling developers to write code that is updated live as on their device or simulator as they code, changing the way you will develop mobile applications forever.

More details are available on Joseph Hill’s post on the Xamarin blog.

First class Kubernetes support

Building containerized, microservices based apps is difficult. Kubernetes has made it easy to deploy and run containers but you still have to figure out how to work on your code in the context of the overall application. Collaboration with other developers is tricky as they make changes to other microservices in the same app. Visual Studio Connected Environment for AKS enables you to rapidly and safely develop, debug and test your microservices by extending your local dev experience to a Kubernetes based environment on Azure. You get the full experience of working in Visual Studio and Visual Studio Code but you are always working on your code within the context of other microservices that your code supports or depends on.

Learn more on Scott Hanselman’s blog post.

Visual Studio Team Services

We now offer Mac build hosts to build your iOS, Mac, and tvOS applications.  We have also delivered a completely new, powerful, command line interface for Visual Studio Team Services.

Check out Brian Harry’s blog for more details.

Join us!

Join us for the rest of Connect(); 2017 for live-streamed and on-demand technical sessions, as well as hands-on training. There’s never been a better time to be a developer, especially with Microsoft’s developer tools and services helping you at every step of the way.

Nat Friedman, Corporate Vice President, Mobile Developer Tools

Nat is CVP for the Mobile Developer Tools team at Microsoft. He co-founded Xamarin, Inc. with Miguel de Icaza in 2011 and served as CEO through acquisition by Microsoft in 2016. Earlier in his career, Nat served as CTO for the Linux business at Novell, co-founded Ximian with Miguel in 1999, and co-founded and served as chairman of the GNOME foundation in 1997. He is passionate about building products that delight developers. Nat has two degrees from MIT and has been writing software for 27 years. He is an avid traveler, active angel investor, and a private pilot.

Keep Your Skills Up to Date: New Training and Azure Resources

$
0
0

Finding better ways to upskill is a consistent topic that comes up when we talk to you about what’s top of mind. It’s no wonder when the one constant in our industry is change with new techniques, frameworks, tools, and languages emerging all the time.

Developers by nature are extremely self-reliant when it comes to dealing with this change. Over 90% of the respondents on StackOverflow’s 2017 Developer Survey indicated that they were at least partially self-taught. Whether through coding boot camps, online courses, online forums/Q+A, or joining an OSS project, you are using a variety of ways to level up your skills and hone your craft for work and for fun.

What kind of learning do developers recommend

Source: 2017 Stack Overflow Developer Survey – https://insights.stackoverflow.com/survey/2017#education

With this in mind, we’re always looking for ways to help you invest in your own development. Today I’m happy to announce several new resources that we hope will do just that:

Dive into Data Science

One topic of particular interest lately for many is data science – more and more of you are being asked to work on data-intensive projects or are simply interested in building a stronger foundation of knowledge to take on more advanced analytics and ML projects in the future. We’re pleased to offer a subscription to DataCamp which allows you to master data analysis from any browser, at your own pace, tailored to your needs and expertise. Whether learning R, Python or Data Visualization, DataCamp provides an intuitive learning platform with interactive lessons, engaging videos, with no need for software to install or hardware requirements. All Visual Studio subscribers receive a complimentary 3-month subscription and Dev Essentials members receive a complimentary 2-month subscription to DataCamp.

DataCamp Course and Track Listing

Explore New Career Moves while Building Technical and Non-Technical Skills

We’re excited to partner with LinkedIn for the first time to bring our subscribers LinkedIn Learning. Building off Lynda.com’s catalog LinkedIn Learning brings together technical training with interesting non-technical subjects like leadership, management, marketing and design (many of which we hope will be of interest to all of you, but especially those looking to pursue an entrepreneurial path). On top of this LinkedIn Learning can help you connect with others in your area of specialization, explore new areas, and get job/salary insights. Visual Studio Enterprise subscribers receive a complimentary 6-month LinkedIn Learning subscription and Visual Studio Professional, Visual Studio Test Professional and MSDN Platforms subscribers and Dev Essentials members receive a complimentary 3-month subscription to LinkedIn Learning

LinkedIn Learning

Build Hard Core Technical Skills

As many of you know we’ve partnered with Pluralsight for the past few years to provide our subscribers with on-demand access to a digital ecosystem of learning tools, skill tests, interactive labs and live mentoring. Today, we are announcing changes to the current benefit: for a limited time, all Visual Studio subscribers will have full access to the entire training catalog from Pluralsight. Enterprise subscribers receive a complimentary 6-month subscription, and Professional, Test Pro and MSDN Platforms subscribers get 3-month complimentary subscriptions. Visual Studio Dev Essentials members continue to receive 3-month subscriptions to access Pluralsight’s full catalog.

Pluralsightss full catalog

Faster Access to Help when you need It

Getting your Azure development questions answered quickly is important. To help, we’re announcing two new resources:

  • Azure Forums: We are now offering one day response time to questions across 21 forum topics ranging from Azure API Management to Azure SQL Databases. Staffed by community members and the Azure engineering team, subscribers can trust their question will be answered by Azure experts. Check out the Azure Community support tile on my.visualstudio.com to access these forums.
  • Azure Advisory Chat: Azure Advisory Chat is a helpful resource for you as you build Azure solutions using the Visual Studio tools and services.  Chat is a real-time way to get guidance on any Azure questions, big or small.  Our expert support engineers are available 24 hours a day (M-F) to help you whether you are just getting started or already deploying business-critical workloads on Azure.  Support engineers will work with subscribers to set up new tenants, provide basic support for identity and networking, discuss approaches to application migrations, and much more.  Visual Studio Enterprise and Visual Studio Professional subscribers now have access to this benefit.

Activate your new benefits to get started right away.  Visit the Visual Studio site, to learn more about our developer subscriptions and programs. For additional information or help with activation of any of these, please visit our documentation site.

If you missed any of the event or want to watch the on-demand trainings, check out the Connect(); page.

We want to hear from you. Let us know what you’d like to see by sharing your feedback, suggestions, thoughts, and ideas in the comments below!

Shawn Nandi, Senior Director – Developer Programs, Partnerships and Planning – Cloud App Dev, Data, and AI Product Marketing
@ShawnNandi

Shawn drives partnerships and business planning for the developer business at Microsoft as well as product marketing for developer programs and subscriptions including Visual Studio Subscriptions and Dev Essentials.

Spend more time working on the interesting stuff

$
0
0

There’s a reason that each day thousands of developers take advantage of the rich set of extensions offered by our growing family of VS and VSTS Partners and the broader VS community. Collectively these offerings can save you and your team time in many different ways, from helping find bugs faster, to making it easier to work with data, to helping create great UX.

I’m excited to be here at Connect(); this week where our partners are announcing a slew of exciting new products and updates for developers in tandem with our own developer productivity announcements.

Here’s a quick overview of these updated and new additions to the over 13,000 free and for-pay offerings in the Visual Studio Marketplace that you can take advantage of today:

Enhancing Cross-Platform Development

  • PreEmptive Solutions released the latest edition of Dotfuscator Community Edition, containing many new features to bring developers GDPR compliance relief: a new user-friendly interface for configuring Checks, obfuscation support for Unity, .NET Core 2.0 and .NET Standard 2.0, improved support for Xamarin and XAML, and more.
  • DevExpress announced their second major release of the DevExpress Universal Subscription, containing UI Controls and Libraries for the .NET Framework, .NET Core, and HTML5/JavaScript developers.

Effortless Database Development

  • CData released CosmosDB Drivers, allowing access to Cosmos DB databases from BI, ETL, Analytics, and reporting tools through bi-directional data drivers.
  • Alachisoft issued a major upgrade release of NCache 4.8, improving ease-of-use and integrating .NET Core Client, ASP.NET Core Sessions, Entity Framework Core 2.0, Docker Support, and more, so that you can remove data storage and database bottlenecks related to app performance and scale .NET and Java applications to extreme transaction processing.

DevOps at Your Fingertips

  • Supercharge your C# debugging experience with OzCode v3.5 Release Candidate. With this release, you can bake quality into your continuous deployment pipeline and utilize features like Conditional Search, which helps developers root-cause complicated bugs in minutes.
  • The most downloaded partner extension for Visual Studio Team Services, 7pace Timetracker, released Timetracker4, including a completely new client architecture for HTML and Windows, and compatibility with Team Foundation Server 2018.
  • Redgate released a new ReadyRoll Visual Studio Team Services extension, which works with Team Foundation Server 2018 and ReadyRoll Core (included in Visual Studio Enterprise 2017). This release has a great template to make database CI/CD setup quick and easy and has better support for deploying to Azure SQL database. In Redgate’s internal user tests, this took database CI/CD setup down from hours to a few minutes. Join the live webinar on Nov 28th to learn more.
  • GitHub will contribute to the GVFS.io open source project and plans to add GVFS support to GitHub.com.

Innovating with Visual Studio

  • The Progress Telerik UI for Xamarin team is launching Telerik Tagit – a Xamarin.Forms mobile app designed to turn the photo collection on your phone into a searchable database, powered by Microsoft’s Cognitive Servicers Computer Vision API.
  • We welcome CloudRail to the Visual Studio ecosystem. Through unified APIs, CloudRail has made over 50 components available allowing mobile developers to easily integrate with best-of-breed mobile services like OneDrive, Stripe, and Facebook.
  • In addition to a new release of the IP*Works! Collection of components for internet communications, payment processing, EDI integration and cloud storage, /n Software announced beta support for Windows IoT and Bluetooth BLE.
  • Combit Software GmbH made massive increases in performance in the latest release of their List & Label report generator, enabling a rapid performance report designer suitable for projects of all sizes.

You can learn about these Connect() partner announcements and many more partner technologies in our Post-Connect Webinar Series, launching on December 4th on Channel 9.

And if you haven’t had a chance yet I’d suggest taking a few minutes to check out the Visual Studio Marketplace to see what you might be missing!

Shawn Nandi, Senior Director – Developer Programs, Partnerships and Planning – Cloud App Dev, Data, and AI Product Marketing
@ShawnNandi

Shawn drives partnerships and business planning for the developer business at Microsoft as well as product marketing for developer programs and subscriptions including Visual Studio Subscriptions and Dev Essentials.

Test Experience Improvements

$
0
0

There have been several significant improvements to the test experience that range across Visual Studio and Visual Studio Team Services. These efforts involved frameworks and tooling for both .NET and C++, but all had a common goal: make testing with our developer tools a great experience.

.NET

Side-by-side Performance Comparison

These improvements are best shown in a side-by-side comparison of Visual Studio 2017 15.4 and Visual Studio 2017 15.5 Preview 2 with the Real Time Test Discovery feature flag turned on.

Wow! How did you get that performance?!

The performance improvements are thanks to work in a few different areas, namely, Test Platform and Test Adapter improvements and a new feature called Real Time Test Discovery.

Test Platform and Test Adapter Improvements

Each of the top testing frameworks have made great accomplishments that make the whole experience better. In Visual Studio 2017, unit test projects reference the MSTest Version 2 test framework by default. MSTest v2 has experienced great adoption reaching 1.8 million downloads before even becoming the default option in MSTest projects. xUnit 2.3.0 has gone RTM bringing great performance improvements. NUnit has also markedly improved performance.

In the table below, you can see the before and after times of the most popular test frameworks and the percentage improvement per test runner. These were timed using benchmark solutions of 10,000 tests. You can find the links to the solutions in the table.

Test Discovery
Test Framework Before (secs) After (secs) Improvement (%)
xUnit 114 6.4 94%
NUnit 9.54 5.5 42%
MSTest V2 4.76 5.2 -9% *
Test Execution
Test Framework Before (secs) After (secs) Improvement (%)
xUnit 366.5 68 81%
NUnit 316.1 16.7 95%
MSTest V2 16.48 11.74 29%

Before = VS 15.2
After = VS 15.5 Preview 2 + NUnit Adapter v3.9.0, published on 11 Oct 2017 + xUnit v2.3.1 published on 27 Oct 2017
Test Discovery performance improvements include the gains due to the new Source Information Provider implementation. This is presently shipped behind a feature flag. The intent is to make that the default from 15.5 Preview 4.

Much of this was a collaborative effort of developers contributing to the open source test frameworks NUnit, xUnit, and MSTest. Often working on the other side of the world from each other. Luckily, we can share the good vibes on social media.

Tweets

Real Time Test Discovery

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 project. This feature has been introduced in Visual Studio 2017 15.5 Preview 2 behind a feature flag. Learn how to turn it on in the Real Time Test Discovery blog post. This not only makes test discovery significantly faster, it also keeps the test explorer in sync with code changes such as adding or removing tests. Since real time discovery is powered by the Roslyn compiler, it is only available for C# and Visual Basic projects.

Real Time Test Discovery gif

Live Unit Testing Improvements

Live Unit Testing is a feature introduced in Visual Studio 2017 Enterprise that automatically runs any impacted unit tests in the background and presents the results and code coverage live in the editor. It now supports more of your projects including projects targeting .NET Core (starting in Visual Studio 2017 15.3) as well as MSTest v1. Users with projects eligible for Live Unit Testing will now be prompted to switch it on with a gold bar appearing at the top of Visual Studio. Don’t worry, you can select not to show it again or to learn more if you aren’t sure Live Unit Testing is right for you.

Live Unit Testing Improvements showing notification indicating available unit tests

We have also introduced a few usability enhancements including test icons appearing next to test method heads in the code editor when Live Unit Test icons are on. This addition was requested to help the test method head stand out from the other glyphs in the margin. Clicking on Live Unit Testing icons now pops out a menu where you can run or debug that test.

Icon identifying test method head

Visual Studio also has a new feature called the Task Center Notification. If you’re curious what processes Live Unit Testing is currently executing, you can investigate by clicking on the Task Center. This is particularly helpful when one of your tests is taking longer to give results. The Task Center Notification will tell you if Live Unit Testing is discovering, building, or executing your test.

Task Center Notification so you know if Live Unit Testing is discovering building or executing your test

Live Unit Testing is now easier to configure with the addition of a Tools > Options page. This page will let you automatically pause Live Unit Testing if, for example, you need to save battery life when you’re on the go. You can also make sure Live Unit Testing skips some tests by adding a skip category. For a short period of focused development, you can include a specific set of tests by right-clicking on the solution, project, or class in the Solution Explorer and select Live Unit Testing > Include (or Exclude). This will only run Live Unit Testing on those tests. You can also include and exclude individual tests by right-clicking on them in the code editor.

Ability to exclude some Live Unit Tests in Tools Options

C++ Testing Improvements

We’ve improved the C++ unit testing experience by adding built-in support for more unit testing frameworks. In addition to Microsoft’s native testing framework, Visual Studio now includes support for Google Test and Boost.Test. New installations of Visual Studio “Desktop Development for C++” workload will acquire Google Test and Boost.Test support by default, but if you’re upgrading from a previous version you’ll need to manually add these adapters via Visual Studio Installer.

Installer showing VC Testing Improvements workload with default support for Google Test and Boost.Test

Whether you prefer the Microsoft, Google Test, or Boost.Test framework, you can immediately use all of Visual Studio’s testing tools to write, discover, and run your unit tests. In the next image, we see all the tests from the three frameworks were discovered and run via the Test Explorer Window.

Test Explorer Window

To quickly add a Microsoft Native Test or Google Test project to your Solution, just choose the desired template in the New Project Wizard.

Microsoft Native Test or Google Test project template in the New Project Wizard

Share Your Feedback

As always, we welcome your thoughts and concerns. Please Install Visual Studio 2017 today, exercise your favorite workloads, and tell us what you think.

For issues, let us know via the Report a Problem tool in Visual Studio. 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 new Gitter community (requires GitHub account).

Kendra Havens, Program Manager, Visual Studio Testing Tools Team
@gotheap

Kendra is a Program Manager on the .NET team focused on the testing experience.

Nick Uhlenhuth, Program Manager, Visual Studio Testing Tools Team
@nickuhlenhuth

Visual C++ Program Manager focused on making the unit testing experience great!

Pratap Lakshman, Senior Program Manager, Visual Studio Testing Tools Team
@pvlakshm

Pratap works on Testing tools in the areas of IntelliTest, Fakes, Unit Testing, and CodeCoverage.

Managing Secrets Securely in the Cloud

$
0
0

You’ve probably heard some version of the story about a developer who mistakenly checked in his AWS S3 key to Github. He pulled the key within 5 minutes but still racked up a multi-thousand dollar bill from bots that crawl open source sites looking for secrets. As developers we all understand and care about keeping dev and production secrets safe but managing those secrets on your own or especially in a team can be cumbersome. We are pleased to announce several new features that together will make detecting secrets in code and working with secrets stored securely on Azure easier than it’s ever been before.

Safeguarding Secrets while building for Azure

Most of us know it’s a best practice to keep secret settings like connection strings, domain passwords, or other credentials as a runtime configuration and outside the source code. Azure Key Vault provides a security location to safeguard keys and other secrets used by cloud apps. Azure App services recently added support for Managed Service identity which means apps running on App Service can easily get authorized to access a Key Vault and other AAD-protected resources so you no longer need to store secrets visibility in environment variables.

If you do this though, getting your local dev environment setup with the right secrets can be a pain, especially if you work in a team. We hear many developers distribute secrets for shared dev services through email or just check them into source code. So we created the App Authentication Extension to make it easy to develop apps locally while keeping your secrets in Key Vault. With the extension installed, your locally running app uses the identity signed into Visual Studio to get secrets you are authorized to access directly from Key Vault. This works great in a team environment where you might have security group for the dev team with access to a dev environment Key Vault.

Azure key vault

Azure service authentication account selection setting in Tools Options

In ASP.NET applications the ASP.NET Key Vault and User Secret configuration builders with .NET 4.7.1 is a NuGet package that allows secret app settings to be saved in secure configuration stores instead of in web.config as plaintext, without changing application source code. In ASP.NET Core applications there is a small code change, to load Key Vault as a configuration provider and once you do this you are set. This change isn’t done yet, but we’re hoping to eliminate it soon.

App Settings

Here are a couple of walkthroughs that show you how everything works:

Credential Scanner (CredScan) Code Analyzer Preview

We also wanted to make it easier for devs to find secrets in their code to encourage moving secrets to more secure locations like User Secrets or Azure Key Vault. The Credential Scan Code Analyzer is a very early preview that can detect Storage access keys, SAS tokens, API management keys, Cosmos DB access keys, AAD Service principal keys, connection strings for SQL, Azure SQL, Service Bus, Azure Logic apps, BizTalk server, and various other credential types. As you edit your code the analyzer scans your code and immediately warns you about secrets it finds in any open documents with warnings in the error list and in the Build and Code Analysis at Commit time. It’s something we’ve been developing, utilizing, and improving within Microsoft for some time now.

The Credential Scan Code Analyzer is a preview and ships in the experimental DevLabs extension, Continuous Delivery Tools for Visual Studio. This is because we know this is an important area that goes beyond open documents and can stretch all the way into your CI environment. Rather than waiting, we released an experimental version now because we think it’s useful and we want your feedback on how you would use this in your environment.

Please install these extensions and give the walkthroughs a try to let us know what you think.

Catherine Wang, Program Manager, Azure Developer Experience Team
@cawa_cathy

Catherine is a Program Manager for Azure Developer Experience team in Microsoft. I worked on Azure security tooling, Azure diagnostics, Storage Explorer, Service Fabric and Docker tools. Interested in making development experience simple, smooth and productive.

Large C# and VB solutions load significantly faster in 15.5 update

$
0
0

On average, 50 percent of all solutions opened by Visual Studio users open in ten seconds or less. However, large solutions can take longer to load because there are a lot of projects that Visual Studio needs to process.

Over the last six months, we looked at ways to make solution load much faster, even for large solutions. We are happy to share that with update 15.5, Visual Studio 2017 loads C# and Visual Basic projects twice as fast as before. (C++ solution load was optimized earlier in Visual Studio 2017, as described here.)

This video compares loading the Orchard Content Management System solution before and after optimization. Check out the video, try Visual Studio 2017 15.5 for your large solution, and tell us how much faster it loads for you! You can reach us at vssolutionload at Microsoft.

Solution Load Video Comparing 15.4 and 15.5

Design Time Build

Loading a solution in Visual Studio is much more involved than just parsing XML project files and rendering the Solution Explorer tree. To let you be productive right away, Visual Studio enables various IDE features at solution load. These features require a deep understanding of projects, project files, and dependencies. To calculate this information, Visual Studio runs a design-time build during solution load. This can be an expensive operation. Additionally, inefficiencies in customized project files and build targets can make it worse. In some cases, developers install certain Nuget packages that add even more operations to the design-time build.

What did we do?

Previously, Visual Studio loaded and built one project at a time on solution load. This design didn’t leverage the additional power of fast, multi-core machines. To reduce solution load time, Visual Studio now starts C# and Visual Basic design-time builds as early as possible. It also batches design-time build operations for all the projects in the solution and executes these build operations in parallel with other solution load operations.

Illustration showing Design Time Build operattions running in parallel with Solution Load Operations

We also improved references analysis. Most C# and Visual Basic projects have references to assemblies. To enable you to work with project references, Visual Studio needs to read information about these assemblies, such as the assembly’s version and description. These simple reads can add many seconds during a large solution load, because solutions often have thousands of assembly references across all their projects. Since many projects often have the same set of references, we further reduced solution load time by adding an in-memory “references” cache that is shared across all projects in a solution.

What can you do?

While much of solution load is automatic, parts of it are in your control. The Project System Tools extension can help you identify projects and targets that are slowing down design-time build during solution load.

To do this, install the extension and then delete the hidden .vs subfolder in your solution folder to clear the design-time build cache. Then open the Build Logging window, start recording, and open a solution. The window will show a list of targets and design time build time for each project. Identify slow projects and inspect their targets, then edit your project files to remove unnecessary targets from the design-time build. You can find more design time build optimization techniques here.

Build Logging

Hard drive type matters!

And here is another trick to make solution load even faster. Visual Studio telemetry shows that machines with an SSD storage load solutions 2-3 times faster than a regular hard drive. As such, we strongly recommend considering an upgrade to SSD if you are using a regular hard drive. While ideally Windows, Visual Studio, and your solution would all be contained on an SSD for the maximum impact, having Windows installed on SSD will have a huge impact on your solution load.

Share your feedback

We hope that you will enjoy faster solution load time in Visual Studio 15.5 update. Please try it on your solutions and let us know what you think.

Viktor Veis, Principal Software Engineering Manager, Visual Studio
@ViktorVeis

Viktor runs the Project and Telemetry team in Visual Studio. He is driving engineering effort to optimize solution load performance. He is passionate about building easy-to-use and fast software development tools and data-driven engineering.

Overview of Visual Studio 2017 and Updates for .NET Developers

$
0
0

Visual Studio 2017 first released in March of this year. Since then, there have been five updates with each bringing more improvements and capabilities. Every improvement is geared towards making you more productive and this post aims to give you an overview of the culmination of features to date. Read on to see how you can get started working on your projects quickly and write better code faster.

Download Visual Studio 2017 Preview today.

New Install Experience, Performance and Reliability

The first thing you’ll notice with Visual Studio 2017 is the new install experience which lets you pick and choose which development tools you want installed. To help you get started working on your projects quickly, Visual Studio 2017 Preview version 15.5 has parallelized initialization to make your solutions load fast and get you to writing code as soon as possible. Other performance improvements include moving computation –like code analysis—out of the main Visual Studio process to keep your typing speed unimpeded.

Smart Code Editor

Visual Studio has a deep understanding of your code via the Roslyn compiler to provide you with smart editing features like syntax colorization, code completion, completion list filtering, spell-checking mistyped variables, unimported type resolution, outlining, structure visualizers, CodeLens, call hierarchy, hover-able quick info, parameter help, as well as tools for refactoring, applying quick actions, and generating code. The latest update to Visual Studio 2017 includes smart variable naming suggestions and expand/contract selection (Ctrl+W/Ctrl+Shift+W in Default Profile, Shift+Alt+=/Shift+Alt+- in C# Profile).

Smart Code Editor

Pro Tips:

  • Use Quick Launch (Ctrl+Q) to search all Visual Studio settings.

Navigate Your Codebase

Quickly navigate your .NET code by jumping to any file, type, member, or symbol declaration with the redesigned Go To All shortcut (Ctrl+T or Ctrl+,). Find all the references of a symbol or literal in your code, including references across .NET languages, and use the redesigned results window to organize your references by definition, project, and/or path (Shift+F12). And don’t forget to try targeted navigation commands to help you jump directly to symbol definitions (F12, or now also Ctrl+click) or implementations (Ctrl+F12).

Navigate Your Code

Pro tips:

  • Use “f”, “t”, “m”, and “#” as prefixes in your Go To All (Ctrl+T) search to filter results down to files, types, members, or symbols respectively.
  • Use the gear icon in the Go To All dialog to move its position from the right-hand corner of the code editor to the middle.
  • Use the “lock” icon in the Find All References (Shift+F12) window to save your search. Subsequent Find All Reference calls will open a new results tab.

Live Code Analysis

Visual Studio has live code analyzers to help you improve your code quality by detecting errors and potentially problematic code. We provide quick-actions (Ctrl+.) to resolve detected problems across your document, project, or solution. Also invoke the Ctrl+. shortcut to access code suggestions (marked by faded gray dots under the first characters of an expression), learn best practices, stub or generate code, refactor code, and adopt new language features.

Learn more about available quick actions and refactorings in our documentation. Some of the ones added in the latest Visual Studio 2017 update are: sort modifiers, move declaration near reference, convert lambda to C# 7.0 local function, fade and remove unreachable code, add missing file banner, use C# 7.0 pattern matching, simplify with C# 7.1 inferred tuple name, and more.

Live Code Analysis

Pro tips:

  • Enable full-solution analysis to find issues across your entire solution even if you don’t have those files open in the editor: Tools > Options > Text Editor > [C# / Basic] > Advanced > Enable full solution analysis.
  • Errors, warnings, and suggestions appear in the editor scroll bar to give you visuals into where errors are in your open file.
  • Code issues can be suppressed individually using the Ctrl+. shortcut or in-bulk by selecting the issues in the Error list and right-click > Suppress.
  • Have Visual Studio offer to install NuGet packages and add references to unimported types by going to Tools > Options > Text Editor > [C# / Basic] > Advanced > Add using for types in NuGet/reference assemblies.
  • Some code refactorings requires code snippet selections, like Extract Method and Introduce Local Variable.
  • For more code diagnostics and fixes related to best practices, API design, and performance improvements, install our Microsoft Code Analysis 2017 extension.

Code Consistency and Maintenance

Visual Studio 2017 enables coding convention configuration, detects coding style violations, and provides quick-fixes to remedy style issues with the Ctrl+. shortcut. Configure and enforce your team’s formatting, naming, and code style conventions across a repository—allowing overriding values at the project and file level—using EditorConfig. For any given file, the EditorConfig file in the closest containing folder will be enforced.

Code Consistency and Maintenance

Pro Tips:

  • Configure settings for your machine in Tools > Options > Text Editor > [C# / Basic] > Code Style. Override these settings in your repository with an EditorConfig file.
  • Grab an example .editorconfig file from the corefx repository, https://github.com/dotnet/corefx.
  • Use Format Document (Ctrl+K,D or Ctrl+E,D) to clean up formatting violations based on the configuration in your .editorconfig file or in the absence of that, Tools>Options settings.

Unit Testing

Run and debug your unit tests based on the MSTest, NUnit, or XUnit testing frameworks for any application targeting .NET Framework, .NET Standard, or .NET Core. Explore and review your tests in the Test Explorer or immediately see how code changes impact your unit tests inside the editor with Live Unit Testing (Enterprise SKU only).

Unit Testing

Pro Tips:

  • Use Live Unit Testing with MSTestv1 in the latest Visual Studio 2017 update.
  • Include or exclude test projects, or even specific tests, from the set of unit tests run “live” by right-clicking on the test project in Solution Explorer (or on the test itself) and selecting Live Unit Testing > [Include / Exclude].
  • Enable fast test discovery in the Test Explorer with the experimental feature, Real-Time Test Discovery.

Debugging

Visual Studio 2017 improves upon it’s top-notch debugger to allow you to debug your .NET applications targeting the .NET Framework, .NET Standard, and .NET Core. New features in 2017 include the ability to reattach to processes in one click, visibility into which expression returns null with the new Exception Helper, Run to Click, and the ability to Step Back with IntelliTrace (Enterprise SKU only).

If your service runs in Azure, use Snapshot debugging to diagnose issues on your live, deployed cloud applications in Visual Studio 2017 Enterprise.

Debugging

Pro Tips:

  • Hold the CTRL button to transform Run to Click into Set Next Statement.
  • Take a look at the checkbox options in the new Exception Helper, you will find that you can ignore breaking on exceptions thrown from specific libraries.
  • Open the Diagnostic Tools window while debugging and notice a new summary page that allows you to take snapshots, enable CPU profiling, and view Exception events.
  • Right-click and use Step Into Specific to choose which nested function you want to “step into” in the given line of code.

.NET Core-Specific Features

Projects targeting .NET Core and .NET Standard involve the new, lightweight project features in Visual Studio 2017. These include file globbing support, a smaller .csproj file—meaning fewer merge conflicts—and the ability to directly edit the new .csproj file without having to unload and reload a project.

Pro Tip:

  • Add NuGet packages directly to your project by adding the tag: <PackageReference Include=”<PACKAGE_NAME” Version=”PACKAGE_VERSION” />

Modern C# and Visual Basic

Visual Studio 2017 ships with C# 7.0 and Visual Basic 15, version 15.3 ships with C# 7.1, and the latest release ships with C# 7.2. By default, Visual Studio projects support the latest major version of the language (in this case, C# 7.0 and VB 15) with options to allow only older language features or to embrace new language features at the minor version cadence. Notable new language features, include:

  • C# 7.0 : tuples, pattern-matching, local functions, and out var
  • C# 7.1 : async Main, support, inferred tuple element names, and default literals
  • C# 7.2 : Span<T>, non-trailing named arguments, private protected, readonly structs, and in parameters
  • Visual Basic 15 brings tuples and digit separators

Follow the C# and Visual Basic language design discussion on the csharplang and vblang GitHub repositories.

Pro Tips:

  • Change your language adoption cadence by right-clicking your project in Solution Explorer and selecting Properties > Build > Advanced > Language version. If you use a language feature that is not supported by your project’s language version, you can use the shortcut Ctrl+. to upgrade your project language from within the editor.

 

Try out Visual Studio 2017 Preview today to enhance your workflow with productivity features and enhancements. Share the Pro-tips outlined in this article with your teammates and let us know if something is blocking your productivity by reporting a problem in Visual Studio. Happy coding!

Over ‘n’ out,

Kasey Uhlenhuth, Program Manager, .NET and Visual Studio
@kuhlenhuth

Kasey Uhlenhuth is a program manager working on improving the Node.js experience within Visual Studio as well as providing Interactive experiences on the Managed Languages team.


Announcing Language Server Protocol Preview Release

$
0
0

Visual Studio is joining Visual Studio Code in offering support for the Language Server Protocol. As an extension author, you can now write Visual Studio extensions that leverage existing language servers to provide a rich editing experience for languages that initially had no native language support in Visual Studio. With these extensions, you can use Visual Studio to code in your favorite language!

Use Visual Studio to code in your favourite language

This is a preview release that is available as an extension on Visual Studio Marketplace and can only be installed on Visual Studio 2017 Preview. Read our documentation to find out more.

What is an LSP?

The Language Server Protocol (LSP) is a common protocol that provides language service features to developer tools. A language server contains the deep understanding of a specific language while the Language Server Protocol provides the communication between the language server and the developer tool. The complex logic of a language server needs to be implemented only once and then from there, smaller pieces of code can be written to allow the language server to talk to the specific developer tool. This allows for a consistent editing experience for any tool that supports the protocol.

How do I Start?

You will need to have the Visual Studio extension development workload installed on Visual Studio 2017 Preview. For the preview, you will have to declare a dependency on the Language Protocol Client Preview extension. This means that any customers who wish to install your language server extension must also have the Language Server Protocol Client preview extension installed first. For more details, check out our sample on Github, the client and protocol API documentation, and the walkthrough on how to add a language server protocol extension.

Let Us Know What You Think

Releasing as a preview first gives us a great opportunity to gather and incorporate feedback to make the final product even better. Please leave us comments and questions on the LSP extension page or email us at vslsp@microsoft.com with your feedback.

We can’t wait to see what extensions will be created by the community!

Stephanie Su, Program Manager, Visual Studio

Stephanie Su is a Program Manager on the Visual Studio Extensibility team focused on the authoring and acquisition scenarios of extensions.

TFVC support and other enhancements hit Continuous Delivery Tools for Visual Studio

$
0
0

A year ago, we released the first preview of the Continuous Delivery Tools for Visual Studio (CD4VS) with support for configuring a continuous integration and continuous delivery pipeline for ASP.NET and ASP.NET Core projects with and without container support. With CD4VS you can always configure Continuous Delivery for solutions under source control to App Service, and Service Fabric Clusters.

Today, we announce the support for configuring Continuous Delivery for solutions under TFVC source control on VSTS. When you click configure Continuous Delivery on the solution menu, CD4VS 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 for solutions under TFVC source control on Visual Studio Team Services

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 Source Control Folder path mapping

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

We have been releasing incremental updates and recently, we introduced inline creation of a new Azure Container Registry (ACR) as well as support for SSH authentication to GitHub and VSTS Git repositories. If you are configuring Continuous Delivery for a containerized solution you can select an existing ACR, or opt to create a new one.

When configuring Continuous Delivery for a containerized solution you can select an existing ACR or opt to create a new one

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, CD4VS 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 take this Microsoft DevLabs extension next. There is a Slack channel and 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 Program Manager, Visual Studio
@cd4vs

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

Announcing JUnit Support for Visual Studio Code

$
0
0

Today, we’re pleased to release a new extension to our Visual Studio Code Java extension family – Test Runner/Debugger for Java. It’s a lightweight test runner/debugger with below features we hope you will like.

  • Recognize JUnit4 tests
  • Run test
  • Debug test
  • View test status and run summary

Java 9 Support

Same as the Debugger for Java, this is also an open source project. Please check out the github page https://github.com/Microsoft/vscode-java-test/ for more details and feedback.

Along with the new extension, we’re also updating our Debugger extension with version 0.4.0. With this release, we’re adding a few useful tools to make Java debugger in VS Code more enjoyable.

Launch in terminal

Since the standard VS Code debug console does not allow input, we’re now providing an alternative for you to use external or integrated terminal within VS Code to launch your application. Now you can input values to step over the input statements. It’s also a simple configuration in launch.json.

Java 9 Support

Stop on Entry

With a simple configuration, now you can ask the debugger to stop at your first line of code when it’s launched, and step through from there without needing to put a breakpoint beforehand.

Java 9 Support

Other changes

This new release also include these additional updates

  1. Multi-root workspace support
  2. Bug fixes.

Details could be found at our extension marketplace page and our debugging tutorial. For our next release, we’re now working on 3 other highly demanded feature, step filter, expression evaluation and hot code replacement. Please stay tuned and we will enable those soon! Please find more details in our changelog and don’t hesitate if you would like to share your thoughts with us, just join the Gitter discussion or submit an issue!

Try it out

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

Xiaokai He, Program Manager, Java Tools and Services
@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.5, Visual Studio for Mac Released

$
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!]

 

Today we released significant updates to both Visual Studio 2017 and Visual Studio for Mac. I’ll share some details in this post, but as always, there’s a lot more information in the release notes. If you’d like to jump right in, download Visual Studio 2017 version 15.5 and download Visual Studio for Mac.

Visual Studio 2017 Version 15.5

This update contains major performance improvements, new features, as well as fixes for bugs reported by you. Some highlights are mentioned below, for the full feature list check out the Visual Studio 2017 version 15.5 Release notes.

Performance. In this update we continued to improve performance. Solution load times for large C# and Visual Basic projects is nearly cut by half. The time to switch between debug and release is significantly reduced. It is faster to add, remove, and rename files and folders in .NET Core projects. Project templates should now unfold much faster than before. In the most exceptional cases, you can see up to a 40x improvement in unfold time. There are multiple performance improvements in F# tooling. We’ve added an “Only analyze projects which contain files opened in the editor” checkbox under the JavaScript/TypeScript Text Editor Project Options page. This option will improve performance and reliability in large solutions. Note that when this box is checked, you will need to perform a Solution build to see a complete list of TypeScript errors in all files.

Most notably, we have cut the solution load times for large C# and VB projects by half. The primary way we achieved this was by starting the design-time build process earlier and by batching the design-time build operations for all projects and executing them in parallel with other solution load operations. To see this in action, watch this video comparison loading the Orchard Content Management System solution before and after optimization.

Solution Load Video Comparing 15.4 and 15.5

Check out our detailed post to learn how we achieved this performance in large C# and VB projects. For those who missed the similar performance improvement we made for C++ projects in an earlier update check out this blog post on C++ solution load and build performance improvements.

Diagnostics. The Visual Studio debugger got considerably more powerful with the addition of step-back debugging, also known as historical debugging. Step-back debugging automatically takes a snapshot of your application on each breakpoint and debugger step you take, enabling you to go back to a previous breakpoint to view its state. Check out this post from Deborah that details out this capability and how to make the most of it – step-back while debugging with IntelliTrace. For more on diagnostics and debugging, also look at our post on lesser known debugging features.

Docker and Continuous Deployment. Visual Studio has featured good Docker support for a while. With this release we have taken it further. Docker containers now support multi-stage Dockerfiles. The continuous delivery features make it easy to configure Visual Studio Team Services to set up CD for ASP.NET and ASP.NET Core projects to Azure App Service

Secrets management. Visual Studio has added features to help identify and manage secrets like database connection strings and web service keys. We have a preview of support for credential scanning that can easily read through your source files to ensure you don’t unintentionally publish key secrets into your source repo. And the integrated support for Azure KeyVault gives you an easy place to publish those secrets (and get them out of your source code). Check out this post to learn how to manage secrets securely in the cloud.

Azure functions. The Visual Studio tools for Azure functions has gotten a notable improvement, with the ability to use .NET Core. Learn about added support for creating .NET Core Azure Functions apps, as well as improving the experience for creating new Function app projects.

Mobile development with Xamarin. A major milestone in this release for mobile development was the addition of the Xamarin Live Player, which enables developers to continuously deploy, test, and debug their apps using just Visual Studio and an iOS or Android device. This release adds support for Android emulators, enabling developers to preview real-time XAML changes directly in the Android emulator without requiring a re-compile and re-deploy.

Mobile development with Xamarin Live Player

We have also added the ability to File → New → Mobile App with Xamarin.Forms and .NET Standard, and migrated all project templates to use PackageReference for easy NuGet package management.

Unit Testing. We’ve improved the unit testing experience for both managed languages and for C++. C++ developers will notice integrated support for Google Test and Boost.test (add them through the Visual Studio installer in the desktop development workload). We already mentioned feature behind a feature flag called source-based test discovery that hugely improves test discovery performance. And the Live Unit Testing (LUT) is better integrated with the task notification center and now supports .NET Core (starting in Visual Studio 2017 15.3) as well as MSTest v1. Be sure to check out this post for an overview of the various text experience improvements in Visual Studio 2017 version 15.5.

Task Center Notification so you know if Live Unit Testing is discovering building or executing your test

Web development. If you are an Angular 2 developer you will now see errors, completions, and code navigation in inline templates and .ngml template files. See the sample repo for an overview and instructions. Other updates in the web space include improvements to Razor syntax formatting and improvements in the workflow for publishing ASP.NET applications to Azure Virtual Machines.

Visual C#. VS 15.5 adds support for C# 7.2 features like Span<T>, the readonly struct modifier And the private protected access modifier.

Visual C++. We already talked about the support for Google Test and Boost.test, and C++ developers will also see improvements to the Standard Template Library for C++ 17 standards. Check out the Open Standards website. The VC++ compiler supports 75% of the C++ 17 features. In addition, the team has added new optimizations to the compiler.

Installer showing VC Testing Improvements workload with default support for Google Test and Boost.Test

Visual F#. We added .NET Core SDK project support to the F# tooling so you can now create new .NET Core console apps, .NET Standard libraries, and .NET Core unit test projects from File > New Project, for example, and we added support for project-to-project references. You can also you can now right-click Publish tooling with Web SDK projects and the continuous delivery features will now autogenerate a CI/CD pipeline with Visual Studio Team Services tooling.

Source control. You can now work with Git submodules and worktrees, and configure fetch.prune and pull.rebase in Team Explorer. Visual Studio now treats Git submodules and worktrees like normal repos. Just add them to your list of Local Repositories and get coding!

Reliability. The Visual Studio Installer now supports modification and uninstallation of each entry, improving the installer experience. On the note of the crashes caused by the PenIMC.dll that some of you may have run into, Windows is currently working on a root fix. Meanwhile, we wanted to ensure we helped those of you still running into crashes when trying to scroll, click, or interact via touch in Visual Studio. To activate the workaround, disable touch scrolling by checking the “Disable Touch Scrolling” under Tools > Options > Environment > General and restart Visual Studio.

Visual Studio for Mac

VS for Mac 7.3 is also available today. The highlights of this release are:

Visual Studio Test Platform (VSTest) support. Visual Studio for Mac now supports a wider variety of test frameworks through the integration of VSTest, giving developers more choice in the test frameworks they want to use. Frameworks such as MSTest or xUnit can now be used within Visual Studio for Mac via NuGet adapter packages.

New Roslyn based refactorings. The editor in Visual Studio for Mac has improved support for refactoring, helping developers write more maintainable code. “Generate From Usage”, “Change Method Signature”, and “Extract Interface” are now offered as refactorings within C# code.

Updater support for .NET Core. Visual Studio for Mac will now check to see if the .NET Core 2.0 SDK is installed when checking for updates. If not, developers can easily download and install it via the Visual Studio Update dialog instead of the previous manual installation.

Automatic iOS app signing. Visual Studio for Mac now offers automatic signing of iOS apps, boosting developer productivity by reducing the number of manual steps required to prepare iOS apps for distribution.

Additionally, a lot of the improvements in this update center on reliability. Improvements were made to decrease memory usage, increase performance, and decrease crashes. Many of these fixes have been made possibly by community feedback, which has been provided through the Developer Community.

The complete release notes are available on visualstudio.com, which is also where you can find the Visual Studio for Mac downloads.

Share Your Feedback

As always, we welcome your thoughts and concerns. Please install Visual Studio 2017 Version 15.5, and Visual Studio for Mac and tell us what you think.

For issues, let us know via the Report a Problem tool in Visual Studio. 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 new Gitter community (requires GitHub account), make a product suggestion through UserVoice, or get free installation help through our Live Chat support. Need professional support right now? See available support options.

John Montgomery, Director of Program Management for Visual Studio
@JohnMont

John is responsible for product design and customer success for all of Visual Studio, C++, C#, VB, JavaScript, and .NET. John has been at Microsoft for 17 years, working in developer technologies the whole time.

Join Us to Learn How to Build Android 8.0 Oreo and iOS 11 apps with Visual Studio

$
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!]

Visual Studio and Xamarin enable .NET developers everywhere to use their favorite language and full-featured IDE to create native Android, iOS, and UWP apps, even incorporating the latest and greatest from Android 8.0 Oreo and iOS 11.

To help you get the most out of the new Google and Apple APIs, we’re hosting two webinars: one for all things Android 8.0 Oreo and one dedicated to iOS 11. In these webinars you’ll explore what you need to know about each update, see step-by-step demos and get the expert tips you need to start adding exciting features to new or existing apps. Come with questions, as our team of mobile experts will be ready and waiting to answer!

[Register Now]

 

clip_image002Wednesday, December 13th:

Get the Most out of Android 8.0 Oreo with Visual Studio Tools for Xamarin

 

Join Tom Opgenorth on December 13th at 9am PT, where he’ll walk through new features, like downloadable fonts, emojis, and background execution limits, key considerations for new and existing apps, and how Visual Studio Tools for Xamarin allows .NET developers to take advantage of Android 8.0 Oreo, no platform-native tools or code required.

 

clip_image004

Thursday, December 14th:

Get the Most out of iOS 11 with Visual Studio Tools for Xamarin

 

Join me, Craig Dunn, on December 14th at 9am PT where I’ll discuss all the exciting new features of iOS 11, including drag and drop, SiriKit, CoreML, map improvements, and more. We’ll also look at the iPhone X form factor, learn how to fully support new and old devices, and use your .NET skills to build even better iOS apps.

 

 

Get ready to make your apps shine with the latest Android and iOS features, from user-facing capabilities to backend improvements:

  • Register for “Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin”: Wednesday, December 13th at 9am
  • Register for “Get the Most out of iOS 11 with Visual Studio Tools for Xamarin”: Thursday, December 14th at 9am

We’ll send the recording to all registrants, so register even if you’re unable to attend live. If you want to get started for free, download Visual Studio 2017 or Visual Studio for Mac today.

See you soon!

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.

Viewing all 1039 articles
Browse latest View live


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