Quantcast
Channel: Category Name
Viewing all 10804 articles
Browse latest View live

Seeing Theory: Learn Statistics through simulation

$
0
0

There's an ongoing debate in the academic community about whether Calculus is a necessary pre-requisite for teaching Statistics. But in age of ubiquitous computing resources (not to mention open source programming languages like R), there's a fair argument to be made that all you really need is simulation. However complex the statistical proposition, you can always find useful information about its properties simply by generating a bunch of random numbers and seeing what happens.

The same applies to education: rather than focusing on probability and calculus, students can simply see what happens when you flip a coin or roll dice, and how the statistics converge in the long run. That's the premise behind Seeing Theory, a visual introduction to probability and statistics created by Daniel Kunin, a senior at Brown University. It starts with probability: for example, rolling a fair die to show the long-term average is 3.5. There's also a neat method of estimating the value of pi by counting random points falling in (or out) of a circle, or this demonstration of the Central Limit Theorem that drops random samples out of a skew distribution and showing that their mean has a Normal distribution.

CLT

There's lots more to explore (though some of the units are still being developed), and it's a great calculus-free way to get a budding statistician interested in the topic.

That's all from us for this week. Enjoy your weekend, and we'll see you back here on Monday!


ICYMI – Your weekly TL;DR

$
0
0

Building a new app this weekend? Check out last week’s Windows Developer updates before you dive in.

COM Server and OLE Document support for the Desktop Bridge

The Windows 10 Creators Update adds out-of-process (OOP) COM and OLE support for apps on the Desktop Bridge – a.k.a Packaged COM. Read more here to find out how it works.

New! Get out-of-process COM and OLE support for apps on the Desktop Bridge. https://t.co/3A7EADocI5

— Windows Developer (@windowsdev) April 13, 2017

Visual Studio 2017 – Now Ready for Your Windows Application Development Needs

Visual Studio 2017 is the most powerful Universal Windows Platform development environment. It brings unparalleled productivity improvements, a streamlined acquisition experience and enhanced debugging tools for UWP devs. Check it out.

The new version of Visual Studio has been out for a month! Read about it here: https://t.co/Yp3P4qXPVN

— Windows Developer (@windowsdev) April 12, 2017

Monetizing your app: Advertisement placement

App developers are free to place their ads in any part of their apps and many have done so to blend the ad experience into their app. We have seen that devs who take the time to do this get the best performance for their ads and earn more revenue. Want to learn how they do it?

Learn where to place ads in your app for the best possible performance. https://t.co/qJKfs64Stb

— Windows Developer (@windowsdev) April 10, 2017

The new Djay Pro App for Windows

Pretty cool work from the devs at @Algoriddim! https://t.co/sjWqqCxGap

— Windows Developer (@windowsdev) April 10, 2017

Download Visual Studio to get started.

The Windows team would love to hear your feedback. Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The post ICYMI – Your weekly TL;DR appeared first on Building Apps for Windows.

Bring your existing C++ Linux projects to Visual Studio

$
0
0

Visual Studio supports targeting Linux out of the box – you can edit, remote build and remote debug to a Linux machine (whether that’s a remote machine, a VM running locally or in the cloud, or WSL in Windows 10).

This article covers the high-level steps to bring your existing Linux projects to Visual Studio. You can read about other C++ project types in the guide for Bringing your C++ code to Visual Studio.

Step 1. Install: Just make sure that you select the C++ Linux workload as part of the VS installation.

bringcode-linux-install

Step 2. Generate VS project: The next step is to create a VS Linux makefile project

$ ./genvcxproj.sh ~/repos/preciouscode/ preciouscode.vcxproj Z:

Step 3. Configure VS project properties: You will need to specify in Project Properties (right click on project in Solution Explorer) > Remote Build > Build Command Line the exact command you use on your Linux machine to build the sources. In addition, you will want to specify the additional include path that VS IntelliSense can use to properly aid when editing the code.

bringcode-linux-propertypages

After these steps, you will be able to edit and browse your C++ code, build and debug remotely.

bringcode-linux-debug

What’s next

Follow the links to learn more about Visual C++ for Linux development and Targeting the Windows Subsystem for Linux from Visual Studio.

If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developer topic (Coming soon!) and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.

Bring your existing Android Eclipse projects to Visual Studio

$
0
0

You can use Visual Studio to develop your C++ projects targeting Android. To learn more about this support read the Visual C++ for Cross-Platform Mobile development section on MSDN.

If you’re currently using Eclipse and considering moving to Visual Studio, you can do that via our Eclipse Android Project Import Wizard. You can read about other C++ project types in the guide for Bringing your C++ code to Visual Studio.

Step 1. Install Android Support: Make sure that during VS installation, you select the “Mobile development with C++” workload. By default, it already includes all the prerequisites needed to build C++ Android projects.

bringcode-md-install

Step 2. Install the Eclipse Import Wizard extension: From the Marketplace, install the Java Language Service for Android and Eclipse Android Project Import extension.

Step 3. Run the import wizard: Launch the wizard from File > New > Android Projects from Eclipse and follow the instructions

bringcode-md-eclipse-wizard

When the wizard completes, you will have projects for both the C++ parts and the Java parts of your Android Eclipse project. You can develop your Android project by editing, building and debugging both C++ and Java code.

bringcode-md-slnexplorerbringcode-md-debug

What’s next

If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developer topic (Coming soon!) and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.

Migrate your existing iOS XCode projects to Visual Studio

$
0
0

If you’re targeting iOS and writing a lot of C++ code, you should consider importing your XCode projects inside Visual Studio. Visual Studio not only provides an easy way to import these projects, but also allows opening these projects back in XCode if you need to make non-C++ related edits (e.g. storyboarding, UI design).

This article covers the high-level steps needed to import your existing iOS XCode projects into Visual Studio. You can read about other C++ project types in the guide for Bringing your C++ code to Visual Studio.

Step 1. Install iOS support: Make sure that during VS installation, you select the “Mobile development with C++” workload. In the customization pane, make sure you select the “C++ iOS development tools” option as well.

bringcode-ios-install

bringcode-ios-install-options

Step 2. Install the remote Mac tools and connect from VS: Install vcremote on the Mac machine following the instructions in “Install and Configure Tools to Build iOS projects”. Then, in VS, from Tools > Options > Cross Platform > C++ > iOS, pair VS with your Mac machine

bringcode-ios-options

Step 3. Launch the XCode import wizard. Go to File > New > Import > Import from XCode and follow the steps of the wizard. To learn more about the wizard, read “Import a XCode project” in MSDN

bringcode-ios-import

Each XCode target will create a new Visual Studio project and your iOS source code will be available for further editing, building and debugging.

bringcode-ios-debug

Step 4 (optional). Open Visual Studio project in XCode: When you need to make non-C++ changes to your iOS projects (e.g. storyboard editing), Visual Studio can automatically open your projects inside XCode running on your Mac. Once you’re done making changes, you can ask VS to copy these changes back to the Windows machine. Follow this link to learn more about syncing changes between XCode and Visual Studio.

bringcode-ios-xcode

What’s next

To learn more about the iOS support in Visual Studio read “Developing cross-platform iOS applications using Visual Studio”.

If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developer topic (Coming soon!) and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.

