Latest and greatest from the Visual Studio family

  • Slides: 36
Download presentation
Latest and greatest from the Visual Studio family for C++ developers Steve. Carroll &

Latest and greatest from the Visual Studio family for C++ developers Steve. Carroll & Daniel. Moth @microsoft. com https: //blogs. msdn. microsoft. com/vcblog/

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio Code) • Workloads (Windows, Windows Store, Android, i. OS, Linux, Io. T, Games)

Libraries Acquisition • 80% of C++ projects use 2 or more 3 rd party

Libraries Acquisition • 80% of C++ projects use 2 or more 3 rd party libs • A majority of them use open source libraries • Acquiring and rebuilding libs on Windows can be simple • Nu. Get wasn’t designed for C++, e. g. no local rebuilding • Open source tool based on a port tree approach (Vcpkg) • Usage: vcpkg install boost • Installs the. h, . lib and binaries in a “lib folder” ready to use https: //github. com/Microsoft/vcpkg

Win an Xbox One S Take this survey: http: //aka. ms/cppcon

Win an Xbox One S Take this survey: http: //aka. ms/cppcon

Other Talks • Tuple: What's New, And How It Works • C++ Modules: The

Other Talks • Tuple: What's New, And How It Works • C++ Modules: The State of The Union • C++ Coroutines: Under the covers • An Introduction to C++ Coroutines • Putting Coroutines to Work with C++ for the Windows Runtime • The Guideline Support Library: One Year Later • Iterator Haiku (Range-v 3) • Latest and greatest from the Visual Studio family for C++ developers

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio Code) • Workloads (Windows, Windows Store, Android, i. OS, Linux, Io. T, Games)

C++ Conformance C++11 Two-phase Name Lookup* Expression SFINAE (via Boost) C++17 C++14 Expression SFINAE

C++ Conformance C++11 Two-phase Name Lookup* Expression SFINAE (via Boost) C++17 C++14 Expression SFINAE (via more libraries) NSDMI for Aggregates Extended Constexpr Generalized range-based for-loops Terse static_assert** Attribute [[fallthrough]]** …

Compiler switches [easing your upgrade process] • /permissive- • Introducing the idea of a

Compiler switches [easing your upgrade process] • /permissive- • Introducing the idea of a “less permissive mode" in the compiler • Off by default now… on by default at some point in the future • /std: c++14 • On by default, for now • The latest blessed C++ standard • i. e. standards features up to C++14 • /std: c++latest • Off by default, for ever • Every implemented feature that is not part of a finalized standard yet

Example libraries that we couldn’t compile previously • Most Boost MSVC workarounds can be

Example libraries that we couldn’t compile previously • Most Boost MSVC workarounds can be removed • BOOST_MSVC_SFINAE_EXPR - now • BOOST_NO_CXX 14_AGGREGATE_NSDMI - VS 15 Preview 4 • BOOST_NO_CXX 14_CONSTEXPR, BOOST_NO_CXX 14_VARIABLE_TEMPLATES - VS 15 RC • Boost. Spirit X 3 parser framework - VS 15 RC • Sprout constexpr containers/algorithms - VS 15 RC • Range-V 3 (MSVC compatible version) • Crow micro web framework • Google. Test (for C++11) • JSON for Modern C++ (nlohmann github version) • . . .

Compiler Diagnostics Improvements • Column Information and Source Context : /diagnostics: caret • Special

Compiler Diagnostics Improvements • Column Information and Source Context : /diagnostics: caret • Special Member Function errors

Generated Code Quality: Perf, Reliability, Security • New SSA-based expression optimizer • Eigen benchmarks:

