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

Announcing F# 4.5

$
0
0

Today, we’re incredibly pleased to announce general availability of F# 4.5.

This post will walk through the changes in F# 4.5 (just like the preview post), then show some updates to F# tooling, and finally talk a bit about where what we’re focusing on for future F# versions.

Get started

F# 4.5 can be acquired in two ways:

If you are not using Windows, never fear! Visual Studio for Mac and Visual Studio Code with Ionide support F# 4.5 if you have the .NET Core SDK installed.

Versioning Alignment

The first thing you may notice about F# 4.5 is that it’s higher than F# 4.1. But you may not have expected it to be four decimal places higher! The following table details this change for F# 4.5:

F# language version FSharp.Core binary version FSharp.Core NuGet package
Old world F# 4.1 4.4.1.0 4.x.y, where x >= 2 for .NET Standard support
New world F# 4.5 4.5.x.0 4.5.x

There is a good reason for this change. As you can see, prior to F# 4.5, each item had a different version! The reasons for this are historical, but the end result is that it has been horribly confusing for F# users for a long time. So, we decided to clear it up.

From here on out, the major and minor versions will be synced, as per the RFC we wrote detailing this change.

Side-by-side F# compilers deployed by Visual Studio

In previous versions of Visual Studio, you may have noticed that the F# Compiler SDK was bumped from 4.1 to 10.1. This is because the F# compiler evolves more rapidly than the language, often to fix bugs or improve performance. In the past, this was effectively ignored, with the compiler SDK still containing the same version number as the language version. This inaccurate representation of artifacts on your machine drove an effort to separate the versioning of the compiler and tools separately from the language they implement. As per the RFC detailing this change, the F# compiler and tools will use semantic versioning.

Additionally, the F# compiler SDK used to install as a singleton on your machine. If you had multiple side-by-side Visual Studio 2017 versions installed on your machine, the tools for all installations would pick up the same F# compiler, regardless of if they were ever intended to use that compiler. This means that something like using both release and preview version of Visual Studio could silently opt-in your release build of Visual Studio to use preview bits of F#! This resulted in multiple issues where users were confused about the behavior on their machine.

For F# 4.5, the compiler SDK version will be 10.2. When installed with Visual Studio, this will be fully side-by-side with that version of Visual Studio. Additional Visual Studio installations will not pick this higher compiler SDK version.

Accounting for this change on Windows build servers:

What this means for Windows build servers is that the F# Compiler SDK MSI singleton is no longer supported. If you are using it, we recommend the following choices:

  • The Visual Studio Build Tools SKU (look under Tools for Visual Studio).
  • The .NET Core SDK if you are using .NET SDK-based projects.

We also do not recommend installing the full Visual Studio IDE on a build server if you can avoid it, but if it is needed for your environment, it will install everything you need for F# 4.5 builds.

Span support

The largest piece of F# 4.5 is a feature set aligned with the new Span feature in .NET Core 2.1. The F# feature set is comprised of:

  • The voidptr type.
  • The NativePtr.ofVoidPtr and NativePtr.toVoidPtr functions in FSharp.Core.
  • The inref<'T> and outref<'T>types, which are readonly and write-only versions of byref<'T>, respectively.
  • The ability to produce IsByRefLike structs (examples of such structs: Span<'T>and ReadOnlySpan<'T>).
  • The ability to produce IsReadOnly structs.
  • Implicit de-reference of byref<'T> and inref<'T> returns from functions and methods.
  • The ability to write extension methods on byref<'T>, inref<'T>, and outref<'T>(note: not optional type extensions).
  • Comprehensive safety checks to prevent unsoundness in your code.

The main goals for this feature set are:

  • Offer ways to interoperate with and product high-performance code in F#.
  • Full parity with .NET Core performance innovations.
  • Better code generation, especially for byref-like constructs.

What this boils down into is a feature set that allows for safe use of performance-oriented constructs in a very restrictive manner. When programming with these features, you will find that they are far more restrictive than you might initially anticipate. For example, you cannot define an F# record type that has a Span inside of it. This is because a Span is a “byref-like” type, and byref-like types can only contained in other byref-like types. Allowing such a thing would result in unsound F# code that would fail at runtime! Because of this, we implement strict safety checks in the F# compiler to prevent you from writing code that is unsound.

If you’ve been following along with the Span<'T> and ref work in C# 7.3, a rough syntax guide is as follows:

C# F#
out int arg arg: byref<int>
out int arg arg: outref<int>
in int arg arg: inref<int>
ref readonly int Inferred or arg: inref<int>
ref expr &expr

The following sample shows a few ways you can use Span<'T> with F#:

Safety rules for byrefs

As previously mentioned, byrefs and byref-like structs are quite restrictive in how they can be used. This is because the goal of this feature set is to make low-level code in the style of pointer manipulation safe and predictable. Doing so is only possible by restricting usage of certain types to appropriate contexts and performing scope analysis on your code to ensure soundness.

A quick summary of some of the safety rules:

  • A let-bound value cannot have its reference escape the scope it was defined in.
  • byref-like structs cannot be instance or static members of a class or normal struct.
  • byref-like structs cannot by captured by any closure construct.
  • byref-like structs cannot be used as a generic type parameter.

As a reminder, Span<'T> and ReadOnlySpan<'T> are byref-like structs and are subject to these rules.

Bug fixes that are not backwards compatible

There are two bugs fixes as a part of this feature set that are not backwards compatible with F# 4.1 code that deals with consuming C# 7.x ref returns and performs “evil struct replacement”.

Implicit dereference of byref-like return values

F# 4.1 introduced the ability for F# to consume byref returns. This was done strictly for interoperation with C# ref returns, and F# could not produce such a return from F# constructs.

However, in F# 4.1, these values were not implicitly dereferenced in F# code, unlike how they were in equivalent C#. This meant that if you attempted to translate C# code that consumed a ref return into equivalent F#, you’d find that the type you got back from the call was a pointer rather than a value.

Starting with F# 4.5, this value is now implicitly dereferenced in F# code. In addition to bringing this feature set in line with C# behavior, this allows for assignment to byref returns from F# functions, methods, and properties as one would expect if they had learned about this feature with C# 7 and higher.

To avoid the implicit dereference, simply apply the & operator to the value to make it a byref.

Disabling evil struct replacement on immutable structs

F# 4.1 (and lower) had a bug in the language where an immutable struct could define a method that completely replaced itself when called. This so-called “evil struct replacement” behavior is considered a bug now that F# has a way to represent ReadOnly structs. The this pointer on a struct will now be an inref<MyStruct>, and an attempt to modify the this pointer will now emit an error.

You can learn more about the full design and behavior of this feature set in the RFC.

New keyword: match!

Computation Expressions now support the `match!` keyword, shortening somewhat common boilerplate existing in lots of code today.

This F# 4.1 code:

Can now be written with match! in F# 4.5:

This feature was contributed entirely by John Wostenberg in the F# OSS community. Thanks, John!

Relaxed upcast requirements with yield in F# sequence, list and array expressions

A previous requirement to upcast to a supertype when using yield used to be required in F# sequence, list, and array expressions. This restriction was already unnecessary for these expressions since F# 3.1 when not using yield, so this makes things more consistent with existing behavior.

Relaxed indentation rules for list and array expressions

Since F# 2.0, expressions delimited by ‘}’ as an ending token would allow “undentation”. However, this was not extended to array and list expressions, thus resulting in confusing warnings for code like this:

The solution would be to insert a new line for the named argument and indent it one scope, which is unintuitive. This has now been relaxed, and the confusing warning is no more. This is especially helpful when doing reactive UI programming with a library such as Elmish.

F# enumeration cases emitted as public

To help with profiling tools, we now emit F# enumeration cases as public under all circumstances. This makes it easier to analyze the results of running performance tools on F# code, where the label name holds more semantic information than the backing integer value. This is also aligned with how C# emits enumerations.

Better async stack traces

Starting with F# 4.5 and FSharp.Core 4.5.0, stack traces for async computation expressions:

  • Reported line numbers now correspond to the failing user code
  • Non-user code is no longer emitted

For example, consider the following DSL and its usage with an FSharp.Core version prior to 4.5.0:

Note that both the f1 and f2 functions are called twice. When you look at the result of this in F# Interactive, you’ll notice that stack traces will never list names or line numbers that refer to the actual invocation of these functions! Instead, they will refer to the closures that perform the call:

This was confusing in F# async code prior to F# 4.5, which made diagnosing problems with async code difficult in large codebases.

With FSharp.Core 4.5.0, we selectively inline certain members so that the closures become part of user code, while also selectively hiding certain implementation details in relevant parts of FSharp.Core from the debugger so that they don’t accidentally muddy up stack traces.

The result is that names and line numbers that correspond to actual user code will now be present in stack traces.

To demonstrate this, we can apply this technique (with some additional modifications) to the previously-mentioned DSL:

When ran again in F# Interactive, the printed stack trace now shows names and line numbers that correspond to user calls to functions, not the underlying closures:

As mentioned in the RFC for this feature, there are other problems inherent to the space, and other solutions that may be pursued in a future F# version.

Additional FSharp.Core improvements

In addition to the improved Async stack traces, there were a small number of improvements to FSharp.Core.

  • Map.TryGetValue (RFC)
  • ValueOption<'T> (RFC)
  • FuncConvert.FromFunc and FuncConvert.FromAction APIs to enable accepting Func<’A, ‘B> and Action<’A, ‘B> instances from C# code. (RFC)

The following F# code demonstrates the usage of the first two:

The FuncConvert API additions aren’t that useful for F#-only code, but they do help with C# to F# interoperability, allowing the use of “modern” C# constructs like Action and Func to convert into F# functions.

Development process

F# 4.5 has been developed entirely via an open RFC (requests for comments) process, with significant contributions from the community, especially in feature discussions and demonstrating use cases. You can view all RFCs that correspond with this release in the following places:

We are incredibly grateful to the F# community and look forward to their involvement as F# continues to evolve.

F# tooling updates

F# 4.5 also released alongside Visual Studio 2017 version 15.8, and with it came significant improvements to F# language tooling. Because F# is cross-platform, many of the changes made are available in all F# tooling, not just that in Visual Studio.

Performance improvements

Performance improvements to F# and F# tools were done in this release, some of which had very strong community involvement. Some of these improvements include:

  • Removing ~2.2% of allocations in the F# compiler when used in tooling scenarios.
  • Comparison for bools (used throughout tooling) now uses fast generic comparison, contributed by Vasily Kirichenko.
  • Significant IntelliSense performance improvements for .NET SDK projects in Visual Studio, including when multitargeting, by eliminating places where redundant work was performed in the editor.
  • IntelliSense for very large F# files (10k+ lines of code) has been significantly improved to be roughly twice as fast, thanks to a community effort led by Vasily Kirichenko, Steffen Forkmann, and Gauthier Segay.

Although the performance improvements are not quite as dramatic as they were with the VS 15.7 update, you should notice snappier language features for .NET SDK projects and very large files.

New Visual Studio features

In addition to tooling-agnostic changes, Visual Studio 2017 version 15.8 also has some great new features.

Automatic brace completion

There is now automatic brace completion for "", (**), (), [], [||], {}, and [<>] pairs. They are “smart” in that typing the completed character (e.g., ]) will not produce a redundant, unmatched character.

ctrl+Click to Go to Definition

This one is pretty straightforward. Hold the ctrl key to hover over an F# symbol to click on it as if it were a link.

This can be configured to be a different key or use the Peek at Definition window in Tools > Options > Text Editor

F# type signatures in CodeLens adornments (experimental)

Inspired by Ionide, F# Code Lens is a feature implemented by Victor Peter Rouven Müller to show F# type signatures as CodeLens that you can click to go to definition. It is available under Tools > Options > Text Editor > F# > CodeLens (Experimental).

We’re quite excited about how this feature will evolve in the future, as it is a wonderful tool for those who are learning F#. We encourage enthusiastic individuals to help contributing to this feature in our repository.

F# evolution

Although our primary focus has been on F# 4.5 and releasing tooling for Visual Studio 2017 version 15.8, we’ve been doing some thinking about what comes in future F# releases.

Our stance on F# evolution is that it should be fairly predictable and steady moving forward, with a release every year or half-year. What constitutes a release is difficult to plan, especially because some features that seem easy can prove incredibly hard, while some features that seem hard can prove much easier than expected. Additionally, the F# community always has great contributions that we want to ship to the rest of the world, such as the match! feature in F# 4.5, which affects how we think about a bundle of improvements.

You can see which language suggestions we view as a priority to implement in the F# language suggestions repo. Of these, we are currently focused on the following bigger items:

  • Distinguishing nullable and non-nullable reference types, with backwards-compatible compile-time enforced null-safety.
  • Anonymous Record types.
  • A task { } computation expression.

Many things in the proposed priority list are smaller in scope, but the previously-mentioned items will take significant time to implement correctly. We look forward to deep community engagements, and welcome motivated compiler hackers to try their hand at writing an RFC for a feature and proposing an implementation.

Lastly, one of the big efforts happening for .NET is ML.NET. F# is used for data science and analytical workloads by many people, where they do things such as use F# types and combinators to manipulate data before it is input to an algorithm, or use Units of Measure to enforce correctness for numerical values. We feel that this aspect of F# usage should be amplified a bit, especially given the rising importance (and perhaps eventual ubiquity) of machine learning in software systems.

We have spent some time working out how F# can better position itself in the machine learning space without sacrificing the sense of simplicity and elegance it can bring to other domains such as web and cloud development. One manifestation of this is adding support for F# records (with the CLIMutable attribute) to ML.NET 0.4. Although this isn’t a change to F# itself, it does help people using this library use it in a more idiomatic way. We have also treated existing projects, such as DiffSharp, Deedle, and FsLab as the starting point for this work. The initial goal is to help the F# community to have a coherent way to use F# for machine learning with various libraries and tools. Community and open source is essential to success with data science and machine learning, regardless of language or platform, so we’ve consciously started there.

Although our primary focus for F# and ML has been more foundational and broad in scope, as use cases emerge they may justify language changes that are generally applicable to F# but really shine when used for ML and analytical workloads. These will be considered carefully and evaluated based on how useful they can be generally – shoehorning of “machine learning features” is not a goal. As always, we welcome suggestions and feedback in the F# language suggestions repository if you are interested in helping F# evolve with this as inspiration.

Cheers, and happy F# coding!


Azure Application Insights warned me of failed dependent requests on my site

$
0
0

I've been loving Application Insights ever since I hooked it up to my Podcast Site. Application Insights is stupid cheap and provides an unreal number of insights into what's going on in your site. I hooked it up and now I have a nice dashboard showing what's up. It's pretty healthy.

Lovely graphics showing HEALTHY websites