Migrate your existing Windows C++ projects to MSBuild

$
0
0

If your project targets one of the Windows platforms only (Desktop or UWP), you should consider using MSBuild as your C++ build system. If you consider expanding beyond these platforms though, consider using CMake to specify your build. To learn more, read about the CMake support in Visual Studio.

Using MSBuild has the benefit that from a single codebase you can easily target all the Windows platforms that VS supports today, and you can leverage the C++ Project System that provides file and project management functionality. This makes it easy to manage your project as it grows (easily adding project references between projects, configuring PCHs, configuring compiler and linker switches across multiple projects, etc.).

This article covers the high-level steps needed to migrate your existing C++ code targeting Windows to use MSBuild. You can read about other C++ project types in the guide for Bringing your C++ code to Visual Studio.

Step 1. Run the Project from Existing Code wizard: Launch “File > New > Project from existing code…” and follow the wizard steps to create a new VS project for your sources. On the “Specify Project Settings” step, make sure you select “Use Visual Studio” before configuring any other option that might apply (e.g. using MFC, ATL or CLR).

bringcode-win-wizard

Step 2. Translate compile options to VS: For this step, it’s recommended to turn up the verbosity of MSBuild (from Tools > Options > Projects and Solutions > Build and Run, change “MSBuild project build output verbosity” to “Detailed”). This step will list the compiler command lines that MSBuild uses to run the build. You can compare this against a log of the previous build system you were using.

Differences can be reconciled in the Project Properties dialog (right-click on the project in Solution Explorer and select “Properties”) > Configuration Properties > C/C++ > All Options. In the search box, you can search for a specific switch to find the property that maps to that switch and operate changes to make sure that MSBuild ends up calling the compiler with the same command line that your previous build system was.

bringcode-win-proppages

Step 3. Use Shared code projects: If you want to expand your project to target more platforms in addition to Windows, follow the instructions in the “Cross-platform code sharing with Visual C++” article to move your C++ code into a shared code project and share it among C++ projects targeting Windows, UWP, Android or iOS.

bringcode-win-shared

bringcode-win-slnexplorer

Step 4. Consume 3rd party C++ libraries. If your project is depending on any open-source C++ libraries today, chances are that you will find them in vcpkg’s catalog. Vcpkg can easily integrate with MSBuild projects and can simplify both the build process for these 3rd party open-source libraries as well as the consumption in your own projects. To learn more about vcpkg, check out the Getting started with vcpkg introductory post.

What’s next

If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developer topic (Coming soon!) and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.

Bring your C++ code to Visual Studio

$
0
0

C++ has been around for a long time and throughout its history many tools have been built to make life easier for C++ developers. This has led to a diverse C++ ecosystem in terms of the editing tools, build systems, coding conventions, and C++ libraries that we use in our day-to-day work. As a C++ developer, you are probably accustomed to using a variety of tools from different vendors for different purposes. Rest assured that you will not trade-in your flexibility in how you develop your C++ projects once you start using Visual Studio. Visual Studio provides industry-leading development tools for C++ for any platform you’re targeting.

Depending on a few characteristics of your C++ project, this document will guide you through the recommended steps to get started with Visual Studio. Read on each chapter to see if it fits the description of your project. This post is part of a Getting Started series aimed at C++ users that are new to Visual Studio.

Cross-platform C++ applications and libraries

Building with CMake

If your project targets multiple platforms, you are likely to use CMake to specify your build. The steps needed to move to Visual Studio are very simple in this case – just open the folder containing your CMakeLists.txt files and let Visual Studio do the rest. To learn more about using CMake in Visual Studio, read the CMake support in Visual Studio page.

Targeting Qt Framework or building with QMake

Qt framework is a cross-platform C++ framework; it is ideal for building desktop, mobile and even embedded solutions. While you can use CMake to target Qt (in which case you should review the above topic), Qt also offers its own Qt-optimized build system called qmake that supports non-Qt C++ projects as well. If you are using qmake, learn how to import your .pro projects into Visual Studio.

Building with a cross-platform C++ build system (make, ninja, gyp, scons, gradle, etc.)

There are many build systems that support C++ today for cross-platform scenarios. It is outside the scope of this document to recommend one over another. But regardless of which build system your project uses today, you can open it inside Visual Studio and with minimal configuration you can become productive. With any of these build systems, you can enable all or any of the following Visual Studio capabilities:

  • C++ editing (e.g. IntelliSense, code navigation)
  • Building
  • C++ debugging (e.g. Windows process debugging, attaching, remote debug, etc.)

To learn how to move to Visual Studio, read more about Open Folder support in Visual Studio 2017.

Linux C++ applications (including targeting server, cloud, IoT)

Are you developing a server-side component or a containerized binary running on Linux or maybe a critical component for an IoT device? Visual Studio provides support for targeting Linux out-of-the-box. You can edit, build and debug your C++ projects either by using a remote Linux machine or using the built-in Windows 10 Linux subsystem support. For a step-by-step guide to porting your projects to Visual Studio read Bring your existing C++ Linux projects to Visual Studio.

Android C++/Java applications

Using Eclipse

You can use Visual Studio to develop both your C++-only projects as well as C++/Java JNI-based projects targeting Android. If you’re currently using Eclipse, you can move to Visual Studio via our Eclipse Android Project Import Wizard. Follow the link to learn more about migrating your Eclipse Android projects to Visual Studio.

Using Gradle

Whether you already have a gradle-based build for your Android project, or you are just getting started targeting Android, Visual C++ provides the support you need to build Gradle projects. Visual C++ also offers a great editing and debugging experience for both your C++ and Java source code. To learn more, read about building your Android applications in Visual Studio using Gradle.

iOS Objective-C/C++ applications

If you’re targeting iOS and writing a lot of C++ code, you should consider importing your XCode projects into Visual Studio. Visual Studio not only provides an easy way to import these projects, but also allows opening these projects back in XCode if you need to make non-C++ related edits (e.g. storyboarding, UI design). Follow this link to learn more about migrating your XCode iOS projects to Visual Studio.

Windows C++ application

If your project targets Windows, you should consider using MSBuild as your C++ build system. With MSBuild, you can target from a single codebase all the platforms that Visual Studio supports today. You also get access to the C++ Project System that provides file and project management functionality that makes it easy to manage your project as it grows. You can easily addi references between projects, configuring PCH file, and configur compiler and linker switches across multiple projects). Learn more about migrating your C++ project to MSBuild.

What’s next

If you’re new to Visual Studio, learn more by reading the Getting Started with Visual Studio for C and C++ Developer topic (Coming soon!) and the rest of the posts in this Getting Started series aimed at C++ users that are new to Visual Studio. Download Visual Studio 2017 today, try it out and share your feedback.

If your C++ development scenarios are not covered today by Visual Studio, don’t hesitate to reach out to us at visualcpp@microsoft.com. We would love to learn more about it

Moving or disabling the package cache for Visual Studio 2017

$
0
0

In the latest preview release of Visual Studio we are introducing the ability to disable (or re-enable) the package cache, or move it to another drive. This can be done using the command line or the registry, which can be deployed on a domain using group policy. This will be generally available in Visual Studio in a few weeks – scheduled for the 15.2 update – but we want to give you a preview and collect feedback on the feature.

