Are you a .NET developer that has always wanted to make a mobile application? Or maybe you have tried building native mobile apps with Android or iOS but didn’t like the languages? Well then, you are in luck! The .NET world has been blessed with Xamarin; a set of tools that lets you build mobile apps for Android, iOS, and Windows within Visual Studio.
- Download Visual Basic 6.0 For Android
- Download Visual Basic Studio For Android
- Download Visual Basic For Android Computer
Xamarin has two main flavors: Xamarin platform (Xamarin.iOS and Xamarin.Android) and Xamarin.Forms. With Xamarin.Forms a vast majority of your business logic and user interface can be written within one shared project that produces fully functioning apps on all 3 of the iOS, Android and the Windows (UWP) operating systems. Xamarin platform, on the other hand, is very much platform-specific work and is more akin to writing native apps but with C#.
In this tutorial, I’ll be looking more closely at the Xamarin platform and the Android operating system toolset known as Xamarin.Android. The overall aim is to enable you to create a simple native Android app with basic user authentication included.
An identified security issue in Microsoft® Visual Basic® for Applications could allow an attacker to compromise a Microsoft Windows®-based system and then take a variety of actions. By installing this update, you can help protect your computer.
- Build Android apps with Azure App Service Mobile Apps. Work with data in the cloud or on-premises. Sync data for offline use, authenticate users, and send personalized push notifications from a secure and scalable mobile app backend. Create a new app or connect an.
- B4A includes all the features needed to quickly develop any type of Android app. B4A is used by tens of thousands of developers from all over the world, including companies such as NASA, HP, IBM and others.
- Visual basic free download - Best answers; Visual Basic Express Edition - Download - Visual Basic; Microsoft visual basic download - Download - C/C; Visual basic 6.0.exe free download - Download - Library (DLL) Visual Basic 6 Runtime (VB6 DLL) - Download - Library (DLL) Visual basic 6.0 projects with ms access database free download.
- Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications.
Set Up Visual Studio and Your Environment
To follow along you’ll need a copy of Visual Studio, plus the ‘Mobile development with .NET’ workload. You can either enable this feature from first installation of Visual Studio or access it from the ‘Tools -> Get Tools and Features…’ menu item:
When testing and running your app you have the choice of doing so with either an Android emulator running on your development machine, or by directly connecting to an existing Android device. There’s no right option here and different developers prefer different form factors. If you choose the former option, you’ll need to ensure once you’ve selected the workload that on the right-hand pane (‘Installation details’) the checkboxes for Intel Hardware Accelerated Execution Manager and Google Android Emulator are selected (as seen above).
Verify Your Android Environment in Visual Studio
To verify everything installed properly and was configured correctly, go to ‘Tools -> Options -> Xamarin -> Android Settings’ and check your Java Development Kit Location and Android SDK Location paths are valid (i.e. have a green tick):
If either are missing you’ll have to manually install the Java Development Kit or Android SDK respectively.
Create a Xamarin App
Start by creating a new project and select the ‘Android App (Xamarin)’ master template (found under the Android menu). On the next page you’ll want to pick the ‘Single View App’ option as it is a great starter template to work from.
With regards to the Minimum Android Version, this is something down to your personal choice as the developer. There is a trade-off here between being able to access the latest and greatest API features in newer versions and supporting your customers that have older versions. To help you make this decision, Google publishes platform version distribution data they collect as part of their Distribution dashboard on a fairly regular cadence. My personal preference is between 5.0 or 6.0 depending on if this is an app for public consumption or a commissioned app for corporate phones only (i.e. they will likely have the latest updates); in this example I’ve gone with the latter. Note this version differs from the Target Android Version and that should always be set to the latest released SDK version, as anything less won’t be accepted into the Google Play store.
Once you’ve got this created all that’s left is to import the required NuGet packages. For this tutorial you will need:
- Xamarin.OpenId.AppAuth.Android - To Authenticate the user you will be using OpenID Connect standard (an enhancement of OAuth 2.0). The easiest way to implement client code that abides by this specification is by using the AppAuth client SDK for Android, and helpfully Xamarin has ported a package of this functionality available for you to use.
- System.IdentityModel.Tokens.Jwt - The method of authentication here uses JSON Web Tokens. To extract the data needed from these tokens you’ll need this package.
Additionally, you’ll need these two packages as well as they’re relied upon by AppAuth:
- Xamarin.Android.Support.v4
- Xamarin.Android.Support.CustomTabs
Familiarize Yourself with the Xamarin Project
If you’ve never worked with Android before, one of the key principles to get your head around is the concept of an Activity. Activities are components used to display your user interface; in their most basic form, you can think of Activities as being equal to pages in an app that the user can navigate between. An Activity in code is represented by a class, however like a page in ASP.NET you can (and almost always will) associate an XML-based layout file (a .axml file) with it for a displayable design. All new projects create a ‘MainActivity.cs’ and ‘activity_main.axml’ file to start with as the first Activity (i.e. page) to run upon opening the app. This can be changed to any other Activity by utilisation of the property
MainLauncher = true
within the Activity
attribute of the class.Resources are designed to be handled within their own directory and follow a somewhat strict naming convention. I’d strongly recommend storing as much of your resources as is feasible in this directory since it simplifies the reuse of these variables for your ongoing development. In the ‘values’ directory of the Resources directory is where you will find files with specific purposes:
- Strings.xml - Hosts all user facing strings. This one is especially important to use as it enables you to localise your strings for a global audience.
- Styles.xml - Where you’ll find the attributes for styling your design objects; think of it like a CSS file.
- Colors.xml - A place to store references to the colours you use most frequently as part of your styling.
- Dimens.xml - As the name might imply, where you define set dimensions for your app’s layout.
The other notable directories don’t follow any naming convention for their files, but they must contain certain file types:
- Layout - Location for storing your .axml files. These files define full Activity layouts, layout components that you programmatically generate and populate, layouts of dialog (alert) boxes, etc.
- Menu - Where you’ll find definitions of menus and their items. These are .xml files that have
menu
as the root element anditem
child elements, of which can be grouped together withgroup
elements. Most common menus you’ll encounter are the overflow menu (from the three vertical dots button) or the navigation menu (from the home ‘hamburger’ button). - Mipmap - Where you want to define images that need to be scaled depending on the screen density, i.e. those referenced by other apps, and not used internally. The app’s icon is the most common content you would put in the mipmap directories.
- Drawable - Not standard in a default project template, but can be created yourself. This is where you store your images/drawable content to be used within the app, e.g. splash screen, custom progress bar designs, icons used within the app, etc.
Lastly, if you have any raw content files that you want to use as part of your application (e.g. a text or font file), then the Assets directory is where to place them. As Assets these files will be deployed with your app for you to access with the Asset Manager.
To learn more about Assets and Resources and how to use them, there are handy ‘About’ text files in each directory of a newly created project.
Add User Authentication to Xamarin with OpenID Connect
Most apps these days require some form of user identification to enable the developer to offer bespoke experiences and in turn enable the user to keep their data across devices/installations. In addition to this there’s the matter of access control that might be useful to authorize a subset of users for extra functionality. Naturally this can be quite the laborious task, especially if you’re in the business of creating apps and you’ll need a new system for every single one. Thankfully with Okta you can set up an application in mere minutes and then all the hard work is done for you! The Okta service is OAuth 2.0 compliant and a certified OpenID Connect Provider, and so works perfectly with the AppAuth client SDK for all your authentication and authorization needs.
Set Up your Okta Application
Firstly, you should set up a new application in your Okta account for this project. If you’ve not got one yet, it’s really easy to create a new forever-free developer account.
Once that’s complete and you’ve logged in to the developer dashboard, take a note of the Org URL as we’ll need that later:
From the dashboard go to the ‘Applications’ tab and from there ‘Add Application’. You’re creating a native Android application, so it’s best to pick the ‘Native’ platform template.
From this page add a name for your application and leave everything else as default. Once saved take note of your Login redirect URIs and Client ID as you’ll be needing these next.
So you can use these three values from Okta with ease in the future, I would recommend putting them in their own static class within a new directory for the authentication logic:
Create the Authentication Provider
Let’s get the boilerplate code out of the way. You need to configure the app to inform it of your redirect URI scheme. The scheme is your login redirect URI (in standard reverse domain name form) without the path. For example, from the above screenshot my scheme would be ‘com.oktapreview.dev-123456’.
The easiest way to do this is to insert the below intent filter snippet into your
AndroidManifest.xml
file in the Properties
folder of your solution. Add the following XML within the Application
tag and change the scheme value to your own:You also need to define the model for the result of your authorization with a simple class. While I won’t be using all the values I’ve written below within the code, I will show how to populate them for you to use after. As this is part of your application’s model, create a folder called
Models
and add an AuthorizationResult.cs
class inside it. Then, add the following code:Android doesn’t have a global state for you to work with, and so if you want to pass simple values between activities, the best way to do this is with the
Extras
functionality on the Intent
object. An Intent
is a predefined class in Android and another core concept to understand. It is the abstraction of an operation to be performed (i.e. your ‘intentions’), and to navigate forward to another activity you need to create an instance of this class with which activity you ‘intend’ to go to. The Extras properties on the Intent
object are in effect just a dictionary of keys to object values and are accessed by Put
and typed Get
methods.While these methods keep the usage relatively clear and easy I personally like to keep all access to them within their own class (to be precise, an extensions class), to maintain a better separation of concerns. This is extremely useful as you don’t need to access the keys across classes and can assure type safety when putting and getting these values. In your authorization provider you’ll be wanting to: store the
AuthState
, be able to check whether it’s there, and return it if it is. Create a new folder called Extensions
in the root of the solution. Then add a new class called IntentExtensions.cs
. Make the class public
and static
, then add the following code inside the class:Now it’s time to define the authorization provider,
AuthorizationProvider.cs
in the Authentication
folder you created before for the Configuration.cs
class. Firstly, remove all the using
statements inside the newly created class, then declare the configuration as static readonly
variables:The configuration endpoint is a standard in OpenID as the discovery endpoint to find all that’s supported. Note here I’ve written this is using the ‘default’ provider name. If you have a different provider, you’ll want to change this here. Also note that this is using the
Android.Net
flavour of the Uri class, and not the System
version - you’ll need to add the former to your usings or fully qualify the type for this to work. The Scopes variable, like any other OpenID system, defines what we’re authorized to access.Next you should declare your member variables:
A quick explanation on each:
- The authorization request and completed intent are parameters created for use in making the authorization call. I’ve written them as global variables here to minimise the amount of passing parameters into different methods.
- The authorizationState variable as it’s named defines the current given authorization state.
- The authorizationService variable contains an instance of the authorization service.
- The context variable here is of the calling activity, so you can reference it when necessary.
- Finally, the taskCompletionSource enables you to make all these calls asynchronously and then return once complete.
Now you should define the values of these readonly variables in your constructor, and declare the public methods your code will call:
The SignInAsync method is as you might have guessed an asynchronous method to sign a user in. This returns the
AuthorizationResult
class you wrote earlier. NotifyCallback
on the other hand is for the calling activity, once it has returned from the external sign in page, to call back to the authorization provider and let it know it’s done. The sign in method I’ve broken out into multiple subroutines, and looks like this:In this you have defined the service configuration, built the authorization request and the intent to call once the authorization has been completed, and then await the request of authorization. To build the authorization request is as follows:
The job of this method is to abstract away the
AuthorizationRequest.Builder
work and create the request. Next you need to build the Intent
for once the operation has completed:The ‘intention’ that you want to perform here is to return to your
MainActivity
with a new AuthState attached. Lastly in this flow is to deal with executing the request:As
PerformAuthorizationRequest
is synchronous and returns void, the code awaits upon the taskCompletionSource
member, knowing it will only ever be set once a response has been retrieved. At this very same point you know the authorization state will be populated (if everything succeeded), and so you can return their values as part of the AuthorizationResult.The second public method
NotifyCallback
, as I mentioned before, is what you want the MainActivity
class to call back on, once your above completedIntent
is run. In this method you want to verify the response, update the state appropriately, and if successful, perform a token exchange request:Here you can see in the fail cases I set the result of taskCompletionSource to false, and that will unblock the
RequestAuthorization
method above. Also, the PerformTokenRequest
method takes in a delegate, ReceivedTokenResponse
, to be run once it has completed. This method is as follows:At this point you should have all the authorization data you need, and so can update the state appropriately (where you’ll find the values to return from the sign in method) and set the result to unblock the
taskCompletionSource
task.Implement Authentication into Your Xamarin Interface
As a clean-up if you so wish, feel free to remove all references to the ‘Floating Action Bar’ (also written as ‘FAB’) within the main activity class/axml files as they’re unnecessary bloat at this stage.
To allow the user to sign in you now need to implement this functionality into the UI. Given the default design, the most intuitive way to do this would be to add an item to the overflow menu in the top right corner. You can do this by editing the
menu_main.xml
file in the ‘Resources -> menu’ folder, and adding this item as a child of the menu
tag:With this code you’ve created a new option with a title to be defined in the string resources file. As mentioned before in Android it’s best practice to put all user facing text in the string resources file. To declare this data, edit the
strings.xml
file in the ‘Resources -> values’ folder and add these lines:Not only have I declared a string for the ‘Sign In’ button here, but I’ve also added above a string for a welcome message to the user once they have signed in. The equivalent to the C# code of
this string would be
“Hi, {0}!”`, where the placeholder is of type string.Note with all updates to these Resources-based files, the Resource.designer.cs class will automatically be regenerated with new IDs for each object you’ve created, that can be referenced within your code. If this isn’t working for a particular file then select it in Solution Explorer and look at the Properties window. Make sure the
CustomTool
property is set to the value MSBuild:UpdateGeneratedFiles
, as this is likely missing and preventing the designer file from recognising it as a resource.Next add a
ProgressBar
to the existing activity_main.axml
layout file:This
ProgressBar
(or spinner, as the case is), has an ID you can reference with code, and is set up to sit around the centre of the screen. The visibility is set to gone for now, but once your authorization code is running you can set it to visible and inform the user that the app is busy.Now you have a button to open authentication and a progress spinner to inform the user the app is busy, it’s time to use them. Within your
MainActivity
class add the following property to the Activity
attribute (above the class header):This property ensures there is only one instance of the
MainActivity
class, and you don’t keep opening new ones. Once you’ve done this, add a static member variable for the AuthorizationProvder
you wrote above and create an instance of it within the existing override of the OnCreate
method. Note this should be done after the existing code within the method:Next, override the
OnNewIntent
method. The purpose of this is when a new intent of this class is created (i.e. when the external sign in window returns), you call the NotifyCallback
method from the AuthorizationProvider
. Also included in this is a quick check to make sure it’s the expected flow:Now add the code behind the menu item you added. In the existing override of the
OnOptionsItemSelected
method, add an if
statement with a call to a new method that will handle the sign in process as follows:This new method will start by making the
ProgressBar
you added moments ago visible; to retrieve any component from the layout file, use the generic method FindViewById
and enter the component’s ID as its argument. After this, make a call to the SignInAsync
method and await its result. Once the call has returned the result is then verified as authorized. If this authorization failed for whatever reason an error dialog appears, and the progress spinner disappears again. I’ll leave detailing the success case for now as you still need somewhere to go in that instance:When the user is authenticated you should redirect them to the next page of your experience. If you recall earlier each page is represented by an Activity, and so you need to create a new one now.
To start, within the ‘Resources -> layout’ folder you’ll need to create the new activity layout file “activity_dashboard.axml”. The easiest way to do this is by going to the New Item… option in the context menu and selecting the ‘Android Layout’ template. Within your new layout file add a simple TextView component to display text like this:
In this snippet you have a
TextView
component with a referenceable ID that’s centered in the middle of the page, of which will display a welcome message. Next create a corresponding activity class ‘DashboardActivity’ by means of the ‘New Item…’ option in the context menu from the project in the solution explorer and selecting the ‘Activity’ template. To link this class to its layout file, you need to call the SetContentView function in the generated OnCreate()
method (under the inherited base method invocation):To personalise your welcome message, you’ll want to pass the user’s name to your new activity. If you remember earlier the best way to do this was with Extras on the intent, and you created an extensions class to handle this. Like before, add new methods for ‘Put’ and ‘Get’ of a ‘name’ extra in the
IntentExtensions.cs
file you created above:Now using this extended functionality, after the call to
SetContentView
you did in the OnCreate()
method, retrieve the user’s name and set the TextView
component’s text appropriately:In this extract, upon retrieving the
TextView
instance its value is set to your welcome message, of which is created using the Android Resources equivalent of string.Format()
.With this your dashboard activity is complete, and you now need to call to it. In the placeholder for the success case I left open from the
OnSignInAttempted
method, you can achieve this by adding the following code:The first block reads the token and retrieves the user’s name (if it exists). In the second a new
Intent
is created for the dashboard activity, the user’s name is stored in this Intent
using your above-defined extension method, and then the activity is started (i.e. navigated to). To prevent the user from navigating back to this page afterwards, the code ends by calling the Finish()
method.Run Your Android App
Now it’s time to launch your application using your chosen device!
If you’re debugging using the emulator this should be as simple as hitting F5 of which will first open and load the emulator, and then the code will deploy to it. As a side note you don’t need to close the emulator between run/debug attempts, as it only needs to redeploy the app.
If you’re debugging using a device that hasn’t been used for this purpose before, you’ll need to set the device up first. Do this by enabling developer options and within the new menu, switching on ‘Android debugging’ under the ‘Debugging’ header. After this, just plug the device in, accept the dialog on your device confirming this is a safe debugging connection, and you should be able to deploy and run your app with F5. Note physical devices have higher precedence than the emulator and will switch to it as the default debugging option when plugged in.
Once your app has deployed and loaded up, you’ll be greeted by the default single page template. Open the menu in the top right corner to sign in, and once you’ve entered your details you should return to this page with the spinning progress bar before automatically being sent to the dashboard page with your welcome message:
Learn More About Xamarin, OpenID Connect, and Secure Authentication
If you’ve followed along with all these steps you now have a basic Android app built using Xamarin.Android, with fully functioning user authentication based on OpenID and the Okta service. From here you can easily expand on the dashboard activity to implement your functionality.
To see the code from this post in full head on over to our GitHub page.
If this tutorial has whetted your appetite for Xamarin development and you’d like to learn more, then I’d strongly suggest you have a look at these other great articles:
As always if you have any questions, comments, or concerns about this post feel free to leave a comment below. For other great content from the Okta Dev Team, follow us on Twitter @OktaDev, Facebook, LinkedIn and YouTube!
Please enable JavaScript to view the comments powered by Disqus.
-->| Developer Community| System Requirements| Compatibility| Distributable Code| License Terms| Blogs| Known Issues |
Click a button to download the latest version of Visual Studio 2019. For instructions on installing and updating Visual Studio 2019, see theUpdate Visual Studio 2019 to the most recent release.Also, see instructions on how to install offline.
What's New in Visual Studio 2019
Visual Studio 2019 Releases
- November 20, 2019 — Visual Studio 2019 version 16.3.10
- November 12, 2019 — Visual Studio 2019 version 16.3.9
- November 5, 2019 — Visual Studio 2019 version 16.3.8
- October 29, 2019 — Visual Studio 2019 version 16.3.7
- October 22, 2019 — Visual Studio 2019 version 16.3.6
- October 15, 2019 — Visual Studio 2019 version 16.3.5
- October 10, 2019 — Visual Studio 2019 version 16.3.4
- October 8, 2019 — Visual Studio 2019 version 16.3.3
- October 1, 2019 — Visual Studio 2019 version 16.3.2
- September 25, 2019 — Visual Studio 2019 version 16.3.1
- September 23, 2019 — Visual Studio 2019 version 16.3.0
Archived Release Notes
Visual Studio 2019 Blog
The Visual Studio 2019 Blog is the official source of product insight from the Visual Studio Engineering Team. You can find in-depth information about the Visual Studio 2019 releases in the following posts:
Visual Studio 2019 version 16.3.10
released November 20, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.10
Visual Studio 2019 version 16.3.9
released November 12, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.9
- Fixed crash when editing code while debugging ASP.NET applications.
Visual Studio 2019 version 16.3.8
released November 5, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.8
- Added support for Xcode 11.2
- Fixed an issue where loading existing extensions (.design dll) in UWP crashes Visual Studio.
Visual Studio 2019 version 16.3.7
released October 29, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.7
- Fixed an issue with the Show Output window either closing too quickly.
- Fixed an issue where Visual Studio 2019 stops responding in several scenarios, including opening a solution, changing solution configuration, and closing a solution.
Visual Studio 2019 version 16.3.6
released October 22, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.6
- Fixed an inaccurate error message when developers try publishing .NET Core 3.0 apps to Azure.
- Stability improvement in msbuild/dotnet restore when plugins are used to restore against authenticated feeds.
Visual Studio 2019 version 16.3.5
released October 15, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.5
- Fixed an additional issue causing enterprise users building offline caches and offline users to fail an install.
Visual Studio 2019 version 16.3.4
released October 10, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.4
- Xamarin.iOS Designer update to support for Xcode 11.1
Visual Studio 2019 version 16.3.3
released October 8, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.3
- This fixes an issue with the Snapshot Debugger where customers are using MSA accounts.
- Fixed an issue where customers trying to install Microsoft.Visualstudio.Shell.15.0 NuGet package received a warning message of Framework not found.
- Fixes MSVC compiler bug involving implicit conversion from a lambda to function pointer.
- Fixed issue with Visual Studio crashing due to null reference exception.
- A fix is made to address a compiler internal error when the code has an out-of-line definition of a static data member of a nested class inside a partial specialization.
Visual Studio 2019 version 16.3.2
released October 1, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.2
- Corrected an issue with Xcode 11 support.
Visual Studio 2019 version 16.3.1
released September 25, 2019
Top Issues Fixed in Visual Studio 2019 version 16.3.1
- Fixed an issue causing Visual Studio to stop responding.
Visual Studio 2019 version 16.3.0
released September 23, 2019
Security Advisory Notice
CVE-2019-1425 NPM Package Elevation of Privilege Vulnerability (published November 12, 2019)
An elevation of privilege vulnerability exists when Visual Studio fails to properly validate hardlinks when extracting archived files. The vulnerabilities were introduced by NPM packages used by Visual Studio as described in the following two NPM advisories: npmjs.com/advisories/803 and npmjs.com/advisories/886. The updated versions of these NPM packages were included in this version of Visual Studio.
Summary of What's New in Visual Studio 2019 version 16.3
- Support for adding new Open API & GRPC service references to .NET Core 3.0 projects.
- Support for F# 4.7 and various F# tooling improvements
- Improvements for C++ developers, including toggleable line comments and improved IntelliSense member list filtering.
- Search through recent projects, solutions, and folders within the start window.
- Search for templates in the New Project Dialog with advanced search capabilities.
- Publish .NET Core 3.0 worker projects to Azure Container Registry, DockerHub, etc.
- .NET Productivity additions in this release include the ability to rename the containing file when renaming a class as well as Edit and Continue enhancements within the debugger.
- Debug Azure Functions running in Linux containers.
- Search individual components while installing or modifying in the Visual Studio Installer.
- Streamlined Visual Studio update experience that integrates Visual Studio IDE and Installer updates.
- Differentiate workloads and components when adding them in the Visual Studio IDE.
- Easily find newly installed project templates, view selected values on filters, and pin recently used templates in the New Project Dialog.
- Easily configure your applications' dependencies in publish profiles using the new Add Dependency wizard.
- The Visual Studio installer components for .NET Core 2.1 and 2.2 now also include templates (instead of just the runtime).
- Tooling support for serving static assets from within a Razor class library.
- Updated Python Testing Experience using the newly-added Python testing framework pytest as well as a modified unittest experience.
- Reduced time to index large folders and search for files in these folders.
- Added support for Xcode 11 and iOS 13.
- Added support for Android 10.
- Use XAML Hot Reload for Xamarin.Forms. to rapidly iterate on your Xamarin.Forms UI.
- Android Material Design in the XAML Previewer for Xamarin.Forms.
- New constraint editor in the Xamarin Designer for iOS.
- Enabled publishing iOS apps on Windows.
- There are new options for editing .plist files.
- A variety of C++ productivity improvements, including new C++ Core checks, a new default semantic colorization scheme, and on-by-default IntelliCode
- Support for parallel builds in MSBuild-based Linux C++ projects that leverage the native WSL experience.
- .NET Productivity additions in this release include the ability to wrap chains of fluent calls, introduce a local variable immediately after writing its initializer, .NET Core tooling support for analyzers, and an option to expand the list of completions for unimported types.
- JavaScript/TypeScript syntax classifications and refactorings are more responsive in files.
- Updated the C++ IntelliCode base model to be on-by-default and included Repeated Edits for C#.
- Support for TypeScript 3.6 and more responsive JavaScript/TypeScript refactorings.
- The Performance Profiler via ALT-F2 now provides a database tool for .Net Core projects.
- Added a prompt to install Docker Desktop when adding Docker Support.
- Added the capability to load symbols manually for Azure Watson and .NET Core remote debugging.
- Restored certificate generation and improved the UWP Package signing experience.
Top Issues Fixed in Visual Studio 2019 version 16.3.0
Details of What's new in Visual Studio 2019 version 16.3.0
.NET Framework 4.8
The .NET Framework 4.8 development tools have been added to support targeting .NET Framework 4.8. The .NET Framework 4.8 offers several new features and improvements as well as numerous reliability, stability, security, and performance fixes. Find more details about the .NET Framework 4.8 in the .NET Framework 4.8 blog announcement
.NET productivity
- Developers can now rename a file when renaming an interface, enum, or class. Place the cursor in the class name and type (Ctrl + R,R) to open the Rename dialogue and check the ‘Rename file’ box.
- You can now Edit and Continue support for multi-targeted projects which includes modules loaded multiple times in the same process on different domains or load contexts. In addition, developers can edit source files even when the containing project is not loaded or the application is running.
- You can now wrap chains of fluent calls with a refactoring. Place your cursor on a call chain and press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. Select either Wrap call chain or Wrap and align call chain.
- Users can now introduce a local variable immediately after writing its initializer. First, write an expression. Then place the cursor in the expression name and press (Ctrl+.) to trigger the Quick Actions and Refactorings menu. Select the option to introduce a local variable.
- There is now .NET Core tooling support for analyzers. Users can add the most recommended analyzer package by right clicking on the project name within the solution explorer and select properties. Select Code Analysis to install the analyzer package and to configure when to run code analysis.
- Previously, we added IntelliSense completion for unimported types. This feature came with the option to turn it off for users who did not want unimported types always populating their IntelliSense. Now, for users who turn off the completion for unimported types, it's much easier to get it back in the completion list with the new imported type filter added to the IntelliSense toggles.
- There is now Quick Info style support for XML comments. Place the cursor over the method name. Quick Info will then display the supported styles from the XML comments above the code.
WPF/UWP Tooling
Customers building WPF/UWP applications will see the following improvements in Visual Studio XAML tooling:
Designer:
- WPF Designer now fully available (GA) for WPF .NET Core Projects: The XAML Designer for WPF .NET Core applications is now generally available (GA) to all customers without the need for preview feature flag. The XAML Designer for WPF .NET Core applications is slightly different in some behaviors and functionality then WPF .NET Framework Designer, please note this is by design. Given the difference we’d like to encourage customers to report any problems or limitations that you might be running into using Visual Studio feedback feature.
XAML Debugging Tools:
- XAML Hot Reload support added for WPF resource dictionaries changes: XAML Hot Reload now supports updating WPF Resource Dictionaries for real-time updates in the application. Previously this feature was only available to Universal Windows Platform (UWP), but is now supported for WPF .NET Framework, WPF .NET Core and UWP apps. Supported actions include adding a new Resources section definition and adding, deleting and updating resources new/existing sections.
- In-app toolbar now movable: The in-app toolbar has been enhanced so that it is movable within the running WPF/UWP application, enabling developers to drag it left or right within the app to unblock app UI. Note that position to which the toolbar is moved is not stored between sessions and will go back to the default position when your app is restarted.
UWP Package Signing.
- Brought back the ability to create and import signing certificate files (.pfx) through the Manifest Designer.
- Introduced the ability to create and import signing certificates through the Packaging Wizard to streamline the signing process.
.NET tools
- Support for adding new Open API & GRPC service references to .NET Core 3.0 projects.
- Publish .NET Core 3.0 worker projects Azure Container Registry, DockerHub, etc.
- .NET Core 3.0 templates for Worker, gRPC, Razor Class library & Blazor are surfaced in the New Project Dialog.
- Any updates made to the .NET Core 3.0 templates via the .NET CLI are also surfaced in Visual Studio.
C++
- C++ developers can now toggle line comments using the keyboard shortcut Ctrl + K, Ctrl + /.
- IntelliSense member lists are now filtered based on type qualifiers, e.g.
const std::vector
will now filter out methods such aspush_back
. - Added the following C++20 Standard Library preview features (with
/std:c++latest
):- P0487R1: Fixing
operator>>(basic_istream&, CharT*)
- P0616R0: Using
move()
In<numeric>
- P0758R1:
is_nothrow_convertible
- P0734R0: C++ extensions for Concepts
- P0898R3: Standard Library Concepts
- P0919R3: Heterogeneous Lookup For Unordered Containers
- P0487R1: Fixing
- New C++ Core Guideline checks, including the new 'Enum Rules' rule set, and additional const, enum, and type rules.
- A new default semantic colorization scheme allows users to better understand their code at a glance, the call-stack window can be configured to hide template arguments, and C++ IntelliCode is on-by-default.
- Configure debug targets and custom tasks with environment variables using CMakeSettings.json or CppProperties.json or the new 'env' tag on individual targets and tasks in launch.vs.json and tasks.vs.json.
- Users can now use a quick action on missing vcpkg packages to automatically open a console and install to the default vcpkg installation.
- The remote header copy done by Linux projects (CMake and MSBuild) has been optimized and now runs in parallel.
- Visual Studio's native support for WSL now supports parallel builds for MSBuild-based Linux projects.
- Users can now specify a list of local build outputs to deploy to a remote system with Linux Makefile projects.
- Setting descriptions in the CMake Settings Editor now contain more context and links to helpful documentation.
Container Tools
- Developers building Azure Functions (v2) can now add Docker container support (Linux only) to their C# projects. This can be done by right clicking the project name in Solution Explorer and selecting 'Add' --> 'Docker Support'. In addition to adding a Dockerfile to your project the debug target will be set to 'Docker'. What this means is debugging of Functions code will happen inside of the running container. Users will be able to hit breakpoints, inspect variables, and use all the powerful debugging features Visual Studio provides.
Database Profiling for .Net Core projects
This release includes a new tool in the suite of performance and diagnostics tools available via the Performance Profiler (ALT-F2). The new database tool will provide details about queries from .Net Core projects which utilize ADO.Net or Entity Framework. The tool provides a 'go to source' option for linking to source code and provides timing details for each query executed during a profiling session. This tool can work simultaneouslywith other tools in the Performance Profiler. When used in conjunction with the CPU Usage tool, one gains detailed information about the performance characteristics of .Net Core code which uses a database.
Debugger
- The Parallel Stacks Window has improved the visualization of tasks and their dependencies in a process to make it easier to diagnose problems in asynchronous code.
F# and F# tools
This release includes support for F# 4.7, the newest version of the F# language!
Much of F# 4.7 was dedicated to underlying infrastructural changes that allow us to deliver preview of F# language functionality more effectively. That said, there are still some nice new features delivered as well.
F# language and core library
We added support for F# 4.7, a minor language release that comes with compiler infrastructure to enable preview features so that we can get feedback on feature designs earlier in the development process.
The full F# 4.7 feature set is:
- Support for the
LangVersion
flag, which allows for configuring the F# language version used by the compiler to be F# 4.6 or higher - Support for implicit yields in array, list, and sequence expressions
- Indentation requirement relaxations for static members and constructors
- Relaxing the need for a double-underscore (
__
) in member declarations andfor
loops, contributed by Gustavo Leon - FSharp.Core now targets
netstandard2.0
instead ofnetstandard1.6
, following the deprecation of support for .NET Core 1.x - FSharp.Core on .NET Core now supports
FSharpFunc.FromConverter
,FSharpFunc.ToConverter
, andFuncConvert.ToFSharpFunc
- FSharp.Core now supports
Async.Sequential
and an optionalmaxDegreeOfParallelism
parameter forAsync.Parallel
, contributed by Fraser Waters
In addition to the F# 4.7 feature set, this release includes support for the following preview F# language features:
- Support for
nameof
expressions - Support for opening of static classes
You can enable this by seeting
<LangVersion>preview</LangVersion>
in your project file.This release also contains the following bug fixes and improvements to the F# compiler:
- A longstanding issue where the F# compiler could stack overflow with massive records, structs, or other types has been resolved (#7070)
- An issue where specifying invalid inline IL could crash Visual Studio has been resolved (#7164
- Resolution of an issue where copying of a struct would not occur if it was defined in C# and mutated in a member call (#7406)
- A crypto hash of the portable PDB content created by the compiler is not included in the PE debug directory, with a configurable hash set to SHA-256 by default (#4259, #1223)
- A bug where
LeafExpressionConverter
ignoredValueType
and assumedSystem.Tuple
has been fixed (#6515) by Kevin Malenfant - A bug where
List.transpose
discaded data instead of throwing an exception has been resolved (#6908) by Patrick McDonald - A bug where
List.map3
gave a misleading error when used on lists of different lengths has been resolved (#6897) by reacheight
F# tools
This release also includes a few improvements to the F# tools for Visual Studio:
- Records are formatted more to look more like canonical declarations and values in tooltips and F# interactive (#7163)
- Properties in tooltips now specify whether or not that are
get
-only,set
-only, orget
andset
(#7007) - An issue where Go to Definition and other features could not always work across projects when files use forward slashes (#4446, #5521, #4016) has been fixed, with help from chadunit
- Issues with anonymous records and debugging have been resolved (#6728, #6512)
- A bug where empty hash directives in source could make source text coloring seem random has been resolved (#6400, #7000)
IDE
- A search box in the start window allows you quick location of recently used projects, solutions, and folders. In addition, these MRU code containers integrate with Visual Studio global search so developers can find them through the Visual Studio search box.
- Improvements to the Installer dialog interface within the Visual Studio IDE makes it easier to identify specific workloads being added to Visual Studio.
- VS Search will support the ability to search for types and members with C# and VB, as well as file search for all languages. Results will show up as users type their search query, as well as in a dedicated ‘Code’ group accessible via keyboard shortcut or mouse click.
- Newly installed project templates are indicated with a 'New' label to allow quick identification, and filters show selected values in the New Project Dialog. In addition, developers can organize recently used templates by pinning, unpinning, and removing them from the list.
- Search for templates in the New Project Dialog through a more robust fuzzy search which adapts with typos and plurals to highlighting matching keyword and rank results based on search and filter relevance.
Installer
- Visual Studio now updates both the Visual Studio IDE and the Installer with a single click for increased productivity.
- The Visual Studio installer components for .NET Core 2.1 and 2.2 used to only carry the runtime. From this preview onwards the components will also carry the templates as well as the runtime.
- A search box in the Visual Studio Installer's Individual components tab allows for quick location of all available components for installation.
IntelliCode
- The C++ base model has been turned on by default.
- You can change this setting by going to Tools > Options > IntelliCode.
- We've included Repeated Edits for C#, which analyzes local edits for repeatable changes and determines other places you may need this change within the same file.
- Suggested repeated edits will appear in the Error List and as warnings within the code file.
JavaScript/TypeScript
- JavaScript and TypeScript classification (commonly called “syntax coloring”) will be applied to large files more quickly. The list of JavaScript and TypeScript code fixes and refactorings (i.e. the lightbulb) will also be displayed more quickly.
- There is now editor support for TypeScript 3.6.
- When a tsconfig.json file is edited or changed, Visual Studio will now refresh the project more responsively.
Python Tests
- Python Developers can now run tests using the popular Python framework pytest in both Python projects and Open Folder workspace scenarios.
- To enable pytest and unittest for Python projects, right-click on the project solution name and select Properties. From there, select the Test tab to select testing options. Note that for unittest, you must specify the directory for the tests (root directory is the default) as well as the pattern for the test filenames. Test Discovery is intitiated as soon as changes are saved in the Test tab.
- The unittest testing experience has been reworked such that a user now needs to manually configure tests for both Python projects and Open Folder workspaces as these tests are no longer automatically discovered:
- To enable tests for Python folders, click on the icon to Show All Files in the Solution Explorer. From there, click on the PythonSettings.json file located within your 'Local Settings' folder (if there isn't a file there, create one). Within this file, you can specify the 'TestFramework' you wish to use as well as the test filename patterns and the directory that contains your tests (both options apply to unittest):
- Test debugging is updated to use PTVSD 4, but if users wish to continue using the 'Legacy Debugger' or run into any issues with using the new debugger, they can enable it by going to Tools > Options > Python > Debugging > Use Legacy Debugger and check the box to enable it.
- We have also made it simple for users with pre-existing projects and in open folder workspaces that contain test files to quickly continue working with their code in Visual Studio 2019. When users open a project that contains testing configuration files (e.g. a .ini file for pytest), but they have not installed or enabled pytest, they will be prompted to install the necessary packages and configure them for the Python environment they are working:
- Similarly for unittest test files within a project or open folder workspace, users will be prompted to install and/or enable the testing framework. For both scenarios, developers have the option to ignore the message and to manually configure the framework.
Visual Studio Performance Profiler
- The CPU Usage tool in the Performance Profiler automatically displays the 'hot path' indicator with a red flame icon when displaying the Call Tree. This saves a click on common CPU Usage performance investigations. The CPU Usage tools is accessible by using Alt-F2 or from the Debug menu.
- The Performance Profiler now participates in forward/backward navigation in the Visual Studio IDE. As developers navigate to various views of tools in the Performance Profiler, navigation points are saved along with other navigation items. They can be employed by clicking the navigation buttons or using navigation commands in Visual Studio.
Web Tools
- Easily configure applications' dependencies in publish profiles using the new Add Dependency wizard. It currently supports adding dependencies to Azure SignalR Service, Azure SQL Server, Azure Storage allowing users to either provision new instances or select existing ones without leaving the IDE.
- The ASP.NET runtime team has enabled support for serving static content from within Razor class libraries due to popular demand. In this preview of Visual Studio, the team has added tooling support for this scenario.
Xamarin
This release includes the following Xamarin SDK updates:
- Xamarin.iOS 13
- Adds support for Xcode 11 to build and debug apps for iOS 13, tvOS 13, and watchOS 6. See our Introduction to iOS 13 for more details on the new features available.
- Xamarin.Android 10
- Android apps can now target Android 10 by setting Compile using Android version: (Target Framework) to Android 10.0 (Q) under the Application tab of the project property page. Android 10 introduces features such as dark theme, gestural navigation, and optimizations for foldable devices. See our Android 10 with Xamarin page for more information on these new features.
This release also includes several new tooling features and enhancements:
Download Visual Basic 6.0 For Android
- A public preview of XAML Hot Reload for Xamarin.Forms is available in this release. XAML Hot Reload lets you rapidly iterate on your UI while debugging your app on an emulator, simulator, or physical device. Simply edit your XAML then save the file to see the changes immediately reflected on the running app. To enable XAML Hot Reload, go to Tools > Options > Xamarin > Hot Reload.
- The XAML Previewer for Xamarin.Forms now renders Material design for both iOS and Android when using Xamarin.Forms Visual.
- The Xamarin Designer for iOS has a new way to work with constraints. When you select a constrainable view, an ellipsis will now appear in the toolbar next to the Constraints Pinning Mode selector. Click the ellipsis to display a popover for editing constraints on the selected view.
- You can now archive and publish iOS apps from Visual Studio on Windows. Create an archive while paired to a Mac machine by setting the configuration to Release|iPhone, right-clicking your iOS project in the Solution Explorer, and selecting the Archive... menu option. From the archive manager you can save an .ipa to disk for ad-hoc distribution or upload to App Store Connect to publish your app to the App Store.
- When you right-click a .plist file in the Solution Explorer, there are new options to quickly open it using the generic plist designer or the XML editor.
Known Issues
See all issues and available workarounds in Visual Studio 2019 version 16.3 by following the below link.
Feedback
Download Visual Basic Studio For Android
We would love to hear from you! For issues, let us know through the Report a Problem option in the upper right-handcorner of either the installer or the Visual Studio IDE itself. The icon is located in the upper right-hand corner.You can make a product suggestion or track your issues in the Visual Studio Developer Community, where you can ask questions, find answers, and propose new features.You can also get free installation help through our Live Chat support.
Blogs
Take advantage of the insights and recommendations available in the Developer Tools Blogs site to keep you up-to-date on all new releases and include deep dive posts on a broad range of features.
Visual Studio 2019 Release Notes History
For more information relating to past versions of Visual Studio 2019, see the Visual Studio 2019 Release Notes History page.