Here's an interesting view that shows the Availability Test that's checking my site as well as outbound calls (there isn't a lot as I cache aggressively) to SimpleCast where I host my shows.

A chart showing 100% availability

Availability is important, of course, so I set up some tests from a number of locations. I don't want the site to be down in Brazil but up in France, for example.

However, I got an email a week ago that said my site had a sudden rise in failures. Here's the thing, though. When I set up a web test I naively thought I was setting up a "ping." You know, a knock on the door. I figured if the WHOLE SITE was down, they'd tell me.

Here's my availability for today, along with timing from a bunch of locations world wide.

A nice green availability chart

Check out this email. The site is fine; that is, the primary requests didn't fail. But dependent request did fail! Application Insights noticed that an image referenced on the home page was suddenly a 404! Why suddenly? Because I put the wrong date and time for an episode and it auto-published before I had the guest's headshot!

I wouldn't have noticed this missing image until a user emailed me, so I was impressed that Application Insights gave me the heads up.

1 dependant request failed

Here is the chart for that afternoon when I published a bad show. Note that the site is technically up (it was) but a dependent request (a request after the main GET) failed.

Some red shows my site isn't very available

This is a client side failure, right? An image didn't load and it notified me. Cool. I can (and do) also instrument the back end code. Here you can see someone keeps sending me a PUT request, perhaps trying to poke at my site. By the way, random PUT person has been doing this for months.

I can also see slowest requests and dig as deep as I want. In fact I did a whole video on digging into Azure Application Insights that's up on YouTube.

A rogue PUT request

I've been using Application Insights for maybe a year or two now. Its depth continues to astound me. I KNOW I'm not using it to its fullest and I love that I'm still surprised by it.


Sponsor: Preview the latest JetBrains Rider with its built-in spell checking, initial Blazor support, partial C# 7.3 support, enhanced debugger, C# Interactive, and a redesigned Solution Explorer.



© 2018 Scott Hanselman. All rights reserved.
     

Schlumberger refines global teamwork with Microsoft 365

$
0
0

The Schlumberger logo.


Profile picture of Ron Markezich.With more than 80 years of pioneering innovation in reservoir characterization, drilling, production, and exploration, Schlumberger is the leading provider of upstream products and services in the oil and gas industry. It’s a highly collaborative business, both internally, with more than 100,000 employees working in 85 countries, and externally, with the world’s leading global oil and gas customers depending on Schlumberger products and services. Moving data and expensive resources through a complex network of delivery systems calls for reliable, real-time collaboration and communication for all stakeholders. That’s one reason why standardizing on Microsoft 365 is a major step forward in the company’s strategy to harness the cloud and drive efficient customer service.

Recently, Schlumberger’s VP of Information Technology Sebastien Lehnherr had this to say about driving teamwork and productivity on a global scale:

“Operational efficiency and agility are requirements in a highly regulated service industry striving for performance and service quality. We use Microsoft 365 as a core element of our digital strategy—Microsoft Teams, Enterprise Mobility + Security, Power BI, and Windows 10 empower our employees globally with the intuitive, feature-rich tools that help them collaborate more efficiently and be more productive working in the office or while on the road.”

With highly secure, collaborative cloud apps at their fingertips, Schlumberger employees working in the field and at head offices in Paris, Houston, London, and The Hague are empowered by agile digital connections that accelerate service delivery and keep customers’ products moving to market. Unimpeded communication helps connect the big-picture expertise from Schlumberger’s leadership centers with local experience at production sites, adding value to customer relationships. We’re also excited to see how Schlumberger’s global Windows 10 deployment will add value to its Microsoft cloud business productivity platform.

The post Schlumberger refines global teamwork with Microsoft 365 appeared first on Microsoft 365 Blog.

Bing Maps Time Zone API: An easier way to work with time zones

$
0
0

The Microsoft Windows Time Zone standard and the IANA time zone standard provide a well-defined structure for representing time zones used across the world. However, time zones change more frequently than expected. A country or administrative region may change the time zone they are using. Other regions change the way they apply daylight saving time. Not surprisingly, working with time zones can easily get complicated for developers.

Bing Maps is pleased to announce the general availability of our new Time Zone API. The Bing Maps Time Zone API is a collection of five easy-to-use REST APIs that are designed to make it easy for developers to work with time zones. Both Windows and IANA standards are supported. The API will cover most of the scenarios that developers must deal with when working with time zones.

Given a place name, find the time zone of the place

Most time zone APIs available today require latitude, longitude as input. This typically requires an additional step for developers to obtain the geographical coordinates of a place before being able to obtain the time zone information. Instead, the Bing Maps Time Zone API provides a one-stop solution enabling developers to work directly with their locations. Given a place name e.g. “Seattle, WA” or “Taipei” the Bing Maps Time Zone API will return time zone information of that location. If the given location has multiple time zones all of them are returned as a list.

https://dev.virtualearth.net/REST/v1/TimeZone/query=taipei?key=<bingmaps-key>

Output

"timeZone": {

            "genericName": "Taipei Standard Time",

            "abbreviation": "CST",

            "ianaTimeZoneId": "Asia/Taipei",

            "windowsTimeZoneId": "Taipei Standard Time",

            "utcOffset": "8:00",

            "convertedTime": {

              "LocalTime": "2018-07-29T11:26:26",

              "UtcOffsetWithDst": "8:00",

              "TimeZoneDisplayName": "Taipei Standard Time",

              "timeZoneDisplayAbbr": "CST"

            }

          }

Given location coordinates, find the time zone of the place

For the cases where latitude, longitude information is already available, the Bing Maps Time Zone API will return the time zone information for the corresponding location.

https://dev.virtualearth.net/REST/v1/TimeZone/17.430350, 78.342099?key=<bingmaps-key>

Output

"timeZone": {

            "genericName": "India Standard Time",

            "abbreviation": "IST",

            "ianaTimeZoneId": "Asia/Kolkata",

            "windowsTimeZoneId": "India Standard Time",

            "utcOffset": "5:30",

            "convertedTime": {

              "LocalTime": "2018-07-29T08:54:13",

              "UtcOffsetWithDst": "5:30",

              "TimeZoneDisplayName": "India Standard Time",

              "timeZoneDisplayAbbr": "IST"

            }

          }

Find local time at a given location

Given a time value in UTC format and a target time zone, the Bing Maps Time Zone API will return the local time in the target time zone. DST setting is automatically applied based on time of the year.

http://dev.virtualearth.net//REST/v1/TimeZone/Convert/?datetime=10:14:15Z&targettimezoneid=Pacific Standard Time&o=xml&key=<bingmaps-key>

Output

<TimeZone>

      <GenericName>China Standard Time</GenericName>

      <Abbreviation>CST</Abbreviation>

      <WindowsTimeZoneId>China Standard Time</WindowsTimeZoneId>

      <UTCOffset>8:00</UTCOffset>

      <ConvertedTime>

            <LocalTime>2018-08-08T18:14:15</LocalTime>

            <UtcOffsetWithDst>8:00</UtcOffsetWithDst>

            <TimeZoneDisplayName>China Standard Time</TimeZoneDisplayName>

            <TimeZoneDisplayAbbr>CST</TimeZoneDisplayAbbr>

      </ConvertedTime>

</TimeZone>

Obtain list of time zones in Windows and IANA standard

The Bing Maps Time Zone API can return a list of time zones per Windows and IANA standards. This list can be used as a data source for time zone selection UX elements in web applications.

http://dev.virtualearth.net/REST/V1/TimeZone/List/?timezonestandard=Windows&key=<bingmaps-key>

Output

List of 128 Windows time zones (not listed here for brevity)

Obtain complete information about a time zone

Given a time zone id per Windows or IANA standards, the Bing Maps Time Zone API will return complete information about the time zone including time zone names, UTC offsets, abbreviation and DST offset with start and end dates.

https://dev.virtualearth.net/REST/V1/TimeZone/?targettimezoneid=America/los_angeles&key=<bingmaps-key>

Output

"timeZone": {

            "genericName": "Pacific Standard Time",

            "abbreviation": "PST",

            "ianaTimeZoneId": "America/Los_Angeles",

            "windowsTimeZoneId": "Pacific Standard Time",

            "utcOffset": "-8:00",

            "convertedTime": {

              "LocalTime": "2018-08-08T10:53:59",

              "UtcOffsetWithDst": "-7:00",

              "TimeZoneDisplayName": "Pacific Daylight Time",

              "timeZoneDisplayAbbr": "PDT"

            },

            "dstRule": {

              "dstStartMonth": "Mar",

              "dstStartDateRule": "Sun>=8",

              "dstStartTime": "2:00",

              "dstAdjust1": "1:00",

              "dstEndMonth": "Nov",

              "dstEndDateRule": "Sun>=1",

              "dstEndTime ": "2:00"

            }

          }

The Bing Maps Time Zone API is available for use with your existing Bing Maps key. It supports JSON and XML formats for return values. To learn more, refer to the complete documentation on MSDN.


- Bing Maps Team

Introducing Driver Module Framework

$
0
0

The Microsoft Devices team is excited to announce the release of an open source framework for Windows driver developers — Driver Module Framework (DMF). With DMF, not only can you easily develop simple and structured Windows Driver Framework (WDF) drivers but also share code amongst your drivers.

Background

Over the years Surface organization developed many products such as Pro, Studio, Laptop, Book with unique, innovative hardware capabilities. To light up these capabilities, we often needed to write drivers and firmware. Even though these products had commonalities in terms of how they interfaced with the hardware, individual product teams worked in isolation and built either their own drivers from scratch or copied based on their awareness of existing code and modified to suit their needs. This did help in meeting their immediate business priorities, but led to tremendous duplication of code and maintenance overhead. Developers with varied level of experience often created many divergent solutions to solve the same problem and the code lacked structure and quality.

About three years ago, the team decided to take a holistic look at drivers written for various Surface products and started an effort to structure code in a way that allows for maximum reuse of code with goals to improve the efficiency, serviceability, and scalability of teams to build new products.

We started by breaking down individual functionalities in drivers into a shareable code base. This iterative effort led to the creation of DMF: an extension to WDF that provides you with a library of new WDF Objects called DMF Modules. Modules allow interaction with one another, WDF, and hardware in a structured manner.

Today, all WDF drivers on the team are written by using DMF. Modules are well tested and can be reused or extended later to meet new requirements. Besides having the benefit of well-architected drivers, bug fixes are now efficient. A bug fix in a Module is automatically applied to all the drivers that were built using the Module.

As part of the open source effort, we have shared many Modules that provide solutions for commonly faced problems.

Architecture of DMF

Let’s start by looking at a typical design of WDF driver.

A typical design of a WDF driver.

In this design, the driver maintains state in a device context and the code is divided into units that access the device context and communicate among themselves. You, as the driver developer, are responsible for making sure that accesses to the device context are synchronized and strict locking hierarchy is adhered to when units communicate with each other to avoid corruption and deadlock. As WDF calls into the driver, you are also responsible for dispatching work to each of the units as needed. It is hard to know the flow of communication and keep access to the device context properly synchronized.

If you want to reuse for example FIFO code in another driver. You need to understand the complex interaction between the units before extracting the code and the fields used to store the state. Often times, that is error prone.

Now let’s improve the architecture by using DMF. Here the driver is built by using a client Module and several prebuilt generic utility Modules. We are going to refer to code that uses a Module as the client driver. Between WDF and individual Modules, there is a thin arbitration layer (DMF) to bind Modules and dispatch WDF events to each Module. Now, Modules communicate with each other and the client driver in a well-defined manner as shown by the arrows. Instead of all the Modules sharing the device context, each one uses its own context area to maintain its state.

Key differences between a traditional WDF and DMF-based WDF driver.

Here are some key differences between a traditional WDF and DMF-based WDF driver:

  • WDF communicates with DMF, while DMF communicates with the driver.
  • The device context (shown in green) exists independently in each Module and in the client driver-specific code. Each smaller device context holds only the elements that are needed for that Module. No Module can access another Module’s device context.
  • The WDF callbacks (shown in red) now exist independently in each Module and in the client-specific code. WDF calls into the client driver. DMF intercepts that call and dispatches it to each Module in the tree of instantiated Modules. Each Module handles each callback as it sees fit. Finally, DMF dispatches the callbacks to the client driver’s callbacks.
  • Finally, note the arrows. The arrows specifically show the flow among Modules and the client-specific code. In this example, client-specific code can only communicate with three Modules: ACPI, Button, and Stream. It cannot communicate with GPIO, FIFO, List, or Thread. ACPI cannot communicate with FIFO, etc. Even without looking at source code, we have a good idea of how data flows in this driver.

To summarize, each Module is a self-contained single unit. It has its own code, context, and callbacks. This makes the code easy to reuse. Organizing drivers in this way solves many problems.

Design of DMF Modules

DMF follows design and interaction patterns of WDF. DMF does not replace WDF nor does it restrict the driver from using OS interfaces directly. DMF makes it easier for you to break down the tasks that a device driver must perform into smaller units. Then, those smaller, self-contained units that perform a single task can be written as Modules.

1. DMF Modules use interaction patterns consistent with existing WDF objects. Just like any WDF object, a DMF Module:

  • Has a CONFIG structure, methods, and event callbacks.
  • Can be parented to other WDF objects for life time management.

2. Modules within a client driver are organized into a tree structure that is maintained by the core of DMF. The core is responsible for creating, opening, closing, and destroying Modules. In turn each Module is responsible allocating and freeing its own resources.

3. Modules that are siblings of each other cannot communicate directly. Only Modules in a parent-child relationship can communicate with each other; only parent Modules can communicate with their children Modules (with the exception of callbacks).

4. Modules can be extended to meet new requirements, or a new Module can be created by combining multiple Modules.

5. Module design is analogous to a class in an object-oriented programming pattern. If you are familiar with the Universal Extensible Firmware Interface (UEFI) Driver Execution Environment (DXE), you will find similarity with Modules.)

DMF Module

C++ Analogous Concept

Module C++ Object
Module Context C++ Object Private Data (members). Also, importantly this is analogous to WDF drivers’ “device context”.
Module Config C++ Object Constructor Parameters
Module Public Methods C++ Object Public Functions
Module Private Methods C++ Object Private Functions
Module Handle C++ “this” pointer
Client driver The code that instantiates the C++ object.

6. Each Module has its own locks. Each Module is responsible for locking its own private context. Thus, locking is granular but, at the same time, efficient and easy to understand.

7. Modules can be used by the client driver or by other Modules; are agnostic about the code that uses them.

8. Modules can use any number of child Modules. Child Modules, in turn, can use any number of Child Modules.

9. DMF provides default implementations for many driver routines such as DriverEntry, AddDevice, WDF Queue creation, so that simple driver (aka Container driver) can be created with as little code as possible.

10. The client driver only needs to instantiate the Module that the driver needs. Child Modules (if any) required are automatically instantiated by DMF on behalf of the driver.

11. Modules support inheritance. If you want to modify or add capabilities to an existing Module X, it is easy to make a Module Y that is a parent of X. Y then reuses X but provides other functionality as needed.

12. Modules can directly receive all WDF callbacks that are received by the client driver.

13. DMF supports all WDF drivers: KMDF/UMDF, Bus/Filter/Function Drivers, Miniport Drivers, C / C++ Drivers.

14. You can easily integrate DMF into their existing drivers or easily write new drivers from scratch.

DMF Modules

The current release of DMF includes these Modules:

Modules for buffer management

Description

DMF_BufferPool                                   Provides a list of zero or more pre-allocated buffers with bounds-checking validation and timer logic to manage lifetime of buffers. This is a fundamental block used by many other Modules.
DMF_BufferQueue This data structure is composed of two DMF_BufferPool instances providing producer/consumer usage pattern.
DMF_PingPongBuffer Provides a “ping-pong” buffer that allows the Client to read from one part of the buffer which contains fully transmitted/processed data while another part of the Client code continues populating a new partially filled buffer.
DMF_RingBuffer Provides a classic ring-buffer data structure.
DMF_ThreadedBufferQueue Allows the Client to enqueue work. That work is then processed synchronously. Client may optionally wait for work to complete. This is a good example of how Modules can use other Modules to create more complex Modules.

 

Modules for task management

Description

DMF_QueuedWorkitem This Module enhances the WDFWORKITEM primitive in two ways: 1. Allows Client to enqueue work items even if they are already enqueued. 2. Allows a call specific context to be enqueued.
DMF_ScheduledTask Allows the Client to specify that an operation should happen a single time, either for the lifetime of the machine or for the current boot cycle.
DMF_Thread This Module creates a thread and associated “stop” event, a ‘work ready” event and a provides callback function to the Client. An internal callback function waits for the above events and calls the Client callback when the “work-ready” event is set.

 

Modules for notification

Description

DMF_NotifyUserWithEvent Allows the client driver to easily set up an event in Kernel-mode that is also accessible in User-mode.
DMF_NotifyUserWithRequest Allows a Client to notify User-mode of events using the classic IOCTL from User-mode pattern. Data can be sent with the event.

 

Modules for accessing various I/O targets

Description

DMF SelfTarget Allows the client driver to send a WDFREQUEST to its own stack.
DMF_AcpiTarget Allows the client driver to query ACPI in various ways. It allows the Client to easily query/invoke/evaluate DSM methods.
DMF_ContinuousRequestTarget Allows the Client to send requests to WDFIOTARGET in a continuous manner. It is similar to the WDF UsbContinuousReader object but it works for all WDFIOTARGETS.
DMF_DeviceInterfaceTarget Allows the Client to register for a PnP Notification an interface and automatically manage the arrival and removal of the associated device. It also allows the Client send requests in a continuous manner using DMF_ContinuousRequestTarget as a Child Module.
DMF_GpioTarget Allows the client driver to communicate with the GPIO pins exposed by the GPIO WDFIOTARGET. This Module automatically looks for the GPIO resources and opens the appropriate targets based on settings set by the Client.
DMF_HidTarget Allows the client driver to communicate with an underlying HID WDFIOTARGET. Methods are provided that allow the Client to work with input/output/feature reports.
DMF_I2cTarget Allows the Client to communicate with an I2C bus that is exposed by SPB.  This Module automatically looks for the I2C resources and opens the appropriate targets based on settings set by the Client.
DMF_RequestTarget Contains code that builds and send requests. It can be used with any WDFIOTARGET.
DMF_ResourceHub Allows the client driver to communicate with a Resource Hub WDFIOTARGET. The Module contains all the code need to parse the type resource and other information.
DMF_SerialTarget Allows the client driver to open Serial IO Stream target and send requests.
DMF_SpiTarget Allows the client driver to communicate with an SPI bus that is exposed by SPB.

 

Miscellaneous utility Modules

Description

DMF_AcpiNotification Allows the client driver to register for and receive asynchronous notifications via ACPI.
DMF_AlertableSleep Allows the client driver to cause a thread to sleep and cancel that sleep at any time.
DMF_ButtonTargetViaMsGpio Allows the client driver to communicate with the device interfaces exposed by MSGPIOWIN32. These interfaces allow the driver to inject button and tablet related messages.
DMF_CrashDump Allows the client driver to easily write data to the Windows Crash Dump file when the system crashes.
DMF_IoctlHandler Allows the Client to more easily handle IOCTLs. Client provides a table of supported IOCTLS, the kind of access required, and the minimum/maximum sizes of the input/output buffers as well as a callback that processes the IOCTL.
DMF_Pdo Allows the client driver to easily create PDOs for enumerating virtual devices.
DMF_Registry Provides functions that allow the client driver to work easily with the Registry.
DMF_SmbiosWmi Allows the client driver to read the SMBIOS data which the Module retrieves using WMI.
DMF_VirtualHidDeviceVhf This Module is a wrapper around the VHF API. Modules use this Module as a Child Module to create virtual HID devices. Those parent Modules expose Methods that are specific to that virtual HID device.
DMF_VirtualHidKeyboard Provides an example of how to create a Virtual HID device using DMF_VirtualHidDeviceVhf.
DMF_Wmi Allows the client driver work with the WMI API easily.