Command line

If you pass --nocache to the installer – even if just starting the installer – the cache policy is set to disable caching of packages, and any modification or repair of an instance will remove packages that are already cached (except for extensions). You can also pass --cache to re-enable this policy, which might be handy if you expect to make any changes or repair offline.

"%ProgramFiles(x86)%Microsoft Visual StudioInstallervs_setup.exe --nocache

Any install, modify, or repair operation you perform in the Installer will set the policy for any subsequent operation. This means that you only need to pass --nocache (or --cache) once. The policy is stored in the Windows registry and will be used for subsequent operations.

Registry

The policies to disable or move the package cache for VS2017 are stored within the Windows registry in the following locations. When checking a particular policy, we will use the first policy value discovered and ignore the remaining keys in the order listed.

  1. HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftVisualStudioSetup
  2. HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudioSetup (we will write to this key if the command line operations are specified)
  3. HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftVisualStudioSetup (on 64-bit operating systems)

The first registry key above is treated as a read-only key in 15.2 and recommended for administrators deploying group policy objects.

Policies

The following registry values are supported.

CachePath
(REG_SZ or REG_EXPAND_SZ) The directory where package manifests and, optionally, payloads are stored. The default is “%ProgramData%MicrosoftVisualStudioPackages”
KeepDownloadedPayloads
(REG_DWORD) Keep package payloads even after they are installed. Set to 0 to disable caching packages. The default is 1.
SharedInstallationPath
(REG_SZ or REG_EXPAND_SZ) The directory where some packages shared across versions of instances of Visual Studio are installed. The default is “%ProgramFiles(x86)%Microsoft Visual StudioShared”

If you change the CachePath after it has already been created, you should move existing packages from the old location to the new location and secure it so that “SYSTEM” and “Administrators” have full permissions, and “Everyone” as read-only permissions.

If you disable the package cache by setting KeepDownloadedPayloads to 0, any modifications or repairs that require packages will require a connection to the internet or from wherever you installed VS and packages will be downloaded again. They will be removed after being installed or repaired.

Changing the SharedInstallationPath will only affect subsequent installs of shared packages. Any shared packages (like many third-party and some Microsoft packages) already installed will remain where they are.


Azure Analysis Services Backup and Restore

$
0
0

This post is authored by Bret Grinslade, Principal Program Manager and Josh Caplan, Senior Program Manager, Azure Analysis Services.

We have gotten good feedback from customers and partners starting to adopt Azure Analysis Services in production. Based on this feedback, this week we are releasing improvements around pricing options, support for backup and restore, and improved Azure Active Directory support. Please try them out and let us know how they work for you.

New Basic Tier

The new Basic Tier is designed to support smaller workloads with simpler refresh and processing needs. While you can put multiple models in one Standard instance, this new tier enables you to create models that are more targeted at less cost. The key differences between Standard and Basic is that the Basic tier does not support some specific enterprise features. Standard supports larger sizes and higher QPUs for concurrent queries and adds data partitioning for improved processing, translations, perspectives, and Direct Query. If your solution doesn’t need these capabilities, you can start with Basic. You can also scale up from Basic to Standard at any time. However, once you scale up to the higher tier you can’t scale back down to Basic. As an example, you can scale from B1 to S0 and then from S0 to S1 and back to S0, but you cannot scale from S0 to either the Basic or Develop tier.

Backup & Restore

We have added backup and restore. At a high level, you configure a backup storage location from your subscription for use with your Azure Analysis Services instance. If you do not have a storage account, you will need to create one. You can do this from the Azure Analysis Services blade for backup configuration or you can create it separately. Once you have associated a storage location, you can backup and restore from that location using TMSL commands or a tool like SQL Server Management Studio (SSMS) which will support this shortly. The documentation has more details on Backing Up and Restoring Azure Analysis Services models. One note, to restore a 1200 tabular model you have created with an on-premises version of SQL Server Analysis Services, you will need to copy it up to the storage account before it can be restored to Azure Analysis Services. The Microsoft Azure Storage Explorer or the AzCopy command-line utility are useful tools for moving large files in to Azure. In addition, if you restore a model from an on-premises server, the on-premises domain users will not have access to the model.  You will need to remove all of the on-premises users from the model roles and then you can add Azure Active Directory users to roles. The roles will be the same. Azure Analysis Services Server Admins will still have access as these are AAD based members. The setting on restore for “SkipMembership” will honored in a future service update to make managing cloud based role membership easier.

Improved Azure Active Directory integration

We have also done some work to improve the way Azure Analysis Services works with Azure Active Directory. Starting now, any newly created Azure AS server will be tied to the Azure AD tenant for which your Azure subscription is associated with and only users within that directory will be able to use your Azure AS server if granted access. This means that if a server is created in a subscription that is owned by Contoso.com than only users within the Contoso.com directory will be able to use those servers. In order to use that server, users must still be granted access to a role within the model. Azure AD supports a few options for allowing users outside of your organization to get access to resources within your tenant. One of these upcoming options will be Azure AD B2B. With B2B, you will be able to add guest access to users outside of your organization to your models through Azure Active Directory. We are hard at work enabling B2B for Azure Analysis Services end-to-end and will post an update when it is fully available in SSMS in SSDT as well as client tools.

Azure Search releases support for synonyms (public preview)

$
0
0

Today, we are happy to announce public preview support for synonyms in Azure Search, one of our most requested features on UserVoice. Synonyms functionality allows for Azure Search to not only return results which match the query terms that were typed into the search box, but also return results which match synonyms of the query terms. As a search-as-a-service solution, Azure Search is used in a wide variety of applications which span many languages, industries, and scenarios. Since terminology and definitions vary from case to case, Azure Search’s Synonyms API allows customers to define their own synonym mappings.

Synonyms aim to increase recall without sacrificing relevance

Synonyms functionality in Azure Search allows a user to get more results for a given query without sacrificing how relevant those results are to the query terms. In a real estate website, for example, a user may be searching for ‘jacuzzi.’ If some of the listings only have the term ‘hot tub’ or ‘whirlpool bath,’ then the user will not see those results. When ‘jacuzzi’ and ‘hot tub’ are mapped to one another in a synonym map, Azure Search does not have to do any guess-work in understanding that these terms are relevant even though the terms bear no resemblance in spelling.

Multi-word synonyms

In many full text search engines, support for synonyms is limited to single words. Our team has engineered a solution that allows Azure Search to support multi-word synonyms. This allows for phrase queries (“”) to function properly while using synonyms. If someone has mapped ‘hot tub’ to ‘whirlpool bath’ and they then search for “large hot tub,” Azure Search will return matches which contain both “large hot tub” and “large whirlpool bath.”

Support for Solr SynonymFilterFactory format

Azure Search’s synonyms feature supports the same format used by Apache Solr’s SynonymFilterFactory. As a widely-used open source standard, many existing synonym maps can be found for various languages and specific domains that can be used out-of-the box with Azure Search. 

Creating or updating a synonym map

Enabling synonyms functionality does not require any re-indexing of your content in Azure Search or any interruption of your service and you can add new synonyms at any time. Currently, the Synonyms API is in Public Preview and only available in the Service REST API (api-version=2016-09-01-Preview) and .NET SDK