Generated Code Quality: Perf, Reliability, Security • New SSA-based expression optimizer • Eigen benchmarks: up to 7% speedups • Spec 2 K 6 benchmarks: up to 10% speedups • Even more Real World Code • Windows, Office, Bing, Core. CLR, Chakra • Chrome, Boost, Open. SSL, Open. CV, Clang/LLVM, Rx. Cpp, Unreal. Engine • CFG (/guard: cf) Improvements, e. g. guard long jumps void bar() { jmp_buf b; int res = _setjmp(b); . . . // hacker corrupts memory, making res //point to their own function and stack longjmp(b, 1); // CFG instrumentation will now // catch that longjmp is not // targeting a legal setjmp and fastfail } // Source code int test(int a) { return a % 2 != 0 ? 4 : 2; } // ASM without the new optimizer ? test@@YAHH@Z PROC and ecx, -2147483647 jge SHORT $LN 3@test dec ecx or ecx, -2 inc ecx $LN 3@test: test ecx, ecx mov eax, 2 mov edx, 4 cmovne eax, edx ret 0 // ASM with the new optimizer ? test@@YAHH@Z PROC and ecx, 1 lea eax, DWORD PTR [rcx*2+2] ret 0

Build Throughput • Faster builds (with improved linking) • VS 2015 Update 3 •

Build Throughput • Faster builds (with improved linking) • VS 2015 Update 3 • When opting for /debug: fastlink, 2 -4 x faster, e. g. Fable, Forza, Chrome, Bing Maps • Standalone tool (mspdbcmf. exe) to generate FULL PDB for binary • VS “ 15” • On by default, further improves link times by 30% (over VS 2015 U 3) • mspdbcmf. exe integrated as part of the Visual Studio build experience • Incredi. Build extension • Generates an improved build plan which breaks down false dependencies • Intelligent dynamic resource management (up to 8 cores with the FREE extension) • e. g. Qt from 942 to 844 seconds • e. g. ACE from 392 to 282 seconds • Build visualization and diagnostic tools to find build bottlenecks

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio Code) • Workloads (Windows, Windows Store, Android, i. OS, Linux, Io. T, Games)

The Visual Studio family https: //www. visualstudio. com/

The Visual Studio family https: //www. visualstudio. com/

VS 2015 RTM Recap Release Update 1 Update 2 Update 3 • Jul 2015

VS 2015 RTM Recap Release Update 1 Update 2 Update 3 • Jul 2015 • Nov 2015 • Mar 2016 • Jun 2016 • Intelli. Sense • Single file browsing/Intelli. Sense • Simplified template deduction • Refactoring • Debugging • Perf. Tips, Integrated Memory & CPU views • En. C x 64 support, Breakpoints config, Exceptions window, natvis improvements • Rename, Extract function, Move definition, Convert to raw-string literal • Code generation • Create definition/declaration • Implement pure virtuals • Other • Error List, Window Layout https: //youtu. be/Uuw. BG 9 f 4 Zi. Q

Visual Studio 2015 Update 3 (and Visual Studio “ 15”) • Intelli. Sense •

Visual Studio 2015 Update 3 (and Visual Studio “ 15”) • Intelli. Sense • New database format for scale • Refactoring • Change signature, Extract function • Quick fixes • Convert dot to arrow, Suggest missing #includes, Fully qualified name/use namespace • Debugging • More En. C, more Memory profiler, more natvis, Access Violations • VS “ 15” only • Run to Click • Go-to (ctrl - , ) • Exception helper and conditions when breaking on exception • Improved • Error List results • Find All References and Intelli. Sense • Memory and CPU profiler • Extensions • Bing developer assistant, Google Test Runner, Boost Test Runner

demo Visual Studio productivity

demo Visual Studio productivity

Visual Studio Code: C/C++ Extension • Lightweight, keyboard focused • Git integration • Code

Visual Studio Code: C/C++ Extension • Lightweight, keyboard focused • Git integration • Code Editing • Go to definition, Peek definition, Switch header/source, Fuzzy auto-complete • Code formatting (clang-format) • Debugging • Core-dump debugging, launch, attach, breakpoints (incl. conditional and function), stepping, threads, call stack, watch, GDB and MI commands • Easily run, build, test, and run external tasks https: //code. visualstudio. com/docs/languages/cpp

demo Visual Studio Code

demo Visual Studio Code

Visual Studio “ 15” continued • Performance • Auto-precompiled headers for Intelli. Sense perf

Visual Studio “ 15” continued • Performance • Auto-precompiled headers for Intelli. Sense perf (when no PCH) • Memory usage during debugging significantly decreased • E. g. debugging a specific problematic project down to 1. 9 G from… crashing • Solution load dramatic improvements • Open Folder • CMake • … • Acquisition / Installation 80 70 60 50 40 30 20 10 0 Before (sec) 76 76 After (sec) (smaller is better) 34 15 1700 projects (cold load) 8 4 1700 projects 1 large startup (warm load) + 23 small projects (warm load)

demo Visual Studio “ 15” Open Folder, CMake

demo Visual Studio “ 15” Open Folder, CMake

New Acquisition / Installation With VS “ 15”

New Acquisition / Installation With VS “ 15”

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio Code) • Workloads (Windows, Windows Store, Android, i. OS, Linux, Io. T, Games)

Windows, Windows Store • Universal Windows Platform (UWP) • • New way to target