DMF resources

DMF and its Modules, templates and sample code have been shared for public use on Github. We will continue to improve the code and add new Modules in the open-source repository. Also, look forward to more sample drivers that show different features of DMF and to help you understand the various ways DMF can be used.

DMF has been designed with the goal to develop and maintain quality drivers with maximum efficiency and maintainability. It’s now being shared to the world as open source so the Windows ecosystem can leverage this framework and utility-modules to write quality drivers. WDF over a decade ago brought tremendous improvement over WDM and changed the driver landscape, however it has not provided an ability for a 3rd party driver house to create extensions/libraries that plug seamlessly into the WDF messaging model and can be shared across drivers.

We are confident that DMF will help you develop and maintain quality drivers with maximum efficiency and maintainability.

Look out for more posts about DMF. We intend to answer your questions, so please post your comments on Github!

The post Introducing Driver Module Framework appeared first on Windows Developer Blog.

Improvements in Visual Studio 2017 15.8 for web developers

$
0
0

This week we released Visual Studio 2017 version 15.8. Our 15.8 update brings the following improvements for web developers:

  • Custom docker image tags during Publish
  • Zip push deployment for Azure Functions
  • Managing user secrets in ASP.NET Framework projects (targeting .NET 4.7.1 or higher)
  • Enabling Application Insights as part of publishing to Azure App Service
  • Optimizing build performance for solutions containing ASP.NET Framework projects
  • Author and source information for ASP.NET Core templates

Custom docker image tags during Publish

You can now customize the “Image tag” for Docker containers when publishing them to a container registry. The value can either be automatically generated by Visual Studio every time you publish (the previous behavior), or it be manually changed if you need a consistent tag (e.g. “latest”):

Screenshot of new property called "Image Tag" in Publish

Zip push deployment & run from zip for Azure Functions

Visual Studio now provides the option to deploy and run Azure Functions projects as zip files:

Screenshot of publish and run from zip option in Publish

Run-From-Zip is a runtime feature that allows ‘mounting’ a zip file and running directly from it. Your App runs directly over the ‘mounted’ zip file, which completely takes over your wwwrootfolder (which becomes read-only).  Using run from Zip offers the following benefits:

  • Atomicity: when your application is deployed as as single unit, and updated as a single unit meaning publishing an update will never leave your app in a partially updated state
  • Faster deployment of large applications
  • Improved cold start performance

Managing user secrets in ASP.NET Framework projects (targeting .NET 4.7.1 or higher)

A feature that ASP.NET Framework projects were missing compared to ASP.NET Core was support for storing application secrets (e.g. connection strings, API keys, etc.) in a file outside of source control unique to each user. Now, with .NET Framework 4.7.1 and Visual Studio 15.8 it’s as simple as right clicking on the project in Solution Explorer and selecting “Manage User Secrets”:

Screenshot of the new "Manage user secrets" menu item when right clicking in Solution Explorer

Visual Studio will take care of the rest including downloading the necessary NuGet packages, updating the web.config file, creating the secrets file on disk and finally opening it for you to edit:

Screenshot of an example user secrets file

Note: Only available for projects targeting .NET Framework 4.7.1 or higher, if you can’t see the menu item make sure you have the 4.7.1 targeting pack installed and that the project is actually targeting 4.7.1, you can change it from project properties:

Screenshot of the run time drop-down available in project properties

Enabling Application Insights as part of publishing to Azure App Service

When publishing to Azure App Service, Visual Studio asks you to either create a new App Service or re-use an existing one. If you choose to create a new App Service to host your application, Visual Studio now offers you the ability to also provision and configure Application Insights:

Screenshot of new drop-down related to Application Insights when creating a new App Service

All you need to do is pick the region you would like Application Insights to be provisioned in and Visual Studio will make sure it’s configured to pick up telemetry events and metrics from the new App Service. If you wish to add custom events and metrics follow this guide. Of course, you can always set the field to “None” and Visual Studio will not provision nor configure Application Insights on your behalf.

Optimizing build performance for solutions containing ASP.NET Framework projects

We added a new menu item under Build | ASP.NET Compilation | Optimize Build Performance for Solution:

Screenshot of new menu item Build | ASP.NET Compilation | Optimize Build Performance for Solution

This new menu item is applicable to solutions containing ASP.NET Framework projects only and is not applicable to ASP.NET Core projects. Its purpose is to update specific ASP.NET related NuGet packages referenced by the codebase.

When an ASP.NET Framework codebase is using out-of-date packages, the inner loop performance of Visual Studio is impacted. The motivation behind updating these packages is to restore optimal inner loop performance for a given solution.  You will only have to do this once per solution and you will not have to deal with this problem in the future since the new package is designed in a way that even when it gets out of date it doesn’t affect the inner loop performance in Visual Studio.

Author and source information for ASP.NET Core templates

The dialog for new ASP.NET Core projects now shows you the author and source for the selected template:

Screenshot of author and source information available in the New Project Dialog

  • If the template is coming from a .NET Core SDK installed on the machine, the dialog will now display the version of the SDK as the source
  • If the template is coming from a VSIX (i.e. Visual Studio extension) installed on the machine, the dialog will now display the name of the VSIX as the source

Conclusion

If you’re interested in the many other great things that Visual Studio 2017 15.8 brings, check out our Visual Studio 15.8 post on the Visual Studio blog.

We hope that you’ll give 15.8 a try and let us know how it works for you. If you run into any issues please report them using Visual Studio, or let us know what you think below, or via Twitter.

.NET Core 2.1 August Update

$
0
0

We released .NET Core 2.1.400-SDK. See .NET Core 2.1.400-SDK release notes for complete details on the release.

Quality Updates

CLI

A full list of the changes in this update can be found in the commit list.

Getting the Update

The .NET Core 2.1.400-SDK August 2018 Update is available from the .NET Core 2.1.400-SDK download page.

You can always download the latest version of .NET Core at .NET Downloads.

Docker Images

.NET Docker images have been updated for today’s release. The following repos have been updated.

Note: Look at the “Tags” view in each repository to see the updated Docker image tags.

Note: You must re-pull base images in order to get updates. docker build –pull does this automatically.

.NET Core End of Life Updates

.NET Core Supported OS Lifecycle Policy is regularly updated as supported operating systems reach end of life.

Previous .NET Core Updates

The last few .NET Core updates follow:

 

IoT in Action: Building secure, sophisticated solutions

$
0
0

With a compound annual growth rate of 28.5 percent forecasted by 2020, the global Internet of Things (IoT) market is exploding, and the technology behind IoT continues to evolve at a feverish pace.

Here at Microsoft, we’re working hard to secure, simplify, and democratize IoT so that every customer can transform business, and the world at large, with connected solutions. This is why Microsoft has committed $5 billion to IoT over the next four years.
 
While IoT offers companies across industries a wealth of powerful benefits, the reality of implementation poses serious considerations such as security, complexity and scalability--not to mention keeping up with all the innovations flooding the market.

In the run up to the IoT in Action kickoff event for FY18 (where you’ll definitely learn more), I’d like to briefly touch on some key areas to consider when preparing to build out your IoT solution.

image

Make security intentional with Azure Sphere

Did you know that more than 9 billion microcontroller units (MCU) are deployed each year? From a risk standpoint, that’s 9 billion more opportunities for compromised security. Which means, making end-to-end security a priority from the start is a top priority.

Recently, as part of our commitment to secure IoT, Microsoft introduced Azure Sphere, which is the industry’s first holistic platform for providing security for MCU devices. Azure Sphere combines cloud security, a secured OS, and a secured MCU to protect and power devices at the intelligent edge. It also fully addresses what Microsoft has identified as The Seven Properties of Highly-Secure Devices.

Azure Sphere enables MCU manufacturers to build highly secure devices that are protected through their connection to the Azure Sphere Security Service. Designed for efficiency, Azure Sphere comes with Visual Studio tools that streamline development and can connect quickly to Azure or another public or private cloud of your choice. Learn more with an upcoming two-part Azure Sphere webinar.

Enable greater sophistication with Azure IoT

Customers across industries are implementing increasingly sophisticated IoT solutions in countless scenarios to achieve their own unique objectives. From launching new products to creating new services to streamlining operations, our customers continue to find new ways to leverage the Azure IoT platform.

To stay ahead of advancing needs, Microsoft continues to innovate. Below is a short summary of how our innovations are enabling more sophisticated IoT solutions.

Azure IoT Central

We recently introduced multiple new features to Azure IoT Central. The new state measurement enables devices to report the current state of the device or its components. Our new event monitoring template enables users to set up roles to monitor and be alerted to critical events within minutes of an occurrence. Bulk device import and export enables users to set up a large number of devices in IoT Central at once using a csv file. Plus, IoT Central now leverages Azure Maps, giving users geographic context to location data.

Azure IoT Edge

Introduced just over a year ago, Azure IoT Edge enables devices to act immediately on real-time data. And today it is available globally. Recent innovations have increased its flexibility. IoT Edge is now open-sourced and available on GitHub. We’re also offering support for the Mob container management system. And we’ve expanded the Azure Certified for IoT program to certify core edge functionalities like security and device management. Furthermore, IoT Edge integrates with Device Provisioning Service for more scalable deployments.

Connect with compatible technology and partners

Microsoft has the most comprehensive and secure portfolio of IoT offerings on the market. And while getting the technology right is critical for your IoT solution, it’s also important to connect with compatible partners. Microsoft relies on our extensive partner ecosystem to develop and implement secure, scalable, and repeatable IoT solutions that meet customers’ needs.

To enable and expedite successful connections, IoT in Action events will feature a digital matchmaking tool designed to help attendees identify and meet the partner or customer most suited to their immediate business need or opportunity.

Build IoT solutions with endless possibilities

To learn more, be sure to register for a one-day IoT in Action event in your area. IoT in Action is an in-person event focused on addressing the latest topics around IoT security, innovations, and solutions. It’s a great opportunity to meet and collaborate with Microsoft’s customer and partner ecosystem.

At this year’s event, we’re providing an increased number of hands-on technical sessions and in-depth learning around IoT security and Azure Sphere. By attending, you’ll gain actionable insights, deepen partnerships, and unlock the transformative potential of intelligent edge and intelligent cloud.

Register today

Seats are limited so I recommend that you register today. Also, by registering early, you’ll get access to keynote slides from last year’s event as well as technical training resources for Azure and Windows IoT. This event is ideal for anyone interested in learning more about transforming business through IoT and for technical leaders looking for practical guidance.

Register for an event near you:

  • Barcelona – October 15, 2018
  • Santa Clara – October 25, 2018
  • Taipei – December 12-13, 2018 (registration opens soon)
  • Shenzhen – December 18, 2018 (registration opens soon)
  • More locations and dates coming soon!

Watch the IoT in Action global event series video to see highlights of what you can expect to experience during this year’s event.

Stay tuned for additional event dates and locations, and be sure to supplement your IoT learnings with the IoT in Action webinar series.


Announcing VNet service endpoints general availability for MySQL and PostgreSQL

$
0
0

This blog post was co-authored by Anitha Adusumilli, Principal Program Manager, Azure Networking.

We recently made Azure database services for MySQL and PostgreSQL generally available. These services offer the community versions of MySQL and PostgreSQL with built-in high availability, a 99.99 percent availability SLA, elastic scaling for performance, and industry-leading security and compliance on Azure. Since general availability, we have continued to bring new features and capabilities like increased storage and availability across more regions worldwide.

We are excited to announce the general availability of Virtual Network (VNet) service endpoints for Azure Database for MySQL and PostgreSQL in all regions where the service is available for General Purpose and Memory Optimized servers. Visit region expansion for MySQL and PostgreSQL for service availability. VNet service endpoints enable you to isolate connectivity to your logical server from only a given subnet or set of subnets within your virtual network. The traffic to Azure Database for MySQL and/or PostgreSQL from your VNet always stays within the Azure backbone network. Preference for this direct route is over any specific ones that route Internet traffic through virtual appliances or on-premises.

There is no additional billing for virtual network access through service endpoints. The current pricing model for Azure Database for MySQL and PostgreSQL applies as is.

Image 1

Using firewall rules and VNet service endpoints together

Turning on VNet service endpoints does not override firewall rules that you have provisioned on your Azure Database for MySQL or PostgreSQL. Both continue to be applicable.

VNet service endpoints don’t extend to on-premises. To allow access from on-premises, firewall rules can be used to limit connectivity only to your public (NAT) IPs.

To enable VNet protection, visit these articles for Azure Database for MySQL and PostgreSQL.

Turning on service endpoints for servers with pre-existing firewall rules

When you connect to your server with service endpoints turned on, the source IP of database connections switches to the private IP space of your VNet. Configuration is via the “Microsoft.Sql” shared service tag for all Azure Databases including Azure Database for MySQL, PostgreSQL, Azure SQL Database Managed Instance, and Azure SQL Data Warehouse. If at present your server or database firewall rules allow specific Azure public IPs, then the connectivity breaks until you allow the given VNet/subnet by specifying it in the VNet firewall rules. To ensure connectivity, you can preemptively specify VNet firewall rules before turning on service endpoints by using IgnoreMissingServiceEndpoint flag.

Pre-existing firewall rules

Support for App Service Environment

As part of the general availability, we support service endpoints for App Service Environment (ASE) subnets deployed into your VNets.

Next steps

To get started, refer to the documentation “Virtual Network Service Endpoints” and “How to configure VNET Service Endpoints for MySQL and PostgreSQL”.

For feature details and scenarios, please watch the Microsoft Ignite session, Network security for applications in Azure.

Save with the Unity Pro & Visual Studio Professional Bundle

$
0
0

The combination of Visual Studio and Unity provides a top-notch experience for game development across a variety of platforms and devices. While we offer no cost software for those just starting out, as your team’s size and success grows, so does the need for professional tools.

We’re happy to announce in partnership with Unity Technologies, you can save 10% (up to $270!) with the all-new Unity Pro & Visual Studio Professional Bundle*.

With the bundle you’ll not only get the Visual Studio Professional IDE, but also one year of access to Visual Studio Professional Standard Subscription that includes development/test use rights for Microsoft software, $50 in monthly Azure credits, and CodeLens in the IDE on PC which provides better insight into your team’s code. Unity Pro provides extended analytics, performance reporting, collaboration tools, access to a Unity Success Advisor, and so much more. This special bundle is available for developers on both PC and Mac and you can learn more at unity3d.com/vsbundle.

Visual Studio and Unity Bundle

Visual Studio and Unity: Seamless Integration

The Visual Studio and Unity integration enables you to be more productive and improve the developer inner loop. When working with scripts, you can use Visual Studio features like IntelliSense. You can also directly implement Unity API messages in MonoBehavior scripts and take advantage of the MonoBehavior wizard for adding method definitions. Visual Studio also enables you to view Unity scripts in the “Unity Project Explorer” and makes it easy to debug games with its powerful debugger. Ready to see your changes? Enable “Attach to Unity and Play” to automatically switch to the Unity editor and begin playback of your game.

Visual Studio and Unity - Seamless Integration

To learn more about game development with Unity in Visual Studio, check out our docs.

* Limited time offer, Visual Studio Professional Subscription valid for one year.
For purchase information and to learn more about the Unity Pro & Visual Studio Professional Bundle, visit unity3d.com/vsbundle.

Jb Evain, Principal Software Engineer Manager
@jbevain

Jb runs the Visual Studio Tools for Unity experience. He has a passion for developer tools and programming languages and has been working in developer technologies for over a decade.

Installing certificates into IoT devices

$
0
0

Lots of folks are moving to X.509 certificate-based authentication as they start to use the Azure IoT Hub Device Provisioning Service, which is great! But I've gotten lots of questions about what the best practices are, and how to go about doing it at scale. There are a lot of variables that influence where certs come from and how they are installed, and who owns each stage depends on the specific processes and business relationships in place. This blog post is meant to provide some clarity around the cert generation and installation process for IoT devices at production-level scales.

One note before I begin, if you already have a system in place for installing certificates on your IoT devices and its working out for you, great! Feel free to stop reading and check out some of our other content. This blog post is for folks who are just making the switch to using certificates on IoT devices and are struggling with figuring out what works best.

Mandatory security rant

If you're coming from the land of passwords and want a quick fix, you might be asking yourself why you can't use the same certificate in all your devices like you would be able to use the same password in all your devices. First, using the same password everywhere is really bad practice and has already caused several major DDoS attacks, including the one that took down DNS on the US East Coast a few years back. So don't ever do this, even with your own personal accounts. Second, certificates are not passwords they are complete identities. A password is like knowing the secret phrase to get into the clubhouse, a certificate is the bouncer asking to see your driver's license. It’s like if I got multiple copies made of my passport and gave you one to use for identification. Either you give my name and my passport and impersonate me (AKA spoof my identity), or you give your name and my passport and the border control agent kicks you out for not having an ID matching your name.

Variables involved in certificate decisions

There are several variables that come into play when you decide to use certificates in your IoT devices. The heavy hitters are as follows.

Where the certificate root of trust comes from. Make this decision based on your own cost tolerances and masochism levels – managing a public key infrastructure (PKI), especially if your company does not have experience doing so, is not for the faint of heart. Your options are:

  • 3rd party PKI in which you buy intermediate signing certificates (or a private CA) from a 3rd party cert vendor.
  • Self-managed PKI in which you maintain your own PKI system and generate your own certificates.
  • Azure Sphere’s security service (only for Azure Sphere devices).