When defining synonyms for Azure Search, you add a named resource to your search service called a synonymMap. You can enable synonyms for fields in your index by referring to the name of a synonymMap in the new synonymMaps property of the field definition.

Like an index definition, a synonym map is managed as an atomic resource that you read, update, or delete in a single operation. That means that if you want to make incremental changes to a synonym map, you will need to read, modify, and update the entire synonym map.

Below, there are some example operations using an example scenario of a real estate listings data set using the REST API. For examples using the .NET SDK, please visit the documentation

POST

You can create a new synonym map in the REST API using HTTP POST:


POST https://[servicename].search.windows.net/synonymmaps?api-version=2016-09-01-Preview
api-key: [admin key]
 
{ 
   "name":"addressmap",
   "format":"solr",
   "synonyms": "
      Washington, Wash., WA => WA
}

PUT

You can create a new synonym map or update an existing synonym map using HTTP PUT.

When using PUT, you must specify the synonym map name on the URI. If the synonym map does not exist, it will be created.


PUT https://[servicename].search.windows.net/synonymmaps/addressmap?api-version=2016-09-01-Preview
api-key: [admin key]
 
{ 
   "name":"addressmap",
   "format":"solr",
   "synonyms": "
      Washington, Wash., WA => WA
}

 

Types of synonym mappings

With the Synonyms API, it is possible to define synonyms in two ways: one-way mappings and equivalence-class mappings.

One-way mappings

With one-way mappings, Azure Search will treat multiple terms as if they all are a specific term. For example, the state where a property is located may only be stored as the two-letter abbreviation in the index for real estate listings. However, users may type in the full name of the state or other abbreviations.


{ 
   "name":"addressmap",
   "format":"solr",
   "synonyms": "
      Washington, Wash., WA => WA"
}

Equivalence-class mappings

In many domains, there are terms which all have the same or similar meaning. The Synonyms API makes it simple to map all like terms to one another so that the search term is expanded at query-time to include all synonyms. The above example of the multiple ways to describe ‘jacuzzi’ is demonstrated below.


{ 
   "name":"descriptionmap",
   "format":"solr",
   "synonyms": "hot tub, jacuzzi, whirlpool bath, sauna"
}

Setting the synonym map in the index definition

When defining a searchable field in your index, you can use the new property synonymMaps to specify a synonym map to use for the field. Multiple indexes in the same search service can refer to the same synonym map.

NOTE: Currently only one synonym map per field is supported.


POST https://[servicename].search.windows.net/indexes?api-version= 2016-09-01-Preview
api-key: [admin key]
 
{
   "name":"realestateindex",
   "fields":[
      {
         "name":"id",
         "type":"Edm.String",
         "key":true
      },
      {
         "name":"address",
         "type":"Edm.String",
         "searchable":true,
         "analyzer":"en.lucene",
         "synonymMaps":[
            "addressmap"
         ]
      },
      {
         "name":"description",
         "type":"Edm.String",
         "searchable":true,
         "analyzer":"en.lucene",
         "synonymMaps":[
            " descriptionmap "
         ]
      }
   ]
}

Synonyms + Search Traffic Analytics

Coupled with Search Traffic Analytics (STA), synonyms can be powerful in improving the quality of the search results that end users see. STA in Azure Search reveals the most common queries with zero results. By adding relevant synonyms to these terms, these zero-result queries can be mitigated. STA also shows the most common query terms for your Azure Search service, so you do not need to guess when determining proper terms for your synonym map.

Learn more

You follow these links for the detailed documentation around synonyms using the REST API and .NET SDK. Read more about Azure Search and its capabilities and visit our documentation. Please visit our pricing page to learn about the various tiers of service to fit your needs.

Visualize Azure Machine Learning Models with MicroStrategy Desktop™

$
0
0

   3 tools Working Seamlessly together

Have you ever wondered how you can use machine learning in your work?

It would be easy to assume that this type of advanced technology isn’t available to you because of simple logistics or complexities. The truth is, machine learning is more accessible than ever before – and even easy-to-use.

Together, Microsoft and MicroStrategy can help users create powerful, cloud-based machine learning applications through self-service analytics. MicroStrategy Desktop™, combined with Microsoft Azure ML, uses a drag-n-drop interface so users can efficiently plan, create and glean insights from a predictive dashboard.

April 18-20 at MicroStrategy World in Washington, DC, Microsoft will use a hands-on workshop to demonstrate how users can go from nothing to a fully-functional predictive data visualization built on machine learning within an hour. The three tools we’ll use are Microsoft R Open, Azure Machine Learning, and MicroStrategy 10 Desktop.

We invite you to attend the session and see it in action first-hand. If you can’t make the trip to MicroStrategy World, check out our step-by-step guide that we’ll review with the audience.

Sound like an easy way to begin using Machine Learning in your work? Here’s some more information on the three tools you need to get up and running in an hour.

Microsoft R Open

Microsoft R Open, formerly known as Revolution R Open (RRO), is the enhanced distribution of R from Microsoft Corporation. It is a complete open source platform for statistical analysis and data science. The current version, Microsoft R Open 3.3.2, is based on (and 100% compatible with) R-3.3.2, the most widely used statistics software in the world, and is therefore fully compatible with all packages, scripts, and applications that work with that version of R. It includes additional capabilities for improved performance, reproducibility, as well as support for Windows and Linux-based platforms.

Like R, Microsoft R Open is open source and free to download, use, and share. It is available from https://mran.microsoft.com/open/ .

Azure Machine Learning

Data can hold secrets, especially if you have lots of it. With lots of data about something, you can examine that data in intelligent ways to find patterns. And those patterns, which are typically too complex for you to detect yourself, can tell you how to solve a problem.

This is exactly what machine learning does: It examines large amounts of data looking for patterns, then generates code that lets you recognize those patterns in new data. Your applications can use this generated code to make better predictions. In other words, machine learning can help you create smarter applications. Azure Machine Learning enables you to build powerful, cloud-based machine learning applications.

MicroStrategy Desktop

Enterprise organizations use MicroStrategy Desktop to answer some of their most difficult business questions.

Available for Mac and PC, MicroStrategy Desktop is a powerful data discovery tool that allows users to access data on their own and build dashboards. With MicroStrategy Desktop, users can access over 70 data sources, from personal spreadsheets to relational databases and big data sources like Hadoop. With the ability to prepare, blend, and profile datasets with built-in data wrangling, users can go from data to dashboards in minutes on a single interface. MicroStrategy Desktop allows departmental users to visualize information with hundreds of chart and graph options, empowering them to make decisions on their own.

Come join us at MicroStrategy World or try the workshop out for yourself.

Welcome to Azure CLI Shell Preview

$
0
0

A few months ago, Azure CLI 2.0 was released. It provides a command line interface to manage/administer Azure resources. Azure CLI is optimized to run automation scripts composed of multiple commands, hence the commands and the overall user experience is not interactive. Azure CLI Shell (az-shell) provides an interactive environment to run Azure CLI 2.0 commands, which is ideal for new users learning the Azure CLI’s capabilities, command structures, and output formats. It provides autocomplete dropdowns, auto-cached suggestions combined with on the fly documentation, including examples of how each command is used. Azure CLI Shell provides an experience that makes it easier to learn and use Azure CLI commands.

