Last month I wrote a quick review for Visual Studio 11, which is literally a quick and general introduction to VS 11. The article today, as my exploration deepens, focuses on the improvements that are crucial for developers. They are:

  1. Windows Metro style apps
  2. IDE
  3. Async feature and Caller information for VB & C#
  4. Parallel related improvements for C++
  5. New in JavaScript & Visual F#
  6. New in Debugging
  7. New for data application development
  8. ASP.Net 4.5 and Web Development
  9. .Net 4.5
  10. Integration with Dynamsoft source control

 

1. Windows Metro style apps

Windows Metro style apps come with Windows 8. They are similar to Android apps and iOS apps but brand new on Windows platform. There’re two things you need to do before starting to develop and test these apps. First, you must install Visual Studio 11 on Windows 8. Second, you must obtain a developer license1 for the Windows Store.
You can develop a Metro style app2 using HTML5, CSS3, JavaScript; XAML with C++, C#, or Visual Basic; native C++ and HLSL. See the diagram below.

win-8-framework

2. IDE

Compatibility3
The IDE of Visual Studio 11 is backward compatible. I can open all files, projects or solutions that were created in Visual Studio 2010 with SP1. The earlier versions like VS 6.0, VS 2003, VS 2005 are not tested yet. However, I strongly recommend you to upgrade your projects in avoid of any unex
The new Solution Explorer brings much convenience for developers to manage codes. We can left click on a file to preview the code inside, double left click to open it. The code preview tab is in the top-right of the code editor. See the screenshot below.pected problems.

 

Solution Explorer

vs-11-solution-explorer

Quick Launch
We can now access the menus by pressing Ctrl+Q, and then entering search strings that contain @. This improvement makes it possible to use menus, tools and even complicated options that are hidden deep inside the menu tree without moving our mouse. What a time-saving feature!
Available shortcuts: @mru, @menu, @opt, @doc and etc.

vs-11-shortcuts

Code Editor
The Code Editor now shows a long list of relevant members and really detailed tips automatically as you type. Its options are in Options > Text Editor. You may configure or turn it off as you like.

vs-code-tips

3. Async feature and Caller information for VB & C#

Async feature has been introduced to VB and C# 5, which makes asynchronous programming straightforward and neat. Check the sample code below. With only a few lines, the synchronous method GetURLConcents is converted to an asynchronous method GetURLContent.

In multithreaded object-oriented programming, asynchronous methods free up resources that are normally wasted while waiting for a long running operation to complete. Particularly when it is a UI thread, the whole application UI will freeze for a long time only because it is trying to fetch a big bulk of data.

I believe it’s the most favourable feature in VS 11 for many VB /C# developers. In before, if we want to make our code asynchronous to deliver a responsive user experience, we’ll have to write methods that return an extra argument, say “awaiting” or “continuation”, instead of returning a simple result. And this approach will make our code prolix, complicated and difficult to read.

async-code-prw

4. Parallel related improvements for C++

C++ AMP4 programming model
Thanks to C++ Accelerated Massive Parallelism (C++ AMP), C++ execution now can make use of both GPU’s and CPU’s computation power.
C++ AMP provides an easy way to write C++ code that compile and execute on data-parallel hardware (commonly discrete graphics card). Basically we can use the library, methods, extensions and compiler restrictions that it includes to control how data is transferred between CPU memory and GPU memory. However, we cannot be too careful with time cost and data throughput overhead during the process, otherwise it will against the computational acceleration that can be achieved by parallel execution.

Auto-parallelizer
The new auto-parallelizer in C++ compiler enables our code to run more efficiently on multi-core and multiprocessor hardware. It reorganizes a loop automatically, but we can also use #pragma parallelize to control which loops to parallelize.

Auto-vectorizer
The C++ compiler recognizes and automatically vectorizes loops so that the CPU can execute several iterations in the same time. Material from Microsoft asserts ‘Vectorized loops can run up to eight times faster on CPUs that support vectorization’, which is definitely a huge boost.

5. New in JavaScript, F#

JavaScript
New features: Strict Mode, Typed Arrays, Windows Runtime, Web Workers, Async Attribute

Visual F#
Visual F# in VS 11 beta features F# 3.0.
New features: Type Providers, Query Expressions, Auto-implemented properties
New in development environment: Parameter Help, Enhanced IntelliSense
For details, see reference5

6. New in Debugging

Debugging tools for Metro style app6
VS 11 includes a set of testing and debugging tools especially for Metro style app. For instance, Metro style simulator and Remote debugging.

Parallel Debugging
We can now use GPU Threads and Parallel Watch windows to debug parallel applications. In addition, two new windows have been added:

GPU Threads window7: displays the status and details of the threads running on the GPU.

Parallel Watch window8: displays values of a single expression across multiple threads at the same time.

vs-11-gpu-debugging

Note: GPU debugging in VS 11 only supports C++ AMP and requires Windows 8 or higher version operating system.

7. New for data application development

SQL Server Object Explorer
We can open it from View menu > SQL. This tool set is quite similar to the SQL Server Management Studio we’re using. With it, we can create, edit and delete SQL Server tables, table data, functions, as well as execute queries.

New Table Designer
We can now define and change the table definition through this graphical interface, the Script pane will update the table’s script definition accordingly.

SQL Server Express LocalDB9
This is a lightweight version of SQL Server that has most of the programmability features of a typical SQL Server database. It runs in user mode, light, fast, and the installation is configuration free.
It is possible to manage LocalDB using Visual Studio. You may still use SSMS though.

Database File Conversion
Before using existing database files (.mdf) in Visual Studio 11, you must convert them to the database file format of SQL Server 2012 RC 0.
Note: After upgrade, the database file will no longer be compatible with earlier versions of SQL Server.

8. ASP.Net 4.5 and Web Development

Multi-browser Support
Installed browsers will appear in the drop-down menu next to Start Debugging button.

vs-11-web-dev

Added or enhanced features: Page Inspector, HTML Editor, CSS Editor, JavaScript Editor

IIS Express
In VS 11, IIS Express becomes the default web server for testing web projects. As its name indicates, this is a lightweight, self-contained, optimized and configuration-free version of IIS. It enables us to test on a real IIS without being admin. When we start debugging a website, IIS Express runs automatically.
Right click on the website name and select Property Window, we can find option to enable SSL.

iis-express

9. .Net 4.5

Key new features:

  • .NET APIs for Metro style apps ;
  • The Portable Class Library;
  • Reduce System Restarts during installations;
  • Support arrays larger than 2GB on 64-bit;
  • Background garbage collection;
  • Console support for Unicode (UTF-16) encoding;
  • Regular expression timeout;
  • Zip compression

10. Integration with Dynamsoft Source Control

Connect Dynamsoft TFS Hosted Server

connect-to-tfs

Connect to Dynamsoft SCM Anywhere / SourceAnywhere Hosted

  • Open Menu > Tools > Source Control > Plug-in Selection > Current Source Control plug-in.
  • Select Dynamsoft SourceAnywhere Hosted or Dynamsoft SCM Anywhere Hosted MSSCCI plug-in.

Note: SCM Anywhere VSPackage doesn’t support VS 11 Beta yet. But I can promise our R&D team won’t have you wait too long.

References:

  1. Getting a developer licence
  2. Getting started with Metro style apps
  3. Visual Studio 11 compatibility.
  4. C++ AMP
  5. What’s New for Visual F# in Visual Studio 11 Beta
  6. Debugging and testing Windows Metro style apps
  7. How to: Use the GPU Threads Window
  8. How to: Use the Parallel Watch Window
  9. Using LocalDB in Visual Studio 2010