Where certificates are stored. This depends on the type of device you're building, the expected device margins (whether you can afford secure storage), the device's capabilities, and existing security technology on the device that may be leveraged. Your options are:

  • In a hardware security module (HSM) (recommended!). Check whether your device's control board already has an HSM installed. I've talked to a couple customers who were surprised to find they had an HSM already installed in their devices that they just weren't using. If you know you don't have an HSM, work with your hardware manufacturer to identify an HSM that meets your needs.
  • In a secure place on disk such as a trusted execution environment (TEE).
  • Local file system or cert store, e.g. the Windows certificate store.
  • Other

Connectivity at the factory. This determines how and when you get the certificates that will be installed on the devices. Your options are:

  • Yes connectivity (can generate certs locally).
  • No connectivity (factory has a signed CA cert it uses to generate device certs locally offline).
  • No connectivity (certs need to be generated ahead of time, OR offline PKI).

Audit requirement. Depending on the type of devices you are producing, you may be required by regulations to have an auditable trail of how device identities are installed in your devices. Only do this if you need to since it can add significant costs to production. If you're not sure if this applies to you, check with your company's legal department. Your options are:

  • Not a sensitive industry, no auditing required.
  • Sensitive industry, certs need to be installed in a secure room according to various compliance certification requirements. If you need a secure room to install certificates, you probably already are aware of how certs get installed in your devices and already have a system in place. This post is probably not for you.

Length of cert validity. Like a driver's license, certificates have an expiration date that is set when they are created. Your options are:

  • Very long, never will need to roll it. A very risky approach. Risk can be reduced using very secure storage like an HSM etc. However, the long-lived certificate approach is not recommended.
  • Will need to roll during the lifetime of the device. This is context dependent and requires a strategy for how to roll certificates, where you're getting certificates from, and what type of over the air functionality exists for your devices.

When to generate certificates

As I mentioned in the previous section, connectivity at the factory plays an important role in determining when you generate the certificates for your devices. Let's talk about that.

Some HSM vendors offer a premium service in which the HSM vendor installs certificates in the HSMs on behalf of the customer. Customers give the HSM vendor access to a signing certificate and the HSM vendor installs certificates signed by that signing certificate on each HSM the customer buys. All the customer has to do is install the HSM on the device. One customer I've talked to who went this route says the process is pretty slick. If you choose to go the “preloaded in HSM” route, when to generate certificates is not your problem! Hooray!

If your devices internally generate their certificates, then you must extract the public X.509 certificate from the device for enrollment.

If your factory has connectivity, you can generate the certs whenever you need them.

If your factory does not have connectivity, and you are using your own PKI with offline support, then you can generate the certs whenever you need them.

If your factory does not have connectivity, and you are using a 3rd party PKI, you have to generate the certs ahead of time from an internet connected location.

When to install certificates

Now that you've generated certificates for your IoT devices (or know when to generate them), it's time to install them into your device.

If you go the “preloaded in HSM” route, your life is made a little easier. Once the HSM is installed in the device, it is available for the device code to access. You will then use the HSM APIs to use the cert stored within the HSM. It's the easiest option, but it costs a little more.

Otherwise, you need to install the certificate as part of the production process. The easiest way to integrate it into your existing process is to install the certificate with the initial firmware image. Each device has to go through at least one touch on the manufacturing floor to get an image installed and to run the final quality checks, etc, before the device is packaged up to send to its final destination. There's generally a tool used that does the installation and testing in one shot. You can modify the tool to generate a cert or pull a cert from a pre-generated store and then install it wherever the cert needs to be installed. The tool gives you the scale you need for production-level manufacturing.

If you need more help getting certificates in your IoT devices, please reach out to someone from our security auditor program. Once you get set up with certs on your devices, learn how to use certificates and enrollments in the Device Provisioning Service!

To sum things up with a limerick:

Installing device certs at scale
Can be fraught with pain and with fail
You can totally do it!
Just plan and work through it
This blog post serves as your guardrail.

Azure #HDInsight Apache Phoenix now supports Zeppelin

$
0
0

The HDInsight team is excited to announce Apache Zeppelin Support for Apache Phoenix

Phoenix in Azure HDInsight

Apache Phoenix is an open source, massively parallel relational database layer built on HBase. Phoenix allows you to use SQL like queries over HBase. Phoenix uses JDBC drivers underneath to enable users to create, delete, alter SQL tables, indexes, views and sequences, upset rows individually and in bulk. Phoenix uses NOSQL native compilation rather than using MapReduce to compile queries, enabling the creation of low-latency applications on top of HBase.

Apache Phoenix enables OLTP and operational analytics in Hadoop for low latency applications by combining the best of both worlds. In Azure HDInsight Apache Phoenix is delivered as a 1st class Open Source framework.

Why use Apache Phoenix in Azure HDInsight?

HDInsight is the best place for you to run Apache Phoenix and other Open Source Big Data Applications. HDInsight makes Apache Phoenix even better in following ways:

Out of the box highly tuned Apache Phoenix cluster in minutes

In Azure, several large customers runs their mission critical HBase/Phoenix workloads, over the period of time services becomes more and more intelligent about right configurations for running the HBase workloads as efficiently as possible. This intelligence is than brought to you in the form of highly tuned clusters that will meet your needs. You can create clusters within minutes manually with Azure Portal or by automating the creation workflow with Azure JSON templates, Powershell, REST based API or Azure client SDK.

Decoupled Storage and CPU

HDInsight changes the game with seemingly simple , yet very powerful cloud construct where compute and CPU are decoupled. This is very powerful as you have inexpensive abundant cloud storage that could be mounted to a smallest HBase cluster. When you don't need to read/write, you can delete the cluster completely and still retain the data. This flexibility helps our customers achieve best price/performance.

Delivered as a service, yet not compromising on control

HDInsight delivers Phoenix as a service so you don't have to worry about setup, patching, upgrading , maintaining etc. Moreover, you get financially backed SLA of 99.9 percent as well as support, yet it doesn't take away any control. You have the option to further fine tune your cluster as well as install additional components and make further customizations.

Best suited for mission critical production workloads

As Microsoft's roots are in enterprises, you will find HDInsight Phoenix fitting very nicely into your enterprise architecture. You can host Phoenix clusters in a private virtual network in order to protect your valuable data. You can take advantage of Azure infrastructure to achieve high availability and disaster recovery. You can also find Azure and HDInsight constantly update their compliance status @Azure Trust Center.

What is Apache Zeppelin?

Apache Zeppelin is open source Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and many other languages. It helps data developers & data scientists in developing, organizing, executing, and sharing data code and visualizing results without referring to the command line or needing the cluster details.

Integration with Apache Phoenix

Now HDInsight customers can use Apache Zeppelin to query your Phoenix tables. Apache Zeppelin is integrated with HDInsight cluster and there are no additional steps to use it.

Simply create a Zeppelin Notebook with JDBC interpreter and start writing your Phoenix SQL queries

image_thumb[2]

Try HDInsight now

We hope you will take full advantage Apache Zeppelin with Apache Phoenix. We are excited to see what you will build with Azure HDInsight. Read this developer guide and follow the quick start guide to learn more about implementing these pipelines and architectures on Azure HDInsight. Stay up-to-date on the latest Azure HDInsight news and features by following us on Twitter #HDInsight and @AzureHDInsight. For questions and feedback, please reach out to AskHDInsight@microsoft.com.

About HDInsight

Azure HDInsight is Microsoft’s premium managed offering for running open source workloads on Azure. Azure HDInsight powers mission critical applications ranging in a wide variety of sectors including, manufacturing, retail education, nonprofit, government, healthcare, media, banking, telecommunication, insurance, and many more industries ranging in use cases from ETL to Data Warehousing, from Machine Learning to IoT, and more.

Additional resources

Advanced Analytics is coming into Azure Portal

$
0
0

We see Azure Monitor users are using both the Log Search page and the Analytics portal to accomplish their tasks. The Analytics portal offers advanced features, and we’re happy to announce it’s coming into Azure!

This is another step on our journey to consolidate and unify all Log Analytics experiences under Azure Portal.

What’s coming?

If you’re not familiar with the Analytics portal, you’re in for a treat!

  • Multiple tabs – use as many tabs as you want to run multiple queries
  • Rich visualizations – a variety of charting options to choose from
  • Improved IntelliSense and language auto-completion
  • Syntax highlighting – making queries easier to read
  • Query explorer – access your saved queries and functions, within the editor
  • Schema view – review the full schema of your data
  • Column selection – select the columns of the results table, and their order
  • Share – create links to queries, or pin queries to any shared Azure dashboard

LogAnalyticsInAzure

When and where?

In the coming days, a menu item named “Logs (preview)” will light up in Azure Log Analytics. It will gradually be integrated into a number of Azure features and services, such as Application Insights, Azure Monitor and Azure Kubernetes Service.

At first, “Logs” will appear in its basic form with the features described above, and during the coming weeks it will be enriched with additional functionality and features.

The external Advanced Analytics portal remains up and running, for those who prefer to keep using it outside of Azure.

We invite you to take part and provide your feedback on this ongoing process directly to us, at LAUpgradeFeedback@microsoft.com.

Azure #HDInsight Interactive Query: simplifying big data analytics architecture

$
0
0

Fast Interactive BI, data security and end user adoption are three critical challenges for successful big data analytics implementations. Without right architecture and tools, many big data and analytics projects fail to catch on with common BI users and enterprise security architects. In this blog we will discuss architectural approaches that will help you architect big data solution for fast interactive queries, simplified security model and improved user adoption with BI users.

Traditional approach to fast interactive BI

Deep analytical queries processed on Hadoop systems have traditionally been slow. MapReduce jobs or hive queries are used for heavy processing of large datasets, however, not suitable for the fast response time required by interactive BI usage.

Faced with user dissatisfaction due to lack of query interactivity, data architects used techniques such as building OLAP cubes on top of Hadoop. An OLAP cube is a mechanism to store all the different dimensions, measures and hierarchies up front. Processing the cube usually takes place at the pre-specified interval. Post processing, results are available in advance, so once the BI tool queries the cube it just needs to locate the result, thereby limiting the query response time and making it a fast and interactive one. Since all measures get pre-aggregated by all levels and categories in the dimension, it is highly suitable for interactivity and fast response time. This approach is especially suitable if you need to light up summary views.

 

image

Above approach works for certain scenarios but not all. It tends to break down easily with large big data implementations, especially with use cases where many power users and data scientists are writing many ad-hoc queries.

Here are the key challenges:

  • OLAP cubes require precomputations for creating aggregates which introduces latency. Businesses across all industries are demanding more from their reporting and analytics infrastructure within shorter business timeframes. OLAP cubes can’t deliver real-time analysis.
  • In big data analytics, precomputation puts heavy burden on underlying Hadoop system creating unsustainable pressure on entire big data pipeline which severely hampers performance, reliability and stability of entire pipeline.
  • This type of architecture forces large dataset movement between different systems which works well at small scale. However, falls apart at large data scale. Keeping data hot and fresh across multiple tiers is challenging.
  • Power users and data scientists requires a lot more agility and freedom in terms of their ability to experiment using sophisticated ad-hoc queries that puts additional burden on overall system.

 

Azure HDInsight Interactive query overview

One of the most exciting new features of Hive 2 is Low Latency Analytics Processing (LLAP), which produces significantly faster queries on raw data stored in commodity storage systems such as Azure Blob store or Azure Data Lake Store.

This reduces the need to introduce additional layers to enable fast interactive queries.

Key benefits of introducing Interactive Query in your big data BI architecture:

Extremely fast Interactive Queries: Intelligent caching and optimizations in Interactive Query produces blazing-fast query results on remote cloud storage, such as Azure Blob and Azure Data Lake Store. Interactive Query enables data analysts to query data interactively in the same storage where data is prepared, eliminating the need for moving data from storage to another analytical engine for analytical needs. Refer to Azure HDInsight Performance Benchmarking: Interactive Query, Spark, and Presto to understand HDInsight Interactive Query performance expectations @ 100TB scale.

HDInsight Interactive Query (LLAP) leverages set of persistent daemons that execute fragments of Hive queries. Query execution on LLAP is very similar to Hive without LLAP, except that worker tasks run inside LLAP daemons, and not in containers.

image

Lifecycle of a query: After client submits the JDBC query, query arrives at Hive Server 2 Interactive which is responsible for query planning, optimization, as well as security trimming. Since each query is submitted via Hive Server 2, it becomes the single place to enforce security policies.

image

File format versatility and Intelligent caching: Fast analytics on Hadoop have always come with one big catch: they require up-front conversion to a columnar format like ORCFile, Parquet or Avro, which is time-consuming, complex and limits your agility.

With Interactive Query Dynamic Text Cache, which converts CSV or JSON data into optimized in-memory format on-the-fly, caching is dynamic, so the queries determine what data is cached. After text data is cached, analytics run just as fast as if you had converted it to specific file formats.

Interactive Query SSD cache combines RAM and SSD into a giant pool of memory with all the other benefits the LLAP cache brings. With the SSD Cache, a typical server profile can cache 4x more data, letting you process larger datasets or supporting more users. Interactive query cache is aware of the underlying data changes in remote store (Azure Storage). If underlying data changes and user issues a query, updated data will be loaded in the memory without requiring any additional user steps.

image

Concurrency: With the introduction of much improved fine-grain resource management, preemption and sharing cached data across queries and users, Interactive Query [Hive on LLAP] makes it better for concurrent users.

In addition, HDInsight supports creating multiple clusters on shared Azure storage and Hive metastore helps in achieving a high degree of concurrency, so you can scale the concurrency by simply adding more cluster nodes or adding more clusters pointing to same underlying data and metadata.

Please read Hive Metastore in HDInsight to learn more about sharing metastore across clusters and cluster types in Azure HDInsight.

Simplified and scalable architecture with HDInsight Interactive Query

By introducing Interactive Query to your architecture, you can now route power users, data scientists, and data engineers to hit Interactive Query directly. This architectural improvement will reduce the overall burden from the BI system as well as increases user satisfaction due to fast interactive query response as well as increases flexibility to run ad-hoc queries at will.

image

In above described architecture, users who wants to see the summary views can still be served with OLAP cubes. However, all other users leverage Interactive Query for submitting their queries.

For OLAP based applications on Azure HDInsight, please see solutions such as AtScale and Apache Kyligence.

Security model

Like Hadoop and Spark clusters, HDInsight Interactive Query leverages Azure Active Directory and Apache Ranger to provide fine-grain access control and auditing. Please read An introduction to Hadoop security article to understand security model for HDInsight clusters.

In HDInsight Interactive Query, access restriction logic is pushed down into the Hive layer and Hive applies the access restrictions every time data access is attempted. This helps simplify authoring of the Hive queries and provides seamless behind-the-scenes enforcement without having to add this logic to the predicate of the query. Please read Using Ranger to Provide Authorization in Hadoop to understand different type of security policies that can be created in Apache Ranger.

User adoption with familiar tools

In big data analytics, organizations are increasingly concerned that their end users aren’t getting enough value out of the analytics systems because it is often too challenging and requires using unfamiliar and difficult-to-learn tools to run the analytics. HDInsight Interactive Query addresses this issue by requiring minimal to no new user training to get insight from the data. Users can write SQL queries (hql) in the tools they already use and love the most. HDInsight Interactive query out of the box supports BI tools such as Visual Studio Code, Power BI, Apache Zeppelin, Visual Studio, Ambari Hive View, Beeline, and Hive ODBC.

image
To learn more about these tools, please read Azure HdInsight Interactive Query: Ten tools to analyze big data faster.

Built to complement Spark, Hive, Presto, and other big data engines

HDInsight Interactive query is designed to work well with popular big data engines such as Apache Spark, Hive, Presto, and more. This is especially useful because your users may choose any one of these tools to run their analytics. With HDInsight’s shared data and metadata architecture, users can create multiple clusters with the same or different engine pointing to same underlying data and metadata. This is very powerful concept as you are no longer bounded by one technology for analytics.

    image

Try HDInsight now

We hope you will take full advantage fast query capabilities of HDInsight Interactive Query. We are excited to see what you will build with Azure HDInsight. Read this developer guide and follow the quick start guide to learn more about implementing these pipelines and architectures on Azure HDInsight. Stay up-to-date on the latest Azure HDInsight news and features by following us on Twitter #HDInsight and @AzureHDInsight. For questions and feedback, please reach out to AskHDInsight@microsoft.com.

About HDInsight

Azure HDInsight is Microsoft’s premium managed offering for running open source workloads on Azure. Azure HDInsight powers mission critical applications ranging in a wide variety of sectors including, manufacturing, retail education, nonprofit, government, healthcare, media, banking, telecommunication, insurance, and many more industries ranging in use cases from ETL to Data Warehousing, from Machine Learning to IoT, and more.

Additional resources

Make R speak

$
0
0

Every wanted to make R talk to you? Now you can, with the mscstts package by John Muschelli. It provides an interface to the Microsoft Cognitive Services Text-to-Speech API (hence the name) in Azure, and you can use it to convert any short piece of text to a playable audio file, rendering it as speech using a number of different voices.