Features

Gestures

The shell implements gestures that can be used by users to customize it. F3 function key in the toolbar can be used to look up all the available gestures at any time.

Scoping

The shell allows users to scope their commands to a specific group of commands. If you only want to work with ‘vm’ commands, you can use the following gesture to set the right scope so that you don’t have to type ‘vm’ with all subsequent commands:

  $ %%vm

Now, all the completions are ‘vm’ specific.

To remove a scope, the gesture is:

  $ ^^vm

Or, if I wish to remove all scoping:

   $ ^^

Scrolling through examples

The shell lists many examples for each command contextually, as you type your commands. However, some commands, like ‘vm create’ have too many examples to fit on the terminal screen. To look through all examples, you can scroll through the example pane with CTRLY and CTRLN for ‘up’ and ‘down’ , respectively.

Step-by-step examples

With all the examples, you can easily select a specific one to view in the example pane.

   $ [command] :: [example number]

The example number is indicated in the example pane. The shell takes the user through a step by step process to create the command and execute it.

Commands outside the shell

Azure CLI Shell allows a user to execute commands outside of Azure CLI from within the Shell itself. So you don’t need to exit out of the az-shell to add something to git, for example. Users can execute commands outside the shell with the gesture:

   $ #[command]

Query Previous Command

You can use a jmespath query on command outputs of type ‘json’ to quickly find properties/values that you want.

   $ ? [jmespath query]

Exit Code

There is a gesture that allows users to see the exit code of the last command they ran, to check if it executed properly.

   $ $

Installation

PyPI

   $ pip install --user azure-cli-shell

Docker

   $ docker run -it azuresdk/azure-cli-shell:0.2.0

To start the application

   $ az-shell

Welcome to Azure CLI Shell

Azure CLI Shell is open source and located on GitHub . If there are any issues, they can be filed on the Github repository or e-mailed to azfeedback. You can also use the “az feedback” command directly from within az-shell or az as well.

Monetizing your app: Use interstitial banner as fallback for interstitial video

$
0
0

Do you show ads while loading your app or between levels of your game (also known as interstitial ads)?

Microsoft Advertising now offers interstitial banners as an option for ads in your app. Interstitial ads have a higher monetization value, but have a lower fill rate in many markets. You can choose to use an interstitial banner when a video ad is not available.

Another option is to request both a video ad and an interstitial banner ad and show whichever ad is ready at the time of loading the app.

The code below is an example of how you can show either a video ad or a banner ad – whichever is ready first for you to load your app.

Add this to the cs file of the page that you want to load the interstitial ad:


//Add the Ads reference:
		using Microsoft.Advertising.WinRT.UI;
	//Initialize the ads:
		InterstitialAd MyVideoAd;
		InterstitialAd MyBannerAd;
	//Intiialize the Adunits:
		var MyAppID = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx";
             // video adunit
            var MyVideoAdUnitId = "xxxxxxxx";
            // Interstitial banner adunit
            var MyAdUnitId = "xxxxxxxxx";
            //Request the ads:
            // instantiate an InterstitialAd
            MyVideoAd = new InterstitialAd();
            MyBannerAd = new InterstitialAd();
           // wire up all 4 events, see below for function template
            MyVideoAd.AdReady += MyVideoAd_AdReady;
            MyVideoAd.ErrorOccurred += MyVideoAd_ErrorOccurred;
            MyVideoAd.Completed += MyVideoAd_Completed;
            MyVideoAd.Cancelled += MyVideoAd_Cancelled;
            MyBannerAd.AdReady += MyBannerAd_AdReady;
            // pre-fetch an ad 30-60 seconds before you need it
            MyVideoAd.RequestAd(AdType.Video, MyAppID, MyVideoAdUnitId);
            MyBannerAd.RequestAd(AdType.Display, MyAppID, MyAdUnitId);

	//write the code for the events
void MyVideoAd_AdReady(object sender, object e)
        {
            // code
            if (!bannerready)
            {
                MyVideoAd.Show();
                videoready = true;
            }
        }
        void MyBannerAd_AdReady(object sender, object e)
        {
            // code
            if (!videoready)
            {
                MyBannerAd.Show();
                bannerready = true;
            }
        }
        void MyVideoAd_ErrorOccurred(object sender, AdErrorEventArgs e)
        {
            var A = MyVideoAd.State;
        }



        void MyVideoAd_Completed(object sender, object e)
        {
            var A = MyVideoAd.State;
        }
        void MyVideoAd_Cancelled(object sender, object e)
        {
            var A = MyVideoAd.State;
        }

Stay tuned over the next few weeks for additional tips to increase ad monetization.

The post Monetizing your app: Use interstitial banner as fallback for interstitial video appeared first on Building Apps for Windows.

Python tools in your language

$
0
0

This week we’ve released a preview of the next update to Visual Studio. It has all of the improvements that were released recently in VS 2017 Update 1, and also the earliest previews of VS 2017 Update 2.

For Python support, probably our most significant update is that we are now available in all fourteen languages that Visual Studio ships with.

Visual Studio 2017 language packs

We’re really excited to be making our tooling available to more people all around the world.

Options window in Korean

While Python itself is predominantly English, many developers are able to get by without fluency. The same also applies for Visual Studio, but it is a much more pleasant experience to have a familiar interface.

New Projects in German

Since we often display information coming from Python itself or others who are not fully localized, you will still see English from time to time.

Interactive window in Russian

Our goal is to ensure that everything we can translate into your language will be translated, and that those translations are correct and helpful.

Python Menu in Spanish

Do you use or can you read any of Visual Studio’s languages? Here’s how you can help us out:

After installing the update, choose Modify, bring up the Language Packs tab, and select any languages you can read. Then, inside Visual Studio, you can use the International Settings options to switch to whichever language you would like. This will translate all of Visual Studio, even if you are not using that language for Windows.

Visual Studio Language selection screen

Then, as you use the product, please report any translation issues you spot at this github issue. The best reports will include:

  • a screenshot with the problem clearly marked
  • your own translation of the text into English
  • a suggested alternative translation

We will forward these reports to our localization team to assess and fix. Our plan is to be declared fully stable for this upcoming update, which means we need to find all the problems we can during this preview. Your help is really appreciated.

Visual Studio 2017 in Chinese

Thanks for using Visual Studio!

Free AI Workshop, May 9 in Seattle

$
0
0

There will be free AI workshop in Seattle on May 9, presented by members of the Microsoft Data Science team. The AI Immersion Workshop includes five specializations to choose from (in parallel tracks), all focused on an aspect of developing and deploying intelligent applications:

If you're heading to Build, this takes place just before the conference begins. The AI Immersion Workshop is almost fully-subscribed, but you can snag one of the remaining seats by applying at the link below. 

Microsoft: AI Immersion Workshop


Deploy Node.js applications to Azure App Service

$
0
0

This blog post shows how you can deploy a new Node.js application from Visual Studio Team Services or Microsoft Team Foundation Server to Azure App Service.

Code

Build

  1. Open your team project in your web browser (If you don’t see your team project listed on the home page, select Browse.)
  • On-premises TFS: http://{your_server}:8080/tfs/DefaultCollection/{your_team_project}
  • Visual Studio Team Services: https://{your_account}.visualstudio.com/DefaultCollection/{your_team_project}
  1. Create a build definition (Build & Release tab > Builds)