Windows, Windows Store • Universal Windows Platform (UWP) • • New way to target Win 10 Desktop, Mobile, Xbox, and Holo. Lens from a single binary Accelerated Open. GLES 1, 2 and 3 support through Angle OSS library C++/Win. RT - a language-extension-free Win. RT projection for C++ (experimental) Large game deployments to Xbox • Bridges to Windows Store • Centennial (from desktop) - Packaging your desktop apps in the Store • Islandwood (from i. OS) • Share source code across Desktop, UWP, Android and i. OS (and soon Linux)

Android and i. OS • Improvements and bug fixes for the edit-build-debug cycle •

Android and i. OS • Improvements and bug fixes for the edit-build-debug cycle • i. OS • Easily import (and roundtrip) your Xcode project into Visual Studio • Android • New releases • New Android API levels (23, 25) • Android NDK x 64 • Android NDK R 11 c support • Java language service and debugging • Support for Android Gradle build system • Cpp. Con: Mobile App Development for Multiple Platforms with Visual C++ https: //visualstudio. com/vs/cplus-mdd/

Linux • Use Visual Studio with any Linux distro or Windows Subsystem for Linux

Linux • Use Visual Studio with any Linux distro or Windows Subsystem for Linux • Ships as an extension for VS 2015, is a workload in VS “ 15” • Remote system needs SSH, GDB, and GCC for compile • Project templates today enable remote compile/debug • Intelli. Sense supports GCC with standard Linux libraries out of the box • Connect using user/password or private key • Cross compilation is planned • Resources • Documentation: http: //aka. ms/vslinux • Issues, discussion: https: //github. com/microsoft/vslinux

demo Targeting Linux from Visual Studio

demo Targeting Linux from Visual Studio

Io. T • Visual C++ for Linux Development works with Io. T devices running

Io. T • Visual C++ for Linux Development works with Io. T devices running Linux • E. g. Raspberry Pi, Beaglebone, Edison • We are looking at extending it to enable GCC MCU devices • The Azure Io. T SDK supports Linux and MCU devices • • • Portable to very small devices Provides message processing and device management capabilities Any device with network capability can get messages to/from Azure Devices without network capability can communicate through gateways https: //azure. microsoft. com/develop/iot/

Games • Use the cloud to build, launch, and scale out your games •

Games • Use the cloud to build, launch, and scale out your games • https: //azure. microsoft. com/solutions/gaming/ • Graphics debugger and profiler fully support Direct. X 12 with new features • View resource history, View API and memory statistics, View a consolidated list of errors/warnings detected by the Direct 3 D debug layer, Frame Analysis for Direct. X 12, Improvements to GPU Usage • Game engine partnerships • Unity, Unreal, and Cocos https: //www. visualstudio. com/features/game-development-vs

Games • Use the cloud to build, launch, and scale out your games •

Games • Use the cloud to build, launch, and scale out your games • https: //azure. microsoft. com/en-us/solutions/gaming/ • Graphics debugger and profiler fully support Direct. X 12 with new features • View resource history, View API and memory statistics, View a consolidated list of errors/warnings detected by the Direct 3 D debug layer, Frame Analysis for Direct. X 12, Improvements to GPU Usage • Game engine partnerships • Unity, Unreal, and Cocos https: //www. visualstudio. com/features/game-development-vs

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio

AGENDA • Compiler and Libraries: Status and Roadmap • Tools (Visual Studio, Visual Studio Code) • Workloads (Windows, Windows Store, Android, i. OS, Linux, Io. T, Games)

Want our help upgrading to VS 2015 or VS “ 15”? • Since announcing

Want our help upgrading to VS 2015 or VS “ 15”? • Since announcing the 2015 Migration Dev. Lab at //build, we ran several Dev. Labs, and as a result updated the MSDN Documentation • https: //msdn. microsoft. com/library/dn 986839. aspx • We created a Git. Hub repo with a lot of resources to help you migrate • Use this repo to explore solutions and submit error cases • https: //aka. ms/VCSamples • If even with the above you are still having migration issues, please reach out to organize a Dev. Lab for your code (very limited slots available) • vcupgrade@microsoft. com

Summary • Visual C++ toolset (compiler and libs) • The obvious choice on Windows

Summary • Visual C++ toolset (compiler and libs) • The obvious choice on Windows • Visual Studio 2015 Update 3, Visual Studio “ 15” • Most productive IDE for your editing, building, debugging • Performance you can feel, Fast and easy workload installation, Open Folder • Visual Studio Code • Code editor redefined, optimized for editing and debugging your C/C++ code • Any C++ developer, building any type of app • No matter what platform you are targeting • Microsoft • We are listening and participating, tell us what you want to see next