Before you can generate speech yourself, you'll need a Bing Speech API key. If you don't already have an Azure account, you can generate a free 7-day API key in seconds by visiting the Try Cognitive Services page, selecting "Speech APIs", and clicking "Get API Key" for "Bing Speech":

Bing speech

No credit card is needed; all you need is a Microsoft, Facebook, LinkedIn or Github account. (If you need permanent keys, you can create an Azure account here which you can use for 5000 free Speech API calls per month, and also get $200 in free credits for use with any Azure service.)

Once you have your key (you'll actually get two, but you can use either one) you will call the ms_synthesize function to convert text up to 1,000 characters or so into mp3 data, which you can then save to a file. (See lines 8-10 in the speakR.R script, below.) Then, you can play the file with any MP3 player on your system. On Windows, the easiest way to do that is to call start on the MP3 file itself, which will use your system default. (You'll need to modify line 11 of the script to work non-Windows systems.)

Saving the data to a file and then invoking a player got a bit tedious for me, so I created the say function in the script below to automate the process. Let's see it in action:

Note that you can choose from a number of accents and spoken languages (including British English, Canadian French, Chinese and Japanese), and the gender of the voice (though both female and male voices aren't available for all languages).  You can even modify volume, pitch, speaking rate, and even the pronunciation of individual words using the SSML standard. (This does mean you can't use characters recognized as SSML in your text, which is why the say function below filters out < > and / first.) 

The mscstts package is available for download now from your favorite CRAN mirror, and you can find the latest development version on Github. Many thanks to John Muschelli for putting this handy package together!


Windows 10 SDK Preview Build 17733 available now!

$
0
0

Today, we released a new Windows 10 Preview Build of the SDK to be used in conjunction with Windows 10 Insider Preview (Build 17733 or greater). The Preview SDK Build 17733 contains bug fixes and under development changes to the API surface area.

The Preview SDK can be downloaded from developer section on Windows Insider.

For feedback and updates to the known issues, please see the developer forum. For new developer feature requests, head over to our Windows Platform UserVoice.

Things to note:

  • This build works in conjunction with previously released SDKs and Visual Studio 2017. You can install this SDK and still also continue to submit your apps that target Windows 10 build 1803 or earlier to the Store.
  • The Windows SDK will now formally only be supported by Visual Studio 2017 and greater. You can download the Visual Studio 2017 here.
  • This build of the Windows SDK will only install on Windows 10 Insider Preview builds.
  • In order to assist with script access to the SDK, the ISO will also be able to be accessed through the following link once the static URL is published.

C++/WinRT Update for build 17709 and beyond:

This update introduces many improvements and fixes for C++/WinRT. Notably, it introduces the ability to build C++/WinRT without any dependency on the Windows SDK. This isn’t particularly interesting to the OS developer, but even in the OS repo it provides benefits because it does not itself include any Windows headers. Thus, a developer will typically pull in fewer or no dependencies inadvertently. This also means a dramatic reduction in the number of macros that a C++/WinRT developer must guard against. Removing the dependency on the Windows headers means that C++/WinRT is more portable and standards compliant and furthers our efforts to make it a cross-compiler and cross-platform library. It also means that the C++/WinRT headers will never be mangled by macros. If you previously relied on C++/WinRT to include various Windows headers, you will now have to include them yourself. It’s always been good practice to always include any headers you depend on explicitly and not rely on another library to include them for you.

Highlights

Support get_strong and get_weak to create delegates: This update allows a developer to use either get_strong or get_weak instead of a raw this pointer when creating a delegate pointing to a member function.

Add async cancellation callback: The most frequently requested feature for C++/WinRT’s coroutine support has been the addition of a cancellation callback.

Simplify the use of APIs expecting IBuffer parameters: Although most APIs prefer collections or arrays, enough APIs rely on IBuffer that it should be easier to use such APIs from C++. This update provides direct access to the data behind an IBuffer implementation using the same data naming convention used by the C++ standard library containers. This also avoids colliding with metadata names that conventionally begin with an uppercase letter.

Conformance: Improved support for Clang and Visual C++’s stricter conformance modes.

Improved code gen: Various improvements to reduce code size, improve inlining, and optimize factory caching.

Remove unnecessary recursion: When the command line refers to a folder rather than a specific winmd, cppwinrt will no longer search recursively for winmd files. It causes performance problems in the OS build and can lead to usage errors that are hard to diagnose when developers inadvertently cause cppwinrt to consume more winmds than expected. The cppwinrt compiler also now handles duplicates more intelligently, making it more resilient to user error and poorly-formed winmd files.

Declare both WINRT_CanUnloadNow and WINRT_GetActivationFactory in base.h: Callers don’t need to declare them directly. Their signatures have also changed, amounting to a breaking change. The declarations alleviate most of the pain of this change. The change is necessitated by the fact that C++/WinRT no longer depends on the Windows headers and this change removes the dependency on the types from the Windows headers.

Harden smart pointers: The event revokers didn’t revoke when move-assigned a new value. This lead us to take a closer look at the smart pointer classes, where we noticed that they were not reliably handling self-assignment. This is rooted in the com_ptr class template that most of the others rely on. We fixed com_ptr and updated the event revokers to handle move semantics correctly to ensure that they revoke upon assignment. The handle class template has also been hardened by the removal of the implicit constructor that made it easy to write incorrect code. This also turned bugs in the OS into compiler errors fixed in this PR.

Breaking Changes

Support for non-WinRT interfaces is disabled by default. To enable, simply #include <unknwn.h> before any C++/WinRT headers.

winrt::get_abi(winrt::hstring) now returns void* instead of HSTRING. Code requiring the HSTRING ABI can simply use a static_cast.

winrt::put_abi(winrt::hstring) returns void** instead of HSTRING*. Code requiring the HSTRING ABI can simply use a reinterpret_cast.

HRESULT is now projected as winrt::hresult. Code requiring an HRESULT can simply static_cast if you need to do type checking or support type traits, but it is otherwise convertible as long as <unknwn.h> is included first.

GUID is now projected as winrt::guid. Code implementing APIs with GUID parameters must use winrt::guid instead, but it is otherwise convertible as long as <unknwn.h> is included first.

The signatures of WINRT_CanUnloadNow and WINRT_GetActivationFactory has changed. Code must not declare these functions at all and instead include winrt/base.h to include their declarations.

The winrt::handle constructor is now explicit. Code assigning a raw handle value must call the attach method instead.

winrt::clock::from_FILETIME has been deprecated. Code should use winrt::clock::from_file_time instead.

What’s New:

MSIX Support

It’s finally here! You can now package your applications as MSIX. These applications can be installed and run on any device with 17682 build or later.

To package your application with MSIX, use the MakeAppx tool. To install the application – just click on the MSIX file. To learn more about MSIX, watch the introductory video here: link

Feedback and comments are welcome on our MSIX community: http://aka.ms/MSIXCommunity

MSIX is not currently supported by the App Certification Kit nor the Microsoft Store at this time.

MC.EXE

We’ve made some important changes to the C/C++ ETW code generation of mc.exe (Message Compiler):

The “-mof” parameter is deprecated. This parameter instructs MC.exe to generate ETW code that is compatible with Windows XP and earlier. Support for the “-mof” parameter will be removed in a future version of mc.exe.

As long as the “-mof” parameter is not used, the generated C/C++ header is now compatible with both kernel-mode and user-mode, regardless of whether “-km” or “-um” was specified on the command line. The header will use the _ETW_KM_ macro to automatically determine whether it is being compiled for kernel-mode or user-mode and will call the appropriate ETW APIs for each mode.

  • The only remaining difference between “-km” and “-um” is that the EventWrite[EventName] macros generated with “-km” have an Activity ID parameter while the EventWrite[EventName] macros generated with “-um” do not have an Activity ID parameter.

The EventWrite[EventName] macros now default to calling EventWriteTransfer (user mode) or EtwWriteTransfer (kernel mode). Previously, the EventWrite[EventName] macros defaulted to calling EventWrite (user mode) or EtwWrite (kernel mode).

  • The generated header now supports several customization macros. For example, you can set the MCGEN_EVENTWRITETRANSFER macro if you need the generated macros to call something other than EventWriteTransfer.
  • The manifest supports new attributes.
    • Event “name”: non-localized event name.
    • Event “attributes”: additional key-value metadata for an event such as filename, line number, component name, function name.
    • Event “tags”: 28-bit value with user-defined semantics (per-event).
    • Field “tags”: 28-bit value with user-defined semantics (per-field – can be applied to “data” or “struct” elements).
  • You can now define “provider traits” in the manifest (e.g. provider group). If provider traits are used in the manifest, the EventRegister[ProviderName] macro will automatically register them.
  • MC will now report an error if a localized message file is missing a string. (Previously MC would silently generate a corrupt message resource).
  • MC can now generate Unicode (utf-8 or utf-16) output with the “-cp utf-8” or “-cp utf-16” parameters.

Known Issues:

The SDK headers are generated with types in the “ABI” namespace. This is done to avoid conflicts with C++/CX and C++/WinRT clients that need to consume types directly at the ABI layer[1]. By default, types emitted by MIDL are *not* put in the ABI namespace, however this has the potential to introduce conflicts from teams attempting to consume ABI types from Windows WinRT MIDL generated headers and non-Windows WinRT MIDL generated headers (this is especially challenging if the non-Windows header references Windows types).

To ensure that developers have a consistent view of the WinRT API surface, validation has been added to the generated headers to ensure that the ABI prefix is consistent between the Windows headers and user generated headers. If you encounter an error like:

5>c:program files (x86)windows kits10include10.0.17687.0winrtwindows.foundation.h(83): error C2220: warning treated as error – no ‘object’ file generated

5>c:program files (x86)windows kits10include10.0.17687.0winrtwindows.foundation.h(83): warning C4005: ‘CHECK_NS_PREFIX_STATE’: macro redefinition

5>g:<PATH TO YOUR HEADER HERE>(41): note: see previous definition of ‘CHECK_NS_PREFIX_STATE’

It means that some of your MIDL generated headers are inconsistent with the system generated headers.

There are two ways to fix this:

  • Preferred: Compile your IDL file with the /ns_prefix MIDL command line switch. This will cause all your types to be moved to the ABI namespace consistent with the Windows headers. This may require code changes in your code however.
  • Alternate: Add #define DISABLE_NS_PREFIX_CHECKS before including the Windows headers. This will suppress the validation.

API Updates, Additions and Removals

When targeting new APIs, consider writing your app to be adaptive in order to run correctly on the widest number of Windows 10 devices. Please see Dynamically detecting features with API contracts (10 by 10) for more information.

The following APIs have been added to the platform since the release of 17134. The APIs listed below have been removed.