builddefinition

 

 

 

  • Click Empty to start with an empty definition.
  • In the repository tab of build definition make sure the repository selected is the one where you pushed (Git) or checked in (TFVC) your code

Add the build steps

On the Tasks or Build tab, add these steps.

npmPackage: npm install Install your npm package dependencies.
  • Command: install
  • Set the working folder to the folder where your application code is committed in the repository

For example, in case of sample app it will be nodejs-express-hello-world-app

gulpBuild: Gulp Pack your files into a .zip file.
  • Gulp File Path: gulpfile.js
  • Advanced, Arguments: –packageName=$(Build.BuildId).zip –packagePath=$(Build.ArtifactStagingDirectory)
  • Set the Gulp file path. For example, in case of sample app it will be nodejs-express-hello-world-app/gulpfile.js
publishbuildBuild: Publish Build Artifacts Publish the build outputs, such as the .zip file as we do in the example below.
  • Copy Root: $(Build.ArtifactStagingDirectory)
  • Contents: $(Build.BuildId).zip
  • Artifact name: drop
  • Artifact Type: Server

Enable continuous integration (CI)

On the Triggers tab, enable Continuous integration (CI). This tells the system to queue a build whenever someone on your team commits or checks in new code.

Save, queue, and test the build

Save and queue the build. Once the build is done, click the link to the completed build (for example, Build 1634), click Artifacts, and then click Explore to see the .zip file produced by the build. This is the web deploy package that your release definition will consume to deploy your app.

Release

  1. Open the Releases tab of the Build & Release hub, open the + drop-down in the list of release definitions, and choose Create release definition
  2. In the DEPLOYMENT TEMPLATES dialog, select the Azure App Service Deployment template and choose OK.

createrd

  1. Select the build definition you created earlier as the source of artifact to be deployed.

createrd2

  1. Configure the Azure App Service Deployment task:
    Deploy: Azure App Service Deploy
    • Azure Subscription: Select a connection from the list under Available Azure Service Connections. If no connections appear, choose Manage, select New Service Endpoint | Azure Resource Manager, and follow the prompts. Then return to your release definition, refresh the Azure Subscription list, and select the connection you just created.
      Note: If your Azure subscription is defined in an Azure Government Cloud, ensure your deployment process meets the relevant compliance requirements. For more details, see Azure Government Cloud deployments.
    • App Service Name: the name of the App Service (the part of the URL without .azurewebsites.net)
    • Deploy to Slot: make sure this is cleared (the default)
    • Virtual Application : leave blank
    • Package or Folder: $(System.DefaultWorkingDirectory)***.zip (the default)
    • Advanced:
      • Take App Offline: If you run into locked .DLL problems when you test the release, as explained below, try selecting this check box.
      • Deployment script: The task gives you additional flexibility to run deployment script on the Azure App Service. For example, you can run a script to update dependencies (node packages) on the Azure App Service instead of packaging the dependencies in the build step.
      • Generate web.config: In case you are deploying a Node.js application which was not created by using Node.js Tools for Visual Studio then the task will help you generate the web.config required to run the Node apps on Azure App Service.

    This is required because Windows Azure App Service uses iisnode to host Node.js applications in IIS on Windows

  2. Type a name for the new release definition and, optionally, change the name of the environment from Default Environment to Dev. Also, set the deployment condition on the environment to “Automatically start after release creation”.
  3. Save the new release definition. Create a new release and verify that the application has been deployed correctly.

 

Related Topics

  1. js Tools for Visual Studio helps you develop Node.js applications by providing Visual Studio project templates as well as intellisense, debugging and profiling support.
  2. Windows Azure App Service use iisnode to host Node.js applications in IIS on Windows.

Now available: Windows Developer training course on Desktop Bridge

$
0
0

We are happy to announce that the Microsoft Virtual Academy training course, Developer’s Guide to the Desktop Bridge, is now available on demand.

This video course, delivered by the Desktop Bridge Program Management team, aims to help developers understand the concepts and benefits of the Desktop Bridge tooling in the Windows 10 Universal Windows Platform. Watch the video and find the relevant sample code here to start bringing your desktop apps to the Windows Store and to take advantage of new Windows 10 features of the Universal Windows Platform in your WPF, WinForms, MFC or other type of Win32 apps.

Do you want to distribute your desktop application in the Windows Store? We cover that in the course. Do you want to take advantage of modern Windows 10 app-to-app features in your existing desktop application? We cover that in the course. Do you want to light-up Windows 10 features, and still distribute your app to Windows 7 users? We cover that, too. Modernizing your desktop app gradually with UWP components? We cover all of these and more in the course.

There are eight modules:

  1. Intro to the Desktop Bridge
  2. Desktop App Converter
  3. Debugging and Testing Your Converted Apps
  4. Distributing Your Converted Apps
  5. Enhancing Desktop Applications with UWP Features
  6. Extending and Modernizing with UWP components
  7. What’s Next for the Desktop Bridge
  8. Post-Course Survey

For more information on the Desktop Bridge, please visit the Windows Dev Center.

Ready to submit your app to the Windows Store? Let us know!

Feedback or feature suggestions? Submit them on User Voice.

The post Now available: Windows Developer training course on Desktop Bridge appeared first on Building Apps for Windows.

Windows desktop development with C++ in Visual Studio

$
0
0

The Windows desktop platform has long been the most popular platform among C++ application developers.  With C++ and Visual Studio, you use Windows SDKs to target many versions of Windows ranging from Windows XP to Windows 10, which is well over a billion devices.  Popular desktop applications like Microsoft Office, Adobe Creative Suite, and Google Chrome all are built using the same Win32 APIs that serve as the foundation for Windows desktop development.  Developing for Windows desktop allows you to reach the highest number of users on any non-mobile development platform.

In this post we will dive into the “Desktop development with C++” workload inside Visual Studio and go over the workflow used to develop a desktop app:

Acquiring the tools

After installing Visual Studio, open the Visual Studio Installer from the Start menu and navigate to the Workloads Page. We need to install the “Desktop development with C++” workload, which provides the tools needed for developing Windows desktop applications that can run on Windows.  The Win32 API model used in these types of applications is the development model used in Windows versions prior to the introduction of the modern Windows API that began with Windows 8.  This modern API later evolved into the UWP platform for Windows 10, but traditional desktop development using Windows APIs is still fully supported on all versions of Windows.

When you install the C++ Windows desktop workload, you have many options to customize the installation by selecting your desired tools, Windows SDKs, and other additional features like recent ISO C++ standards candidates such modules support for the STL.  The core C++ compiler and libraries for building desktop applications that target x86 and x64 systems are included in the VC++ 2017 v141 toolset (x86, x64).  Notable optional tools include support for MFC and C++/CLI development.  In the following examples, we will show how to create an MFC app, so this optional component was installed.

desktopwl

Opening code and building

After installing the C++ desktop workload, you can begin coding in existing projects or you can create new ones. Out of the box, Visual Studio can open any folder of code and be configured to build using CMake, a cross-platform build system. The Visual Studio CMake integration even allows you to use another compiler by opening the directory containing your CMakeLists.txt files and let VS do the rest.