Additions:

 
namespace Windows.AI.MachineLearning {
  public interface ILearningModelFeatureDescriptor
  public interface ILearningModelFeatureValue
  public interface ILearningModelOperatorProvider
  public sealed class ImageFeatureDescriptor : ILearningModelFeatureDescriptor
  public sealed class ImageFeatureValue : ILearningModelFeatureValue
  public interface ITensor : ILearningModelFeatureValue
  public sealed class LearningModel : IClosable
  public sealed class LearningModelBinding : IIterable<IKeyValuePair<string, object>>, IMapView<string, object>
  public sealed class LearningModelDevice
  public enum LearningModelDeviceKind
  public sealed class LearningModelEvaluationResult
  public enum LearningModelFeatureKind
  public sealed class LearningModelSession : IClosable
  public struct MachineLearningContract
  public sealed class MapFeatureDescriptor : ILearningModelFeatureDescriptor
  public sealed class SequenceFeatureDescriptor : ILearningModelFeatureDescriptor
  public sealed class TensorBoolean : ILearningModelFeatureValue, ITensor
  public sealed class TensorDouble : ILearningModelFeatureValue, ITensor
  public sealed class TensorFeatureDescriptor : ILearningModelFeatureDescriptor
  public sealed class TensorFloat : ILearningModelFeatureValue, ITensor
  public sealed class TensorFloat16Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorInt16Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorInt32Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorInt64Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorInt8Bit : ILearningModelFeatureValue, ITensor
  public enum TensorKind
  public sealed class TensorString : ILearningModelFeatureValue, ITensor
  public sealed class TensorUInt16Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorUInt32Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorUInt64Bit : ILearningModelFeatureValue, ITensor
  public sealed class TensorUInt8Bit : ILearningModelFeatureValue, ITensor
}
namespace Windows.ApplicationModel {
  public sealed class AppInstallerInfo
  public sealed class LimitedAccessFeatureRequestResult
  public static class LimitedAccessFeatures
  public enum LimitedAccessFeatureStatus
  public sealed class Package {
    IAsyncOperation<PackageUpdateAvailabilityResult> CheckUpdateAvailabilityAsync();
    AppInstallerInfo GetAppInstallerInfo();
  }
  public enum PackageUpdateAvailability
  public sealed class PackageUpdateAvailabilityResult
}
namespace Windows.ApplicationModel.Calls {
  public sealed class VoipCallCoordinator {
    IAsyncOperation<VoipPhoneCallResourceReservationStatus> ReserveCallResourcesAsync();
  }
}
namespace Windows.ApplicationModel.Chat {
  public static class ChatCapabilitiesManager {
    public static IAsyncOperation<ChatCapabilities> GetCachedCapabilitiesAsync(string address, string transportId);
    public static IAsyncOperation<ChatCapabilities> GetCapabilitiesFromNetworkAsync(string address, string transportId);
  }
  public static class RcsManager {
    public static event EventHandler<object> TransportListChanged;
  }
}
namespace Windows.ApplicationModel.DataTransfer {
  public static class Clipboard {
    public static event EventHandler<ClipboardHistoryChangedEventArgs> HistoryChanged;
    public static event EventHandler<object> HistoryEnabledChanged;
    public static event EventHandler<object> RoamingEnabledChanged;
    public static bool ClearHistory();
    public static bool DeleteItemFromHistory(ClipboardHistoryItem item);
    public static IAsyncOperation<ClipboardHistoryItemsResult> GetHistoryItemsAsync();
    public static bool IsHistoryEnabled();
    public static bool IsRoamingEnabled();
    public static bool SetContentWithOptions(DataPackage content, ClipboardContentOptions options);
    public static SetHistoryItemAsContentStatus SetHistoryItemAsContent(ClipboardHistoryItem item);
  }
  public sealed class ClipboardContentOptions
  public sealed class ClipboardHistoryChangedEventArgs
  public sealed class ClipboardHistoryItem
  public sealed class ClipboardHistoryItemsResult
  public enum ClipboardHistoryItemsResultStatus
  public sealed class DataPackagePropertySetView : IIterable<IKeyValuePair<string, object>>, IMapView<string, object> {
    bool IsFromRoamingClipboard { get; }
    string SourceDisplayName { get; }
  }
  public enum SetHistoryItemAsContentStatus
}
namespace Windows.ApplicationModel.Store.Preview {
  public enum DeliveryOptimizationDownloadMode
  public enum DeliveryOptimizationDownloadModeSource
  public sealed class DeliveryOptimizationSettings
  public static class StoreConfiguration {
    public static bool IsPinToDesktopSupported();
    public static bool IsPinToStartSupported();
    public static bool IsPinToTaskbarSupported();
    public static void PinToDesktop(string appPackageFamilyName);
    public static void PinToDesktopForUser(User user, string appPackageFamilyName);
  }
}
namespace Windows.ApplicationModel.Store.Preview.InstallControl {
  public enum AppInstallationToastNotificationMode
  public sealed class AppInstallItem {
    AppInstallationToastNotificationMode CompletedInstallToastNotificationMode { get; set; }
    AppInstallationToastNotificationMode InstallInProgressToastNotificationMode { get; set; }
    bool PinToDesktopAfterInstall { get; set; }
    bool PinToStartAfterInstall { get; set; }
    bool PinToTaskbarAfterInstall { get; set; }
  }
  public sealed class AppInstallManager {
    bool CanInstallForAllUsers { get; }
  }
  public sealed class AppInstallOptions {
    string CampaignId { get; set; }
    AppInstallationToastNotificationMode CompletedInstallToastNotificationMode { get; set; }
    string ExtendedCampaignId { get; set; }
    bool InstallForAllUsers { get; set; }
    AppInstallationToastNotificationMode InstallInProgressToastNotificationMode { get; set; }
    bool PinToDesktopAfterInstall { get; set; }
    bool PinToStartAfterInstall { get; set; }
    bool PinToTaskbarAfterInstall { get; set; }
    bool StageButDoNotInstall { get; set; }
  }
  public sealed class AppUpdateOptions {
    bool AutomaticallyDownloadAndInstallUpdateIfFound { get; set; }
  }
}
namespace Windows.ApplicationModel.UserActivities {
  public sealed class UserActivity {
    bool IsRoamable { get; set; }
  }
}
namespace Windows.Data.Text {
  public sealed class TextPredictionGenerator {
    CoreTextInputScope InputScope { get; set; }
    IAsyncOperation<IVectorView<string>> GetCandidatesAsync(string input, uint maxCandidates, TextPredictionOptions predictionOptions, IIterable<string> previousStrings);
    IAsyncOperation<IVectorView<string>> GetNextWordCandidatesAsync(uint maxCandidates, IIterable<string> previousStrings);
  }
  public enum TextPredictionOptions : uint
}
namespace Windows.Devices.Display.Core {
  public sealed class DisplayAdapter
  public enum DisplayBitsPerChannel : uint
  public sealed class DisplayDevice
  public enum DisplayDeviceCapability
  public sealed class DisplayFence
  public sealed class DisplayManager : IClosable
  public sealed class DisplayManagerChangedEventArgs
  public sealed class DisplayManagerDisabledEventArgs
  public sealed class DisplayManagerEnabledEventArgs
  public enum DisplayManagerOptions : uint
  public sealed class DisplayManagerPathsFailedOrInvalidatedEventArgs
  public enum DisplayManagerResult
  public sealed class DisplayManagerResultWithState
  public sealed class DisplayModeInfo
  public enum DisplayModeQueryOptions : uint
  public sealed class DisplayPath
  public enum DisplayPathScaling
  public enum DisplayPathStatus
  public struct DisplayPresentationRate
  public sealed class DisplayPrimaryDescription
  public enum DisplayRotation
  public sealed class DisplayScanout
  public sealed class DisplaySource
  public sealed class DisplayState
  public enum DisplayStateApplyOptions : uint
  public enum DisplayStateFunctionalizeOptions : uint
  public sealed class DisplayStateOperationResult
  public enum DisplayStateOperationStatus
  public sealed class DisplaySurface
  public sealed class DisplayTarget
  public enum DisplayTargetPersistence
  public sealed class DisplayTask
  public sealed class DisplayTaskPool
  public enum DisplayTaskSignalKind
  public sealed class DisplayView
  public sealed class DisplayWireFormat
  public enum DisplayWireFormatColorSpace
  public enum DisplayWireFormatEotf
  public enum DisplayWireFormatHdrMetadata
  public enum DisplayWireFormatPixelEncoding
}
namespace Windows.Devices.Enumeration {
  public enum DeviceInformationKind {
    DevicePanel = 8,
  }
  public sealed class DeviceInformationPairing {
    public static bool TryRegisterForAllInboundPairingRequestsWithProtectionLevel(DevicePairingKinds pairingKindsSupported, DevicePairingProtectionLevel minProtectionLevel);
  }
}
namespace Windows.Devices.Enumeration.Pnp {
  public enum PnpObjectType {
    DevicePanel = 8,
  }
}
namespace Windows.Devices.Lights {
  public sealed class LampArray
  public enum LampArrayKind
  public sealed class LampInfo
  public enum LampPurposes : uint
}
namespace Windows.Devices.Lights.Effects {
  public interface ILampArrayEffect
  public sealed class LampArrayBitmapEffect : ILampArrayEffect
  public sealed class LampArrayBitmapRequestedEventArgs
  public sealed class LampArrayBlinkEffect : ILampArrayEffect
  public sealed class LampArrayColorRampEffect : ILampArrayEffect
  public sealed class LampArrayCustomEffect : ILampArrayEffect
  public enum LampArrayEffectCompletionBehavior
  public sealed class LampArrayEffectPlaylist : IIterable<ILampArrayEffect>, IVectorView<ILampArrayEffect>
  public enum LampArrayEffectStartMode
  public enum LampArrayRepetitionMode
  public sealed class LampArraySolidEffect : ILampArrayEffect
  public sealed class LampArrayUpdateRequestedEventArgs
}
namespace Windows.Devices.PointOfService {
  public sealed class BarcodeScannerCapabilities {
    bool IsVideoPreviewSupported { get; }
  }
  public sealed class ClaimedBarcodeScanner : IClosable {
    event TypedEventHandler<ClaimedBarcodeScanner, ClaimedBarcodeScannerClosedEventArgs> Closed;
  }
  public sealed class ClaimedBarcodeScannerClosedEventArgs
  public sealed class ClaimedCashDrawer : IClosable {
    event TypedEventHandler<ClaimedCashDrawer, ClaimedCashDrawerClosedEventArgs> Closed;
  }
  public sealed class ClaimedCashDrawerClosedEventArgs
  public sealed class ClaimedLineDisplay : IClosable {
    event TypedEventHandler<ClaimedLineDisplay, ClaimedLineDisplayClosedEventArgs> Closed;
  }
  public sealed class ClaimedLineDisplayClosedEventArgs
  public sealed class ClaimedMagneticStripeReader : IClosable {
    event TypedEventHandler<ClaimedMagneticStripeReader, ClaimedMagneticStripeReaderClosedEventArgs> Closed;
  }
  public sealed class ClaimedMagneticStripeReaderClosedEventArgs
  public sealed class ClaimedPosPrinter : IClosable {
    event TypedEventHandler<ClaimedPosPrinter, ClaimedPosPrinterClosedEventArgs> Closed;
  }
  public sealed class ClaimedPosPrinterClosedEventArgs
}
namespace Windows.Devices.PointOfService.Provider {
  public sealed class BarcodeScannerDisableScannerRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerEnableScannerRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerFrameReader : IClosable
  public sealed class BarcodeScannerFrameReaderFrameArrivedEventArgs
  public sealed class BarcodeScannerGetSymbologyAttributesRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerHideVideoPreviewRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerProviderConnection : IClosable {
    IAsyncOperation<BarcodeScannerFrameReader> CreateFrameReaderAsync();
    IAsyncOperation<BarcodeScannerFrameReader> CreateFrameReaderAsync(BitmapPixelFormat preferredFormat);
    IAsyncOperation<BarcodeScannerFrameReader> CreateFrameReaderAsync(BitmapPixelFormat preferredFormat, BitmapSize preferredSize);
  }
  public sealed class BarcodeScannerSetActiveSymbologiesRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerSetSymbologyAttributesRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerStartSoftwareTriggerRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerStopSoftwareTriggerRequest {
    IAsyncAction ReportFailedAsync(int reason);
    IAsyncAction ReportFailedAsync(int reason, string failedReasonDescription);
  }
  public sealed class BarcodeScannerVideoFrame : IClosable
}
namespace Windows.Devices.Sensors {
  public sealed class HingeAngleReading
  public sealed class HingeAngleSensor
  public sealed class HingeAngleSensorReadingChangedEventArgs
  public sealed class SimpleOrientationSensor {
    public static IAsyncOperation<SimpleOrientationSensor> FromIdAsync(string deviceId);
    public static string GetDeviceSelector();
  }
}
namespace Windows.Devices.SmartCards {
 public static class KnownSmartCardAppletIds
  public sealed class SmartCardAppletIdGroup {
    string Description { get; set; }
    IRandomAccessStreamReference Logo { get; set; }
    ValueSet Properties { get; }
    bool SecureUserAuthenticationRequired { get; set; }
  }
  public sealed class SmartCardAppletIdGroupRegistration {
    string SmartCardReaderId { get; }
    IAsyncAction SetPropertiesAsync(ValueSet props);
  }
}
namespace Windows.Devices.WiFi {
  public enum WiFiPhyKind {
    HE = 10,
  }
}
namespace Windows.Foundation {
  public static class GuidHelper
}
namespace Windows.Globalization {
  public static class CurrencyIdentifiers {
    public static string MRU { get; }
    public static string SSP { get; }
    public static string STN { get; }
    public static string VES { get; }
  }
}
namespace Windows.Graphics.Capture {
  public sealed class Direct3D11CaptureFramePool : IClosable {
    public static Direct3D11CaptureFramePool CreateFreeThreaded(IDirect3DDevice device, DirectXPixelFormat pixelFormat, int numberOfBuffers, SizeInt32 size);
  }
  public sealed class GraphicsCaptureItem {
    public static GraphicsCaptureItem CreateFromVisual(Visual visual);
  }
}
namespace Windows.Graphics.Display.Core {
  public enum HdmiDisplayHdrOption {
    DolbyVisionLowLatency = 3,
  }
  public sealed class HdmiDisplayMode {
    bool IsDolbyVisionLowLatencySupported { get; }
  }
}
namespace Windows.Graphics.Holographic {
  public sealed class HolographicCamera {
    bool IsHardwareContentProtectionEnabled { get; set; }
    bool IsHardwareContentProtectionSupported { get; }
  }
  public sealed class HolographicQuadLayerUpdateParameters {
    bool CanAcquireWithHardwareProtection { get; }
    IDirect3DSurface AcquireBufferToUpdateContentWithHardwareProtection();
  }
}
namespace Windows.Graphics.Imaging {
  public sealed class BitmapDecoder : IBitmapFrame, IBitmapFrameWithSoftwareBitmap {
    public static Guid HeifDecoderId { get; }
    public static Guid WebpDecoderId { get; }
  }
  public sealed class BitmapEncoder {
    public static Guid HeifEncoderId { get; }
  }
}
namespace Windows.Management.Deployment {
  public enum DeploymentOptions : uint {
    ForceUpdateFromAnyVersion = (uint)262144,
  }
  public sealed class PackageManager {
    IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> DeprovisionPackageForAllUsersAsync(string packageFamilyName);
  }
  public enum RemovalOptions : uint {
    RemoveForAllUsers = (uint)524288,
  }
}
namespace Windows.Media.Audio {
  public sealed class CreateAudioDeviceInputNodeResult {
    HResult ExtendedError { get; }
  }
  public sealed class CreateAudioDeviceOutputNodeResult {
    HResult ExtendedError { get; }
  }
  public sealed class CreateAudioFileInputNodeResult {
    HResult ExtendedError { get; }
  }
  public sealed class CreateAudioFileOutputNodeResult {
    HResult ExtendedError { get; }
  }
  public sealed class CreateAudioGraphResult {
    HResult ExtendedError { get; }
  }
  public sealed class CreateMediaSourceAudioInputNodeResult {
    HResult ExtendedError { get; }
  }
  public enum MixedRealitySpatialAudioFormatPolicy
  public sealed class SetDefaultSpatialAudioFormatResult
  public enum SetDefaultSpatialAudioFormatStatus
  public sealed class SpatialAudioDeviceConfiguration
  public sealed class SpatialAudioFormatConfiguration
  public static class SpatialAudioFormatSubtype
}
namespace Windows.Media.Control {
  public sealed class CurrentSessionChangedEventArgs
  public sealed class GlobalSystemMediaTransportControlsSession
  public sealed class GlobalSystemMediaTransportControlsSessionManager
  public sealed class GlobalSystemMediaTransportControlsSessionMediaProperties
  public sealed class GlobalSystemMediaTransportControlsSessionPlaybackControls
  public sealed class GlobalSystemMediaTransportControlsSessionPlaybackInfo
  public enum GlobalSystemMediaTransportControlsSessionPlaybackStatus
  public sealed class GlobalSystemMediaTransportControlsSessionTimelineProperties
  public sealed class MediaPropertiesChangedEventArgs
  public sealed class PlaybackInfoChangedEventArgs
  public sealed class SessionsChangedEventArgs
  public sealed class TimelinePropertiesChangedEventArgs
}
namespace Windows.Media.Core {
  public sealed class MediaStreamSample {
    IDirect3DSurface Direct3D11Surface { get; }
    public static MediaStreamSample CreateFromDirect3D11Surface(IDirect3DSurface surface, TimeSpan timestamp);
  }
}
namespace Windows.Media.Devices.Core {
  public sealed class CameraIntrinsics {
    public CameraIntrinsics(Vector2 focalLength, Vector2 principalPoint, Vector3 radialDistortion, Vector2 tangentialDistortion, uint imageWidth, uint imageHeight);
  }
}
namespace Windows.Media.Import {
  public enum PhotoImportContentTypeFilter {
    ImagesAndVideosFromCameraRoll = 3,
  }
  public sealed class PhotoImportItem {
    string Path { get; }
  }
}
namespace Windows.Media.MediaProperties {
  public sealed class ImageEncodingProperties : IMediaEncodingProperties {
    public static ImageEncodingProperties CreateHeif();
  }
  public static class MediaEncodingSubtypes {
    public static string Heif { get; }
  }
}
namespace Windows.Media.Protection.PlayReady {
  public static class PlayReadyStatics {
    public static IReference<DateTime> HardwareDRMDisabledAtTime { get; }
    public static IReference<DateTime> HardwareDRMDisabledUntilTime { get; }
    public static void ResetHardwareDRMDisabled();
  }
}
namespace Windows.Media.Streaming.Adaptive {
  public enum AdaptiveMediaSourceResourceType {
    MediaSegmentIndex = 5,
  }
}
namespace Windows.Networking.BackgroundTransfer {
  public enum BackgroundTransferPriority {
    Low = 2,
  }
}
namespace Windows.Networking.Connectivity {
  public sealed class ConnectionProfile {
    bool CanDelete { get; }
    IAsyncOperation<ConnectionProfileDeleteStatus> TryDeleteAsync();
  }
  public enum ConnectionProfileDeleteStatus
}
namespace Windows.Networking.NetworkOperators {
  public enum ESimOperationStatus {
    CardGeneralFailure = 13,
    ConfirmationCodeMissing = 14,
    EidMismatch = 18,
    InvalidMatchingId = 15,
    NoCorrespondingRequest = 23,
    NoEligibleProfileForThisDevice = 16,
    OperationAborted = 17,
    OperationProhibitedByProfileClass = 21,
    ProfileNotAvailableForNewBinding = 19,
    ProfileNotPresent = 22,
    ProfileNotReleasedByOperator = 20,
  }
}
namespace Windows.Perception {
  public sealed class PerceptionTimestamp {
    TimeSpan SystemRelativeTargetTime { get; }
  }
  public static class PerceptionTimestampHelper {
    public static PerceptionTimestamp FromSystemRelativeTargetTime(TimeSpan targetTime);
  }
}
namespace Windows.Perception.Spatial {
  public sealed class SpatialAnchorExporter
  public enum SpatialAnchorExportPurpose
  public sealed class SpatialAnchorExportSufficiency
  public sealed class SpatialLocation {
    Vector3 AbsoluteAngularAccelerationAxisAngle { get; }
    Vector3 AbsoluteAngularVelocityAxisAngle { get; }
  }
}
namespace Windows.Perception.Spatial.Preview {
  public static class SpatialGraphInteropPreview
}
namespace Windows.Services.Cortana {
  public sealed class CortanaActionableInsights
  public sealed class CortanaActionableInsightsOptions
}
namespace Windows.Services.Store {
  public sealed class StoreAppLicense {
    bool IsDiscLicense { get; }
  }
  public sealed class StoreContext {
    IAsyncOperation<StoreRateAndReviewResult> RequestRateAndReviewAppAsync();
    IAsyncOperation<IVectorView<StoreQueueItem>> SetInstallOrderForAssociatedStoreQueueItemsAsync(IIterable<StoreQueueItem> items);
  }
  public sealed class StoreQueueItem {
    IAsyncAction CancelInstallAsync();
    IAsyncAction PauseInstallAsync();
    IAsyncAction ResumeInstallAsync();
  }
  public sealed class StoreRateAndReviewResult
  public enum StoreRateAndReviewStatus
}
namespace Windows.Storage.Provider {
  public enum StorageProviderHydrationPolicyModifier : uint {
    AutoDehydrationAllowed = (uint)4,
  }
  public sealed class StorageProviderSyncRootInfo {
    Guid ProviderId { get; set; }
  }
}
namespace Windows.System {
  public sealed class AppUriHandlerHost
  public sealed class AppUriHandlerRegistration
  public sealed class AppUriHandlerRegistrationManager
  public static class Launcher {
    public static IAsyncOperation<bool> LaunchFolderPathAsync(string path);
    public static IAsyncOperation<bool> LaunchFolderPathAsync(string path, FolderLauncherOptions options);
    public static IAsyncOperation<bool> LaunchFolderPathForUserAsync(User user, string path);
    public static IAsyncOperation<bool> LaunchFolderPathForUserAsync(User user, string path, FolderLauncherOptions options);
  }
}
namespace Windows.System.Preview {
  public enum HingeState
  public sealed class TwoPanelHingedDevicePosturePreview
  public sealed class TwoPanelHingedDevicePosturePreviewReading
  public sealed class TwoPanelHingedDevicePosturePreviewReadingChangedEventArgs
}
namespace Windows.System.Profile {
  public enum SystemOutOfBoxExperienceState
 public static class SystemSetupInfo
  public static class WindowsIntegrityPolicy
}
namespace Windows.System.Profile.SystemManufacturers {
  public sealed class SystemSupportDeviceInfo
  public static class SystemSupportInfo {
    public static SystemSupportDeviceInfo LocalDeviceInfo { get; }
  }
}
namespace Windows.System.RemoteSystems {
  public sealed class RemoteSystem {
    IVectorView<RemoteSystemApp> Apps { get; }
  }
  public sealed class RemoteSystemApp
  public sealed class RemoteSystemAppRegistration
  public sealed class RemoteSystemConnectionInfo
  public sealed class RemoteSystemConnectionRequest {
    RemoteSystemApp RemoteSystemApp { get; }
    public static RemoteSystemConnectionRequest CreateForApp(RemoteSystemApp remoteSystemApp);
  }
  public sealed class RemoteSystemWebAccountFilter : IRemoteSystemFilter
}
namespace Windows.System.Update {
  public enum SystemUpdateAttentionRequiredReason
  public sealed class SystemUpdateItem
  public enum SystemUpdateItemState
  public sealed class SystemUpdateLastErrorInfo
  public static class SystemUpdateManager
  public enum SystemUpdateManagerState
  public enum SystemUpdateStartInstallAction
}
namespace Windows.System.UserProfile {
  public sealed class AssignedAccessSettings
}
namespace Windows.UI.Accessibility {
  public sealed class ScreenReaderPositionChangedEventArgs
  public sealed class ScreenReaderService
}
namespace Windows.UI.Composition {
  public enum AnimationPropertyAccessMode
  public sealed class AnimationPropertyInfo : CompositionObject
  public sealed class BooleanKeyFrameAnimation : KeyFrameAnimation
  public class CompositionAnimation : CompositionObject, ICompositionAnimationBase {
    void SetExpressionReferenceParameter(string parameterName, IAnimationObject source);
  }
  public enum CompositionBatchTypes : uint {
    AllAnimations = (uint)5,
    InfiniteAnimation = (uint)4,
  }
  public sealed class CompositionGeometricClip : CompositionClip
  public class CompositionGradientBrush : CompositionBrush {
    CompositionMappingMode MappingMode { get; set; }
  }
  public enum CompositionMappingMode
  public class CompositionObject : IAnimationObject, IClosable {
    void PopulatePropertyInfo(string propertyName, AnimationPropertyInfo propertyInfo);
    public static void StartAnimationGroupWithIAnimationObject(IAnimationObject target, ICompositionAnimationBase animation);
    public static void StartAnimationWithIAnimationObject(IAnimationObject target, string propertyName, CompositionAnimation animation);
  }
  public sealed class Compositor : IClosable {
    BooleanKeyFrameAnimation CreateBooleanKeyFrameAnimation();
    CompositionGeometricClip CreateGeometricClip();
    CompositionGeometricClip CreateGeometricClip(CompositionGeometry geometry);
    RedirectVisual CreateRedirectVisual();
    RedirectVisual CreateRedirectVisual(Visual source);
  }
  public interface IAnimationObject
  public sealed class RedirectVisual : ContainerVisual
}
namespace Windows.UI.Composition.Interactions {
  public sealed class InteractionSourceConfiguration : CompositionObject
  public enum InteractionSourceRedirectionMode
  public sealed class InteractionTracker : CompositionObject {
    bool IsInertiaFromImpulse { get; }
    int TryUpdatePosition(Vector3 value, InteractionTrackerClampingOption option);
    int TryUpdatePositionBy(Vector3 amount, InteractionTrackerClampingOption option);
  }
  public enum InteractionTrackerClampingOption
  public sealed class InteractionTrackerInertiaStateEnteredArgs {
    bool IsInertiaFromImpulse { get; }
  }
  public class VisualInteractionSource : CompositionObject, ICompositionInteractionSource {
    InteractionSourceConfiguration PointerWheelConfig { get; }
  }
}
namespace Windows.UI.Input.Inking {
  public enum HandwritingLineHeight
  public sealed class PenAndInkSettings
  public enum PenHandedness
}
namespace Windows.UI.Input.Inking.Preview {
  public sealed class PalmRejectionDelayZonePreview : IClosable
}
namespace Windows.UI.Notifications {
  public sealed class ScheduledToastNotificationShowingEventArgs
  public sealed class ToastNotifier {
    event TypedEventHandler<ToastNotifier, ScheduledToastNotificationShowingEventArgs> ScheduledToastNotificationShowing;
  }
}
namespace Windows.UI.Shell {
  public enum SecurityAppKind
  public sealed class SecurityAppManager
  public struct SecurityAppManagerContract
  public enum SecurityAppState
  public enum SecurityAppSubstatus
  public sealed class TaskbarManager {
    IAsyncOperation<bool> IsSecondaryTilePinnedAsync(string tileId);
    IAsyncOperation<bool> RequestPinSecondaryTileAsync(SecondaryTile secondaryTile);
    IAsyncOperation<bool> TryUnpinSecondaryTileAsync(string tileId);
  }
}
namespace Windows.UI.StartScreen {
  public sealed class StartScreenManager {
    IAsyncOperation<bool> ContainsSecondaryTileAsync(string tileId);
    IAsyncOperation<bool> TryRemoveSecondaryTileAsync(string tileId);
  }
}
namespace Windows.UI.Text {
  public sealed class RichEditTextDocument : ITextDocument {
    void ClearUndoRedoHistory();
  }
}
namespace Windows.UI.Text.Core {
  public sealed class CoreTextLayoutRequest {
    CoreTextLayoutBounds LayoutBoundsVisualPixels { get; }
  }
}
namespace Windows.UI.ViewManagement {
  public enum ApplicationViewWindowingMode {
    CompactOverlay = 3,
    Maximized = 4,
  }
}
namespace Windows.UI.ViewManagement.Core {
  public sealed class CoreInputView {
    bool TryHide();
    bool TryShow();
    bool TryShow(CoreInputViewKind type);
  }
  public enum CoreInputViewKind
}
namespace Windows.UI.WebUI {
  public sealed class BackgroundActivatedEventArgs : IBackgroundActivatedEventArgs
  public delegate void BackgroundActivatedEventHandler(object sender, IBackgroundActivatedEventArgs eventArgs);
  public sealed class NewWebUIViewCreatedEventArgs
  public static class WebUIApplication {
    public static event BackgroundActivatedEventHandler BackgroundActivated;
    public static event EventHandler<NewWebUIViewCreatedEventArgs> NewWebUIViewCreated;
  }
  public sealed class WebUIView : IWebViewControl, IWebViewControl2
}
namespace Windows.UI.Xaml {
  public class BrushTransition
  public class ColorPaletteResources : ResourceDictionary
  public class DataTemplate : FrameworkTemplate, IElementFactory {
    UIElement GetElement(ElementFactoryGetArgs args);
    void RecycleElement(ElementFactoryRecycleArgs args);
  }
  public sealed class DebugSettings {
    bool FailFastOnErrors { get; set; }
  }
  public sealed class EffectiveViewportChangedEventArgs
  public class ElementFactoryGetArgs
  public class ElementFactoryRecycleArgs
  public class FrameworkElement : UIElement {
    bool IsLoaded { get; }
    event TypedEventHandler<FrameworkElement, EffectiveViewportChangedEventArgs> EffectiveViewportChanged;
    void InvalidateViewport();
  }
  public interface IElementFactory
  public class ScalarTransition
  public class UIElement : DependencyObject, IAnimationObject {
    bool CanBeScrollAnchor { get; set; }
    public static DependencyProperty CanBeScrollAnchorProperty { get; }
    Vector3 CenterPoint { get; set; }
    ScalarTransition OpacityTransition { get; set; }
    float Rotation { get; set; }
    Vector3 RotationAxis { get; set; }
    ScalarTransition RotationTransition { get; set; }
    Vector3 Scale { get; set; }
    Vector3Transition ScaleTransition { get; set; }
    Matrix4x4 TransformMatrix { get; set; }
    Vector3 Translation { get; set; }
    Vector3Transition TranslationTransition { get; set; }
    void PopulatePropertyInfo(string propertyName, AnimationPropertyInfo propertyInfo);
    virtual void PopulatePropertyInfoOverride(string propertyName, AnimationPropertyInfo animationPropertyInfo);
    void StartAnimation(ICompositionAnimationBase animation);
    void StopAnimation(ICompositionAnimationBase animation);
  }
  public class Vector3Transition
  public enum Vector3TransitionComponents : uint
}
namespace Windows.UI.Xaml.Automation {
  public sealed class AutomationElementIdentifiers {
    public static AutomationProperty IsDialogProperty { get; }
  }
  public sealed class AutomationProperties {
    public static DependencyProperty IsDialogProperty { get; }
    public static bool GetIsDialog(DependencyObject element);
    public static void SetIsDialog(DependencyObject element, bool value);
  }
}
namespace Windows.UI.Xaml.Automation.Peers {
  public class AppBarButtonAutomationPeer : ButtonAutomationPeer, IExpandCollapseProvider {
    ExpandCollapseState ExpandCollapseState { get; }
    void Collapse();
    void Expand();
  }
  public class AutomationPeer : DependencyObject {
    bool IsDialog();
    virtual bool IsDialogCore();
  }
  public class MenuBarAutomationPeer : FrameworkElementAutomationPeer
  public class MenuBarItemAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider, IInvokeProvider
}
namespace Windows.UI.Xaml.Controls {
  public sealed class AnchorRequestedEventArgs
  public class AppBarElementContainer : ContentControl, ICommandBarElement, ICommandBarElement2
  public sealed class AutoSuggestBox : ItemsControl {
    object Description { get; set; }
    public static DependencyProperty DescriptionProperty { get; }
  }
  public enum BackgroundSizing
  public sealed class Border : FrameworkElement {
    BackgroundSizing BackgroundSizing { get; set; }
    public static DependencyProperty BackgroundSizingProperty { get; }
    BrushTransition BackgroundTransition { get; set; }
  }
  public class CalendarDatePicker : Control {
    object Description { get; set; }
    public static DependencyProperty DescriptionProperty { get; }
  }
  public class ComboBox : Selector {
    object Description { get; set; }
    public static DependencyProperty DescriptionProperty { get; }
    bool IsEditable { get; set; }
    public static DependencyProperty IsEditableProperty { get; }
    string Text { get; set; }
    Style TextBoxStyle { get; set; }
    public static DependencyProperty TextBoxStyleProperty { get; }
    public static DependencyProperty TextProperty { get; }
    event TypedEventHandler<ComboBox, ComboBoxTextSubmittedEventArgs> TextSubmitted;
  }
  public sealed class ComboBoxTextSubmittedEventArgs
  public class CommandBarFlyout : FlyoutBase
  public class ContentPresenter : FrameworkElement {
    BackgroundSizing BackgroundSizing { get; set; }
    public static DependencyProperty BackgroundSizingProperty { get; }
    BrushTransition BackgroundTransition { get; set; }
  }
  public class Control : FrameworkElement {
    BackgroundSizing BackgroundSizing { get; set; }
    public static DependencyProperty BackgroundSizingProperty { get; }
    CornerRadius CornerRadius { get; set; }
    public static DependencyProperty CornerRadiusProperty { get; }
  }
  public class DataTemplateSelector : IElementFactory {
    UIElement GetElement(ElementFactoryGetArgs args);
    void RecycleElement(ElementFactoryRecycleArgs args);
  }
  public class DatePicker : Control {
    IReference<DateTime> SelectedDate { get; set; }
    public static DependencyProperty SelectedDateProperty { get; }
    event TypedEventHandler<DatePicker, DatePickerSelectedValueChangedEventArgs> SelectedDateChanged;
  }
  public sealed class DatePickerSelectedValueChangedEventArgs
  public class DropDownButton : Button
  public class DropDownButtonAutomationPeer : ButtonAutomationPeer, IExpandCollapseProvider
  public class Frame : ContentControl, INavigate {
    bool IsNavigationStackEnabled { get; set; }
    public static DependencyProperty IsNavigationStackEnabledProperty { get; }
    bool NavigateToType(TypeName sourcePageType, object parameter, FrameNavigationOptions navigationOptions);
  }
  public class Grid : Panel {
    BackgroundSizing BackgroundSizing { get; set; }
    public static DependencyProperty BackgroundSizingProperty { get; }
  }
  public class IconSourceElement : IconElement
  public sealed class InputPropertyAttribute : Attribute
  public interface IScrollAnchorProvider
  public class MenuBar : Control
  public class MenuBarItem : Control
  public class MenuBarItemFlyout : MenuFlyout
  public class NavigationView : ContentControl {
    UIElement ContentOverlay { get; set; }
    public static DependencyProperty ContentOverlayProperty { get; }
    bool IsPaneVisible { get; set; }
    public static DependencyProperty IsPaneVisibleProperty { get; }
    NavigationViewOverflowLabelMode OverflowLabelMode { get; set; }
    public static DependencyProperty OverflowLabelModeProperty { get; }
    UIElement PaneCustomContent { get; set; }
    public static DependencyProperty PaneCustomContentProperty { get; }
    NavigationViewPaneDisplayMode PaneDisplayMode { get; set; }
    public static DependencyProperty PaneDisplayModeProperty { get; }
    UIElement PaneHeader { get; set; }
    public static DependencyProperty PaneHeaderProperty { get; }
    NavigationViewSelectionFollowsFocus SelectionFollowsFocus { get; set; }
    public static DependencyProperty SelectionFollowsFocusProperty { get; }
    NavigationViewShoulderNavigationEnabled ShoulderNavigationEnabled { get; set; }
    public static DependencyProperty ShoulderNavigationEnabledProperty { get; }
    NavigationViewTemplateSettings TemplateSettings { get; }
    public static DependencyProperty TemplateSettingsProperty { get; }
  }
  public class NavigationViewItem : NavigationViewItemBase {
    bool SelectsOnInvoked { get; set; }
    public static DependencyProperty SelectsOnInvokedProperty { get; }
  }
  public sealed class NavigationViewItemInvokedEventArgs {
    NavigationViewItemBase InvokedItemContainer { get; }
    NavigationTransitionInfo RecommendedNavigationTransitionInfo { get; }
  }
  public enum NavigationViewOverflowLabelMode
  public enum NavigationViewPaneDisplayMode
  public sealed class NavigationViewSelectionChangedEventArgs {
    NavigationTransitionInfo RecommendedNavigationTransitionInfo { get; }
    NavigationViewItemBase SelectedItemContainer { get; }
  }
  public enum NavigationViewSelectionFollowsFocus
  public enum NavigationViewShoulderNavigationEnabled
  public class NavigationViewTemplateSettings : DependencyObject
  public class Panel : FrameworkElement {
    BrushTransition BackgroundTransition { get; set; }
  }
  public sealed class PasswordBox : Control {
    bool CanPasteClipboardContent { get; }
    public static DependencyProperty CanPasteClipboardContentProperty { get; }
    object Description { get; set; }
    public static DependencyProperty DescriptionProperty { get; }
    FlyoutBase SelectionFlyout { get; set; }
    public static DependencyProperty SelectionFlyoutProperty { get; }
    void PasteFromClipboard();
  }
  public class RelativePanel : Panel {
    BackgroundSizing BackgroundSizing { get; set; }
    public static DependencyProperty BackgroundSizingProperty { get; }
  }
  public class RichEditBox : Control {
    object Description { get; set; }
    public static DependencyProperty DescriptionProperty { get; }
    FlyoutBase ProofingMenuFlyout { get; }
    public static DependencyProperty ProofingMenuFlyoutProperty { get; }
    FlyoutBase SelectionFlyout { get; set; }
    public static DependencyProperty SelectionFlyoutProperty { get; }
    RichEditTextDocument TextDocument { get; }
    event TypedEventHandler<RichEditBox, RichEditBoxSelectionChangingEventArgs> SelectionChanging;
  }
  public sealed class RichEditBoxSelectionChangingEventArgs
  public sealed class RichTextBlock : FrameworkElement {
    FlyoutBase SelectionFlyout { get; set; }
    public static DependencyProperty SelectionFlyoutProperty { get; }
    void CopySelectionToClipboard();
  }
  public sealed class ScrollContentPresenter : ContentPresenter {
    bool CanContentRenderOutsideBounds { get; set; }
    public static DependencyProperty CanContentRenderOutsideBoundsProperty { get; }
    bool SizesContentToTemplatedParent { get; set; }
    public static DependencyProperty SizesContentToTemplatedParentProperty { get; }
  }
  public sealed class ScrollViewer : ContentControl, IScrollAnchorProvider {
    bool CanContentRenderOutsideBounds { get; set; }
    public static DependencyProperty CanContentRenderOutsideBoundsProperty { get; }
    UIElement CurrentAnchor { get; }
    double HorizontalAnchorRatio { get; set; }
    public static DependencyProperty HorizontalAnchorRatioProperty { get; }
    bool ReduceViewportForCoreInputViewOcclusions { get; set; }
    public static DependencyProperty ReduceViewportForCoreInputViewOcclusionsProperty { get; }
    double VerticalAnchorRatio { get; set; }
    public static DependencyProperty VerticalAnchorRatioProperty { get; }
    event TypedEventHandler<ScrollViewer, AnchorRequestedEventArgs> AnchorRequested;
    public static bool GetCanContentRenderOutsideBounds(DependencyObject element);
    void RegisterAnchorCandidate(UIElement element);
    public static void SetCanContentRenderOutsideBounds(DependencyObject element, bool canContentRenderOutsideBounds);
    void UnregisterAnchorCandidate(UIElement element);
  }
  public class SplitButton : ContentControl
  public class SplitButtonAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider, IInvokeProvider
  public sealed class SplitButtonClickEventArgs
  public class StackPanel : Panel, IInsertionPanel, IScrollSnapPointsInfo {
    BackgroundSizing BackgroundSizing { get; set; }
    public static DependencyProperty BackgroundSizingProperty { get; }
  }
  public sealed class TextBlock : FrameworkElement {
    FlyoutBase SelectionFlyout { get; set; }
    public static DependencyProperty SelectionFlyoutProperty { get; }
    void CopySelectionToClipboard();
  }
  public class TextBox : Control {
    bool CanPasteClipboardContent { get; }
    public static DependencyProperty CanPasteClipboardContentProperty { get; }
    bool CanRedo { get; }
    public static DependencyProperty CanRedoProperty { get; }
    bool CanUndo { get; }
    public static DependencyProperty CanUndoProperty { get; }
    object Description { get; set; }
    public static DependencyProperty DescriptionProperty { get; }
    FlyoutBase ProofingMenuFlyout { get; }
    public static DependencyProperty ProofingMenuFlyoutProperty { get; }
    FlyoutBase SelectionFlyout { get; set; }
    public static DependencyProperty SelectionFlyoutProperty { get; }
    event TypedEventHandler<TextBox, TextBoxSelectionChangingEventArgs> SelectionChanging;
    void ClearUndoRedoHistory();
    void CopySelectionToClipboard();
    void CutSelectionToClipboard();
    void PasteFromClipboard();
    void Redo();
    void Undo();
  }
  public sealed class TextBoxSelectionChangingEventArgs
  public class TextCommandBarFlyout : CommandBarFlyout
  public class TimePicker : Control {
    IReference<TimeSpan> SelectedTime { get; set; }
    public static DependencyProperty SelectedTimeProperty { get; }
    event TypedEventHandler<TimePicker, TimePickerSelectedValueChangedEventArgs> SelectedTimeChanged;
  }
  public sealed class TimePickerSelectedValueChangedEventArgs
  public class ToggleSplitButton : SplitButton
  public class ToggleSplitButtonAutomationPeer : FrameworkElementAutomationPeer, IExpandCollapseProvider, IToggleProvider
  public sealed class ToggleSplitButtonIsCheckedChangedEventArgs
  public class ToolTip : ContentControl {
    IReference<Rect> PlacementRect { get; set; }
    public static DependencyProperty PlacementRectProperty { get; }
  }
  public class TreeView : Control {
    bool CanDragItems { get; set; }
    public static DependencyProperty CanDragItemsProperty { get; }
    bool CanReorderItems { get; set; }
    public static DependencyProperty CanReorderItemsProperty { get; }
    Style ItemContainerStyle { get; set; }
    public static DependencyProperty ItemContainerStyleProperty { get; }
    StyleSelector ItemContainerStyleSelector { get; set; }
    public static DependencyProperty ItemContainerStyleSelectorProperty { get; }
    TransitionCollection ItemContainerTransitions { get; set; }
    public static DependencyProperty ItemContainerTransitionsProperty { get; }
    object ItemsSource { get; set; }
    public static DependencyProperty ItemsSourceProperty { get; }
    DataTemplate ItemTemplate { get; set; }
    public static DependencyProperty ItemTemplateProperty { get; }
    DataTemplateSelector ItemTemplateSelector { get; set; }
    public static DependencyProperty ItemTemplateSelectorProperty { get; }
    event TypedEventHandler<TreeView, TreeViewDragItemsCompletedEventArgs> DragItemsCompleted;
    event TypedEventHandler<TreeView, TreeViewDragItemsStartingEventArgs> DragItemsStarting;
    DependencyObject ContainerFromItem(object item);
    DependencyObject ContainerFromNode(TreeViewNode node);
    object ItemFromContainer(DependencyObject container);
    TreeViewNode NodeFromContainer(DependencyObject container);
  }
  public sealed class TreeViewCollapsedEventArgs {
    object Item { get; }
  }
  public sealed class TreeViewDragItemsCompletedEventArgs
  public sealed class TreeViewDragItemsStartingEventArgs
  public sealed class TreeViewExpandingEventArgs {
    object Item { get; }
  }
  public class TreeViewItem : ListViewItem {
    bool HasUnrealizedChildren { get; set; }
    public static DependencyProperty HasUnrealizedChildrenProperty { get; }
    object ItemsSource { get; set; }
    public static DependencyProperty ItemsSourceProperty { get; }
  }
  public class TwoPaneView : Control
  public enum TwoPaneViewMode
  public enum TwoPaneViewPriority
  public enum TwoPaneViewTallModeConfiguration
  public enum TwoPaneViewWideModeConfiguration
  public sealed class WebView : FrameworkElement {
    event TypedEventHandler<WebView, WebViewWebResourceRequestedEventArgs> WebResourceRequested;
  }
  public sealed class WebViewWebResourceRequestedEventArgs
}
namespace Windows.UI.Xaml.Controls.Maps {
  public enum MapTileAnimationState
  public sealed class MapTileBitmapRequestedEventArgs {
    int FrameIndex { get; }
  }
  public class MapTileSource : DependencyObject {
    MapTileAnimationState AnimationState { get; }
    public static DependencyProperty AnimationStateProperty { get; }
    bool AutoPlay { get; set; }
    public static DependencyProperty AutoPlayProperty { get; }
    int FrameCount { get; set; }
    public static DependencyProperty FrameCountProperty { get; }
    TimeSpan FrameDuration { get; set; }
    public static DependencyProperty FrameDurationProperty { get; }
    void Pause();
    void Play();
    void Stop();
  }
  public sealed class MapTileUriRequestedEventArgs {
    int FrameIndex { get; }
  }
}
namespace Windows.UI.Xaml.Controls.Primitives {
  public class CommandBarFlyoutCommandBar : CommandBar
  public sealed class CommandBarFlyoutCommandBarTemplateSettings : DependencyObject
  public class FlyoutBase : DependencyObject {
    bool AreOpenCloseAnimationsEnabled { get; set; }
    public static DependencyProperty AreOpenCloseAnimationsEnabledProperty { get; }
    bool InputDevicePrefersPrimaryCommands { get; }
    public static DependencyProperty InputDevicePrefersPrimaryCommandsProperty { get; }
    bool IsOpen { get; }
    public static DependencyProperty IsOpenProperty { get; }
    FlyoutShowMode ShowMode { get; set; }
    public static DependencyProperty ShowModeProperty { get; }
    public static DependencyProperty TargetProperty { get; }
    void ShowAt(DependencyObject placementTarget, FlyoutShowOptions showOptions);
  }
  public enum FlyoutPlacementMode {
    Auto = 13,
    BottomEdgeAlignedLeft = 7,
    BottomEdgeAlignedRight = 8,
    LeftEdgeAlignedBottom = 10,
    LeftEdgeAlignedTop = 9,
    RightEdgeAlignedBottom = 12,
    RightEdgeAlignedTop = 11,
    TopEdgeAlignedLeft = 5,
    TopEdgeAlignedRight = 6,
  }
  public enum FlyoutShowMode
  public class FlyoutShowOptions
  public class NavigationViewItemPresenter : ContentControl
}
namespace Windows.UI.Xaml.Core.Direct {
  public interface IXamlDirectObject
  public sealed class XamlDirect
  public struct XamlDirectContract
  public enum XamlEventIndex
  public enum XamlPropertyIndex
  public enum XamlTypeIndex
}
namespace Windows.UI.Xaml.Hosting {
  public class DesktopWindowXamlSource : IClosable
  public sealed class DesktopWindowXamlSourceGotFocusEventArgs
  public sealed class DesktopWindowXamlSourceTakeFocusRequestedEventArgs
  public sealed class WindowsXamlManager : IClosable
  public enum XamlSourceFocusNavigationReason
  public sealed class XamlSourceFocusNavigationRequest
  public sealed class XamlSourceFocusNavigationResult
}
namespace Windows.UI.Xaml.Input {
  public sealed class CanExecuteRequestedEventArgs
  public sealed class ExecuteRequestedEventArgs
  public sealed class FocusManager {
    public static event EventHandler<GettingFocusEventArgs> GettingFocus;
    public static event EventHandler<FocusManagerGotFocusEventArgs> GotFocus;
    public static event EventHandler<LosingFocusEventArgs> LosingFocus;
    public static event EventHandler<FocusManagerLostFocusEventArgs> LostFocus;
  }
  public sealed class FocusManagerGotFocusEventArgs
  public sealed class FocusManagerLostFocusEventArgs
  public sealed class GettingFocusEventArgs : RoutedEventArgs {
    Guid CorrelationId { get; }
  }
  public sealed class LosingFocusEventArgs : RoutedEventArgs {
    Guid CorrelationId { get; }
  }
  public class StandardUICommand : XamlUICommand
  public enum StandardUICommandKind
  public class XamlUICommand : DependencyObject, ICommand
}
namespace Windows.UI.Xaml.Markup {
  public sealed class FullXamlMetadataProviderAttribute : Attribute
  public interface IXamlBindScopeDiagnostics
  public interface IXamlType2 : IXamlType
}
namespace Windows.UI.Xaml.Media {
  public class Brush : DependencyObject, IAnimationObject {
    void PopulatePropertyInfo(string propertyName, AnimationPropertyInfo propertyInfo);
    virtual void PopulatePropertyInfoOverride(string propertyName, AnimationPropertyInfo animationPropertyInfo);
  }
}
namespace Windows.UI.Xaml.Media.Animation {
  public class BasicConnectedAnimationConfiguration : ConnectedAnimationConfiguration
  public sealed class ConnectedAnimation {
    ConnectedAnimationConfiguration Configuration { get; set; }
  }
  public class ConnectedAnimationConfiguration
  public class DirectConnectedAnimationConfiguration : ConnectedAnimationConfiguration
  public class GravityConnectedAnimationConfiguration : ConnectedAnimationConfiguration
  public enum SlideNavigationTransitionEffect
  public sealed class SlideNavigationTransitionInfo : NavigationTransitionInfo {
    SlideNavigationTransitionEffect Effect { get; set; }
    public static DependencyProperty EffectProperty { get; }
  }
}
namespace Windows.UI.Xaml.Navigation {
  public class FrameNavigationOptions
}
namespace Windows.Web.UI {
  public interface IWebViewControl2
  public sealed class WebViewControlNewWindowRequestedEventArgs {
    IWebViewControl NewWindow { get; set; }
    Deferral GetDeferral();
  }
  public enum WebViewControlPermissionType {
    ImmersiveView = 6,
  }
}
namespace Windows.Web.UI.Interop {
  public sealed class WebViewControl : IWebViewControl, IWebViewControl2 {
    event TypedEventHandler<WebViewControl, object> GotFocus;
    event TypedEventHandler<WebViewControl, object> LostFocus;
    void AddInitializeScript(string script);
  }
}

Removals:


namespace Windows.Gaming.UI {
  public sealed class GameMonitor
  public enum GameMonitoringPermission
}

The post Windows 10 SDK Preview Build 17733 available now! appeared first on Windows Developer Blog.

Upgrading an existing .NET project files to the lean new CSPROJ format from .NET Core

$
0
0

Evocative random source code photoIf you've looked at csproj (C# (csharp) projects) in the past in a text editor you probably looked away quickly. They are effectively MSBuild files that orchestrate the build process. Phrased differently, a csproj file is an instance of an MSBuild file.

In Visual Studio 2017 and .NET Core 2 (and beyond) the csproj format is MUCH MUCH leaner. There's a lot of smart defaults, support for "globbing" like **/*.cs, etc and you don't need to state a bunch of obvious stuff. Truly you can take earlier msbuild/csproj files and get them down to a dozen lines of XML, plus package references. PackageReferences (references to NuGet packages) should be moved out of packages.config and into the csproj.  This lets you manage all project dependencies in one place and gives you and uncluttered view of top-level dependencies.

However, upgrading isn't as simple as "open the old project file and have VS automatically migrate you."

You have some options when migrating to .NET Core and the .NET Standard.

First, and above all, run the .NET Portability Analyzer and find out how much of your code is portable. Then you have two choices.

  • Great a new project file with something like "dotnet new classlib" and then manually get your projects building from the top (most common ancestor) project down
  • Try to use an open source 3rd party migration tool