Of course ,there is also full support for Microsoft’s own build system called MSBuild, which uses the .vcxproj file format.  MSBuild is a robust and fully featured build system that allows building projects in Visual Studio that target Windows. Building an MSBuild-based project just requires a .vcxproj file and can be built in the IDE or by using the command prompt.

In Visual Studio 2017, you can also simply open a folder of code files and immediately begin working in it. In the background, Visual Studio will index your files and providing Intellisense support along with refactoring and all the other navigation aids that you expect. You can create custom .json scripts to specify build configurations.

Creating new projects

If you are creating a new project from scratch, then you can start with one of a variety of project templates.: Each template provides customizable build configurations and boilerplate code that compiles and runs out of the box:

Project Type (folder) Description
Win32 The Win32 API (also known as the Windows API) is a C-based framework for creating GUI-based Windows desktop applications that have a message loop and react to Windows messages and commands. A Win32 console application has no GUI by default and runs in a console window from the command line.
ATL The Active Template Library is a set of template-based C++ classes that let you create small, fast Component Object Model (COM) objects. COM
MFC Microsoft Foundation Classes is an object oriented wrapper over the Win32 API andprovides designers and extensive code-generation support for creating a native UI.
CLR C++/CLI (Common Language Interface) enables  efficient communication between native C++ code and .NET code written in languages such as C# or Visual Basic.

Project templates are included for each of these types of desktop applications depending on the features you select for the workload.

templates

Project Wizard

Once you have selected a template, you have the option to customize the project you have selected to create.  Each of these project types has a wizard to help you create and customize your new project.  The illustrations below show the wizard for an MFC application.

wizard

The wizard creates and opens a new project for you and your project files will show up in Solution Explorer.

solnexp

At this point, even before you write a single line of code, you can build and run the application by pressing F5.

mfcapp

Editing code and navigating

Visual Studio provides many features that help you to code correctly and more efficiently. Whether it be the powerful predictive capabilities provided by IntelliSense or the fluid navigation found in Navigate To there is a feature to make almost any action faster inside Visual Studio.  Let Visual Studio do the work for you with autocompletion simply by pressing Tab on the item you want to add from the member list.

intellisense

You can also hover over any variable, function, or other code symbol and get information about that symbol using the quick info feature.

infotip

There are also many great code navigation features to make dealing with large code bases much more productive, including Go To Definition, Go To Line/Symbols/Members/Types, Find All References, View Call Hierarchy, Object Browser, and more.  Peek Definition allows you to view the code that defines the selected variable without even having to open another file which minimizes context switching.

codepeak

We also have support for some of the more common refactoring techniques like rename and extract function that allow you to keep your code looking nice and consistent.

Debugging and Diagnostics

Debugging applications is what Visual Studio is famous for!  With a world-class debugging experience that provides a plethora of tools for any type of app, no tool is better suited to debugging applications that target the Windows desktop platform.

datatip

Powerful features like advanced breakpoints, custom data visualization, and debug-time profiling enable you to have full control of your app’s execution and pinpoint even the hardest to find bugs.  View data values from your code with debugger data tips.  Take memory snapshots and diff them to reveal potential memory leaks, and even invoke PageHeap on your app from inside Visual Studio to help solve the notoriously hard problem of memory corruption.  Track live CPU and memory usage while your application runs and monitor performance in real-time.hub

Testing your code

Unit testing is a very popular way of improving code quality, and test-driven-development is fully supported inside Visual Studio.   Create new tests and manage them inside the Test Explorer for easy tracking and execution of tests.  Writing unit tests is easy and can help find problems as they arise instead of later on when things are harder to isolate.  Visual Studio allows both native and managed test project templates for testing native code which can be found in the Visual C++/Test section of the new project templates.  Note that the native test template comes with the C++ desktop workload and the managed test comes with the .NET desktop workload.

test

Working with others

Besides all of the individual developer activities that Visual Studio makes more productive, collaboration is also something that is directly integrated into the IDE.  Visual Studio Team Services is a suite of features that optimize the team collaboration process for software development organizations.  Create work items, track progress, and manage your bug and open issue database all from inside Visual Studio.  Git is fully supported and works seamlessly with the Team Explorer, allowing for easy management of branches, commits, and pull requests.

teamexp

Simply sign up for a Visual Studio Team Services account for free, then you can track the source code of your desktop applications into Visual Studio Team Services.  Visual Studio Team Services also simplifies continuous integrations for your desktop applications. Create and manage build processes that automatically compile and test your apps in the cloud.

Windows Store packaging for desktop apps

When you are ready to deploy your desktop application, you would typically build an executable (.exe) and possibly some libraries so that your application can run on a Windows device.  This allows you to easily distribute your application however you like, for example via a download from your website or even through a third-party sales platform such as Steam.

A new option for Windows desktop apps is to be available in the Windows Store with all the advantages that entails. The Desktop Bridge project allows you to package and distribute your Win32 application through the Windows Store alongside Universal Windows Platform apps. When targeting Windows 10, this can provide advantages including streamlined deployment, greater reach, simpler monetization, simplified setup authoring, and differential updates.

Try out Visual Studio 2017 for desktop development with C++!

Download Visual Studio 2017, try it out and share your feedback.  For problems, let us know via the Report a Problem option in the upper right corner of the VS title bar.  Track your feedback on the developer community portal. For suggestions, let us know through UserVoice.

Universal Windows Platform Development with C++

$
0
0

Universal Windows Platform (UWP) applications utilize a new Windows API and app model that creates a single output binary that can feasibly run on any Windows 10 device, ranging from desktops to HoloLens.  Because a app can run on a wide variety of devices with different form factors and types of input, you want it to be tailored to each device and be able to unlock the unique capabilities of each device.  In addition to the guaranteed core API layer, you can write code to access device specific APIs so that your app lights up features specific to one type of device while presenting a different experience on other devices.  Adaptive UI controls and new layout panels help you to tailor your UI across a broad range of device screen resolutions and sizes.

uwp

In this blog post we will dive into the specifics of how to create a C++ UWP application and how Visual Studio makes this a great experience:

C++ and the Universal Windows Platform

There are a few ways to write a C++ UWP app:

  • C++/CX is Microsoft’s language extension for C++ that allows it to target the Windows Runtime that was released with Windows 8 and continues to evolve with Windows 10.
  • The Windows Runtime Library is a template library that provides a low-level way to author and use Windows Runtime components.
  • C++/WinRT is a recently implemented standard C++ language projection for the Windows Runtime implemented solely in header files. It allows you to both author and consume Windows Runtime APIs using any standards-compliant C++ compiler. C++/WinRT is designed to provide C++ developers with first-class access to the modern Windows API.A recent alternative called CppWinRT is a language conformant wrapper for the WinRT APIs that allows you to use modern and compliant C++ code to targets Windows 10.

Acquiring the tools

uwpwl

The Visual Studio workload that provides the tools for creating UWP apps and has an optional installation component that is required for C++ UWP development called “C++ Universal Windows Platform tools”:

uwpwloptions

Opening code and building

Universal Windows Platform apps use Microsoft’s own build system called MSBuild, which uses the same .vcxproj file format that is used in the new project templates for desktop development.