Damian on my team recommends option one - a fresh project - as you'll learn more and avoid bringing cruft over. I agree, until there's dozens of projects, then I recommend trying a migration tool AND then comparing it to a fresh project file to avoid adding cruft. Every project/solution is different, so expect to spend some time on this.

The best way to learn this might be by watching it happen for real. Wade from Salesforce was tasked with upgrading his 4+ year old .NET Framework (Windows) based SDK to portable and open source .NET Core. He had some experience building for older versions of Mono and was thoughtful about not calling Windows-specific APIs so he knows the code is portable. However he needs to migrate the project files and structure AND get the Unit Tests running with "dotnet test" and the command line.

I figured I'd give him a head start by actually doing part of the work. It's useful to do this because, frankly, things go wrong and it's not pretty!

I started with Hans van Bakel's excellent CsProjToVS2017 global tool. It does an excellent job of getting your project 85% of the way there. To be clear, don't assume anything and not every warning will apply to you. You WILL need to go over every line of your project files, but it is an extraordinarily useful tool. If you have .NET Core 2.1, install it globally like this:

dotnet tool install Project2015To2017.Cli --global

Then its called (unfortunately) with another command "csproj-to-2017" and you can pass in a solution or an individual csproj.

After you've done the administrivia of the actual project conversion, you'll also want to make educated decisions about the 3rd party libraries you pull in. For example, if you want to make your project cross-platform BUT you depend on some library that is Windows only, why bother trying to port? Well, many of your favorite libraries DO have "netstandard" or ".NET Standard" versions. You'll see in the video below how I pull Wade's project's reference forward with a new version of JSON.NET and a new NuUnit. By the end we are building and the command line and running tests as well with code coverage.

Please head over to my YouTube and check it out. Note this happened live and spontaneously plus I had a YouTube audience giving me helpful comments, so I'll address them occasionally.

LIVE: Upgrading an older .NET SDK to .NET Core and .NET Standard

If you find things like this useful, let me know in the comments and maybe I'll do more of them. Also, do you think things like this belong on the Visual Studio Twitch Channel? Go follow my favs on Twitch CSharpFritz and Noopkat for more live coding fun!


Friend of the Blog: Want to learn more about .NET for free? Join us at DotNetConf! It's a free virtual online community conference September 12-14, 2018. Head over to https://www.dotnetconf.net to learn more and for a Save The Date Calendar Link.



© 2018 Scott Hanselman. All rights reserved.
     

AI, Machine Learning and Data Science Roundup: August 2018

$
0
0

A monthly roundup of news about Artificial Intelligence, Machine Learning and Data Science. This is an eclectic collection of interesting blog posts, software announcements and data applications I've noted over the past month or so.

Open Source AI, ML & Data Science News

ONNX Model Zoo is now available, providing a library of pre-trained state-of-the-art models in deep learning in the ONNX format.

In the 2018 IEEE Spectrum Top Programming Language rankings, Python takes the top spot and R ranks #7.

Julia 1.0 has been released, marking the stabilization of the scientific computing language and promising forwards compatibility.

A retrospective on the R Project, now in its 25th year, from Significance Magazine.

Industry News

Google announces Cloud AutoML, a beta service to train vision, text categorization, or language translation models from provided data. The fast.ai blog evaluates the claim that AutoML works without the need for machine learning skills.

Google announces Edge TPU, a hardware chip and associated software to bring AI capabilities to edge devices.

Oracle open-sources GraphPipe, a network protocol designed to simplify and standardize transmission of machine learning data between remote processes.

AWS Deep Learning AMIs now include ONNX, making it easier to deploy exported deep learning models.

Amazon Rekognition is available in two new regions: Seoul and Mumbai. The video analysis service caused a stir when the ACLU reported it matching pictures of members of Congress to a database of criminal mugshots.

RStudio introduces Package Manager, a repository management server product to organize and centralize R packages.

Data from the O'Reilly Machine Learning Adoption Survey reveal that most machine learning models are built by in-house data science or product development teams, with only 3% adopting cloud-based ML service.

Anaconda Enterprise 5.2 adds capabilities for GPU-accelerated machine learning.

Microsoft News

TechNative's review of Microsoft's AI philosophy and technologies, and the roadmap ahead.

Microsoft R Open 3.5.1 is now available.

Power BI Desktop now offers Python integration (in preview).

AI for Accessibility, a $25M Microsoft program applying artificial intelligence to help people with disabilities.

Azure SQL Database now offers reserved capacity at a discounted rate, and reservation discounts for virtual machines now apply when using differing VM sizes within a group.

Learning resources

The Chartmaker Directory, an index of dozens of data visualization types with examples in more than 30 software tools.

An overview of the benefits and limitations of FPGUs compared to CPUs and GPUs for numeric computing.

A guide to deep learning applied to natural language processing, for those new to the field.

Containerized R and Python Web services with Docker and Microsoft ML Server.

Design, architecture, and implementation of an R-based recommendation system in Azure.

A guide to distributed deep learning in Spark, using Azure Batch and Azure HDInsight.

Google's Machine Learning Guides, with machine learning tips and a guide to text classification.

Field Guide to Machine Learning, a 6-part video series from Facebook Research.

What Data Scientists Really Do, according to a Harvard Business Review article.

Survey analytics company Crunch uses R to provide a data visualization service.

Finding optimal staff composition for a professional services company, with Azure Machine Learning.

Find previous editions of the monthly AI roundup here

Top Stories from the Microsoft DevOps Community – 2018.08.17

$
0
0
Another Friday means another happy hour! No, not the time when I hit the bar after work — the time when I catch up on the news around DevOps for VSTS and Azure. Here’s what I’ve been reading (and, this week, writing!) Jekyll with VSTS and Azure I love GitHub Pages, but sometimes you need... Read More

A Microsoft DevSecOps Static Application Security Testing (SAST) Exercise

$
0
0
A Microsoft DevSecOps Static Application Security Testing (SAST) Exercise Static Application Security Testing (SAST) is a critical DevSecOps practice. As engineering organizations accelerate continuous delivery to impressive levels, it’s important to ensure that continuous security validation keeps up. To do so most effectively requires a multi-dimensional application of static analysis tools. The more customizable the... Read More
Viewing all 10804 articles
Browse latest View live


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