MSBuild is a robust and fully featured build system that allows building projects in Visual Studio that target Windows. Building an MSBuild-based project just requires a .vcxproj file and can be built in the IDE or using the command prompt.

Creating new projects

The UWP development tools provide a number of different templates for you to choose from, including templates for DirectX 11 and Direct X12.  A Windows Runtime Component is very similar to a library, but only uses the WinRT APIs available to modern Windows applications.  These components can be shared across all supported Windows Runtime languages that support UWP development, which include C#, Visual Basic, JavaScript, and C++.

uwptemplate

In order to deploy local UWP applications in Windows 10, you must first enable “Developer mode” which can be done after creating a UWP project. This will find and install the latest packages for Store app deployment and allow you to deploy the UWP apps you develop in Visual Studio.

uwpmode

After activating developer mode in Windows 10, you can now build and deploy Universal Windows Platform applications, like this spinning cube that is provided in the DirectX templates.

uwpcube

Editing code and navigating

Visual Studio provides many features that help you to code correctly and more efficiently. Whether it be the powerful predictive capabilities provided by IntelliSense or the fluid navigation found in Navigate To.  Let Visual Studio do the work for you with autocompletion simply by pressing Tab on the item you want to add from the member list.

intellisense

You can hover also over any variable, function, or other code symbol and get information about that symbol using the quick info feature.

infotip

There are also many great code navigation features to make dealing with large code based much more productive, including Go To Definition, Go To Line/Symbols/Members/Types, Find All References, View Call Hierarchy, Object Browser, and more.  Peek Definition allows you to view the code that defines the selected variable without even having to open another file which minimizes context switching.

codepeak

We also have support for some of the more common refactoring techniques like rename and extract function that allow you to keep your code looking nice and consistent.

Debugging and diagnostics

Debugging applications is what Visual Studio is famous for!  With a world-class debugging experience that provides a plethora of tools for any type of app, no tool is better suiting to debugging applications that target the Windows desktop platform.

datatip

Powerful features like the advanced breakpoints, custom data visualization, and debug-time profiling enable you to have full control of your app’s execution and pinpoint even the hardest to find bugs.  View data values from your code with debugger data tips.  Take memory snapshots and diff them to reveal potential memory leaks, and even invoke PageHeap on your app from inside Visual Studio to help solve the notoriously hard problem of memory corruption.  Track live CPU and memory usage while your application runs and monitor performance in real-time.

hub

Testing your code

Unit testing is a very popular way of improving code quality, and test-driven-development is fully supported inside Visual Studio.  Create new tests and manage them inside the Test Explorer for easy management and execution of tests.  Writing unit tests is easy and can help find problems as they arise instead of later on when things are harder to isolate.  Visual Studio allows both native and managed test project templates for testing native code which can be found in the Visual C++àTest section of the new project templates.

test

Working with others

Besides all of the individual developer activities that Visual Studio makes more productive, collaboration is also something that is directly integrated into the IDE.  Visual Studio Team Services is a suite of features that optimize the team collaboration process for software development organizations.  Create work items, track progress, and manage your bug and open issue database all from inside Visual Studio.  Git is fully supported and works seamlessly with the Team Explorer, allowing for easy management of branches, commits, and pull requests.

teamexp

Packaging your app for the Windows Store

There are few steps required to package your app so that you can distribute it on the Windows Store.  First, make sure you are a registered Windows app developer.  Once you are registered and have a tested and optimized app you are interested in publishing, you can select your packaging options in the app manifest file (package.appxmanifest).  This detailed packaging guide will walk you through the rest of steps needed to get your app ready for distribution and submit it to the Windows Store.

packaging

Try out Visual Studio 2017 for UWP development with C++!

Download Visual Studio 2017, try it out and share your feedback.  For problems, let us know via the Report a Problem option in the upper right corner of the VS title bar.  Track your feedback on the developer community portal. For suggestions, let us know through UserVoice.

CMake support in Visual Studio – what’s new in 2017 15.2 update

$
0
0

Today’s preview release of Visual Studio 2017 15.2 update comes with several improvements and new features in CMake Tools for Visual Studiorecently updated to cover 15.2.  We have upgraded the included version of CMake to 3.7.2 and enhanced the discoverability of features in the CMake menu.  This update also includes bugfixes for community reported issues.

Please download the preview and try out the latest CMake features.  If you are just getting started with CMake, follow the link to learn more about CMake support in Visual Studio.  We are looking forward to your feedback.

CMake Tools Upgraded to CMake 3.7.2

We want to make Visual Studio the best way to work with CMake projects on Windows.  To enhance compatibility with your projects, we have updated the internal version of CMake that the Visual Studio CMake tools use from version 3.6 to version 3.7.2.

CMake 3.7.2 brings many new features and improvements, which you can read about in CMake’s 3.7 release notes.  On the IDE side, the update to CMake 3.7.2 gives Visual Studio more insight into your projects’ structure and allows Visual Studio to provide more accurate IntelliSense and builds.

A More Intuitive CMake Menu

The most visible change that many of you will notice in the update is the revamped CMake menu:

Visual Studio 2017 15.2 Update CMake Menu

The revamped menu brings all the common operations to the forefront.  At the top of the menu Build, Rebuild, Clean, and (if applicable) Test All apply globally to every CMake project detected in an open folder.  The menu items below those allow finer control, such as building individual targets and managing the CMake cache.  This menu should now be a one stop shop for all things CMake instead of having operations and entry points scattered around the IDE.

Bugfixes and Improvements

The 15.2 update includes many improvements and addresses several bugs, most of which were reported by the community.  The following issues have been fixed in the latest release:

  • Visual Studio fails to launch CMake targets because the output location cannot be found for some CMakeLists.
    Developer Community: 24375 24359
  • CMake tools freeze or malfunction when the build output is a child of the opened folder.
    Developer Community: 12830 25412
  • Running tests triggers installation stage.
    Developer Community: 19007
  • Tests attempt to run even when build fails.
    Developer Community: 17949
  • No way to pass arguments to tests via CMakeSettings.json.
    Developer Community: 17968
  • CMake processing appears to be stalled and cannot be canceled for large or unsupported CMakeLists.
    Developer Community: 9879 13799 15384 24404 31401
  • Visual Studio does not automatically restart cache generation after a failure upon re-opening a folder.
    Developer Community: 13185
  • Visual Studio does not support CMake workspaces with long paths.
    Developer Community: 9222
  • CMake cache generation fails if standard tools are not in toolbar.
    Developer Community: 37195
  • CMake Tools for Visual Studio do not support “Rebuild All”
    Developer Community: 22318
  • CMake output pane shows incomplete status during cache generation and IntelliSense configuration.

Send Us Feedback

To try out the latest and greatest CMake features and give us some early feedback, please download and install the latest Visual Studio 2017 Preview.  As always, we welcome your feedback.  Feel free to send any comments through e-mail at visualcpp@microsoft.com, through Twitter @visualc, or Facebook at Microsoft Visual Cpp.

If you encounter other problems with Visual Studio 2017 please let us know via Report a Problem, which is available in both the installer and the IDE itself.  For suggestions, let us know through UserVoice. We look forward to your feedback!

Viewing all 10804 articles
Browse latest View live


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