From 6deee58eb693c2af44d5116a5d0a9d153cab8543 Mon Sep 17 00:00:00 2001 From: pkulikov Date: Mon, 2 Apr 2018 20:30:20 +0200 Subject: [PATCH 1/3] Replaced fwlinks with actual links --- ...lopment-with-the-portable-class-library.md | 16 ++++----- docs/standard/cross-platform/index.md | 2 +- .../passing-a-uri-to-the-windows-runtime.md | 2 +- ...-windows-store-apps-and-windows-runtime.md | 36 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md b/docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md index b547136f6747e..9e120d19ab188 100644 --- a/docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md +++ b/docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md @@ -33,7 +33,7 @@ The .NET Framework Portable Class Library project type in Visual Studio helps yo Visual Studio provides templates to help you develop with the Portable Class Library. Depending on which version of Visual Studio you're using, available templates and menus may vary from those described in this article. > [!WARNING] -> [Visual Studio 2013 Update 2](http://go.microsoft.com/fwlink/p/?LinkId=393658) includes updates to the Portable Class Library templates. If you have an earlier version of Visual Studio and Visual Studio 2013 installed on the same computer, and you then install Update 2, the changes to the **Target Framework** choices will be applied to both versions of Visual Studio. +> Visual Studio 2013 Update 2 includes updates to the Portable Class Library templates. If you have an earlier version of Visual Studio and Visual Studio 2013 installed on the same computer, and you then install Update 2, the changes to the **Target Framework** choices will be applied to both versions of Visual Studio. In this topic: @@ -54,10 +54,10 @@ The .NET Framework Portable Class Library project type in Visual Studio helps yo |-----------------------|---------------------------------------------------| |Visual Studio 2010, Professional, Premium, or Ultimate|Yes, when you install the [Portable Library Tools](https://marketplace.visualstudio.com/items?itemName=BCLTeam.PortableLibraryTools2).| |Visual Studio Express 2010 versions|No.| -|Visual Studio 2012 Professional, Premium, or Ultimate|Yes. For phone support, install the [Windows Phone SDK 8.0](http://go.microsoft.com/fwlink/?LinkId=265772).| +|Visual Studio 2012 Professional, Premium, or Ultimate|Yes. For Windows Phone 8.0 support, install the [Windows Phone SDK 8.0](https://www.microsoft.com/download/details.aspx?id=35471).| |Visual Studio Express 2012 versions|No.| -|Visual Studio 2013 Professional, Premium, or Ultimate|Yes. For Windows Phone 8.1 support, install [Visual Studio 2013 Update 2](http://go.microsoft.com/fwlink/p/?LinkId=393658).| -|Visual Studio Express 2013 for Windows|Yes, when you install the [latest version of Visual Studio Express](http://go.microsoft.com/fwlink/p/?LinkId=394629), which includes Update 2, or add [Visual Studio 2013 Update 2](http://go.microsoft.com/fwlink/p/?LinkId=393658).| +|Visual Studio 2013 Professional, Premium, or Ultimate|Yes. For Windows Phone 8.1 support, install the [latest version of Visual Studio 2013](https://www.visualstudio.com/vs/older-downloads/).| +|Visual Studio Community 2013 for Windows|Yes, when you install the [latest version of Visual Studio Community 2013](https://www.visualstudio.com/vs/older-downloads/), which includes Update 2.| ## Creating a Portable Class Library project @@ -150,7 +150,7 @@ Change Targets dialog box in Visual Studio 2012 ➌ Requires [Microsoft HTTP Client Libraries](http://www.nuget.org/packages/Microsoft.Net.Http) package > [!WARNING] -> You may encounter errors when you reference the [Microsoft Compression](https://www.nuget.org/packages/Microsoft.Bcl.Compression) and [Microsoft HTTP Client Libraries](http://www.nuget.org/packages/Microsoft.Net.Http) packages from a portable library used by a Windows Phone Silverlight 8.1 app. For more information, see [Platform compatibility and breaking changes for Windows Phone Silverlight 8.1 apps](http://go.microsoft.com/fwlink/p/?LinkId=394744). +> You may encounter errors when you reference the [Microsoft Compression](https://www.nuget.org/packages/Microsoft.Bcl.Compression) and [Microsoft HTTP Client Libraries](http://www.nuget.org/packages/Microsoft.Net.Http) packages from a portable library used by a Windows Phone Silverlight 8.1 app. For more information, see [Platform compatibility and breaking changes for Windows Phone Silverlight 8.1 apps](/previous-versions/windows/apps/dn642084(v=vs.105)). ## Supported types and members @@ -192,7 +192,7 @@ Version Information example When you create a Windows store or Windows Phone app that references a Portable Class Library assembly, everything you need to deploy the app is included in the app package, and no further steps are required. ### Deploying a .NET Framework app - When you deploy a .NET Framework app that references a Portable Class Library assembly, you must specify a dependency on the correct version of the .NET Framework. By specifying this dependency, you ensure that the required version is installed with your app. If you target the .NET Framework 4 or later, the computer must have the .NET Framework 4 with an [update](http://go.microsoft.com/fwlink/?LinkId=210824), Update 4.0.3 for the .NET Framework 4, or the .NET Framework 4.5 installed. + When you deploy a .NET Framework app that references a Portable Class Library assembly, you must specify a dependency on the correct version of the .NET Framework. By specifying this dependency, you ensure that the required version is installed with your app. If you target the .NET Framework 4 or later, the computer must have the .NET Framework 4 with an [update](https://www.microsoft.com/download/details.aspx?id=3556), Update 4.0.3 for the .NET Framework 4, or the .NET Framework 4.5 installed. - To create a dependency with ClickOnce deployment: In **Solution Explorer**, choose the project node for the project you want to publish. (This is the project that references the Portable Class Library project.) On the menu bar, choose **Project**, **Properties**, and then choose the **Publish** tab. On the **Publish** page, choose **Prerequisites**. Select the required .NET Framework version (or .NET Framework 4 update) as a prerequisite. @@ -212,9 +212,9 @@ Version Information example - - Get Microsoft Silverlight diff --git a/docs/standard/cross-platform/index.md b/docs/standard/cross-platform/index.md index 2b82b945da406..b42e8ab407997 100644 --- a/docs/standard/cross-platform/index.md +++ b/docs/standard/cross-platform/index.md @@ -26,7 +26,7 @@ You can develop apps for both Microsoft and non-Microsoft platforms by using the |If you want to...|Use...| |-----------------------|------------| |Share source code between Windows Phone 8.1 and Windows 8.1 apps|**Shared projects** (Universal Apps template in Visual Studio 2013, Update 2).

- Currently no Visual Basic support.
- You can separate platform-specific code by using #`if` statements.

For details, see:

- [Build apps that target Windows and Windows Phone by using Visual Studio](http://msdn.microsoft.com/library/windows/apps/dn609832.aspx) (MSDN article)
- [Using Visual Studio to build Universal XAML Apps](http://blogs.msdn.com/b/visualstudio/archive/2014/04/14/using-visual-studio-to-build-universal-xaml-apps.aspx) (blog post)
- [Using Visual Studio to Build XAML Converged Apps](http://channel9.msdn.com/Events/Build/2014/3-591) (video)| -|Share binaries between apps that target different platforms|**Portable Class Library projects** for code that is platform-agnostic.

- This approach is typically used for code that implements business logic.
- You can use Visual Basic or C#.
- API support varies by platform.
- Portable Class Library projects that target Windows 8.1 and Windows Phone 8.1 support Windows Runtime APIs and XAML. These features aren't available in older versions of the Portable Class Library.
- If needed, you can abstract out platform-specific code by using interfaces or abstract classes.

For details, see:

- [Portable Class Library](../../../docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md) (MSDN article)
- [How to Make Portable Class Libraries Work for You](http://blogs.msdn.com/b/dsplaisted/archive/2012/08/27/how-to-make-portable-class-libraries-work-for-you.aspx) (blog post)
- [Using Portable Class Library with MVVM](../../../docs/standard/cross-platform/using-portable-class-library-with-model-view-view-model.md) (MSDN article)
- [App Resources for Libraries That Target Multiple Platforms](../../../docs/standard/cross-platform/app-resources-for-libraries-that-target-multiple-platforms.md) (MSDN article)
- [.NET Portability Analyzer](http://visualstudiogallery.msdn.microsoft.com/1177943e-cfb7-4822-a8a6-e56c7905292b) (Visual Studio extension)| +|Share binaries between apps that target different platforms|**Portable Class Library projects** for code that is platform-agnostic.

- This approach is typically used for code that implements business logic.
- You can use Visual Basic or C#.
- API support varies by platform.
- Portable Class Library projects that target Windows 8.1 and Windows Phone 8.1 support Windows Runtime APIs and XAML. These features aren't available in older versions of the Portable Class Library.
- If needed, you can abstract out platform-specific code by using interfaces or abstract classes.

For details, see:

- [Cross-Platform Development with the Portable Class Library](../../../docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md)
- [How to Make Portable Class Libraries Work for You](http://blogs.msdn.com/b/dsplaisted/archive/2012/08/27/how-to-make-portable-class-libraries-work-for-you.aspx) (blog post)
- [Using Portable Class Library with MVVM](../../../docs/standard/cross-platform/using-portable-class-library-with-model-view-view-model.md)
- [App Resources for Libraries That Target Multiple Platforms](../../../docs/standard/cross-platform/app-resources-for-libraries-that-target-multiple-platforms.md)
- [.NET Portability Analyzer](http://visualstudiogallery.msdn.microsoft.com/1177943e-cfb7-4822-a8a6-e56c7905292b) (Visual Studio extension)| |Share source code between apps for platforms other than Windows 8.1 and Windows Phone 8.1|**Add as link** feature.

- This approach is suitable for app logic that's common to both apps but not portable, for some reason. You can use this feature for C# or Visual Basic code.
For example, Windows Phone 8 and Windows 8 share Windows Runtime APIs, but Portable Class Libraries do not support Windows Runtime for those platforms. You can use `Add as link` to share common Windows Runtime code between a Windows Phone 8 app and a Windows Store app that targets Windows 8.

For details, see:

- [Share code with Add as Link](http://msdn.microsoft.com/library/windowsphone/develop/jj714082\(v=vs.105\).aspx) (MSDN article)
- [How to: Add Existing Items to a Project](http://msdn.microsoft.com/library/vstudio/9f4t9t92\(v=vs.100\).aspx) (MSDN article)| |Write Windows Store apps using the .NET Framework or call Windows Runtime APIs from .NET Framework code|**Windows Runtime APIs** from your .NET Framework C# or Visual Basic code, and use the .NET Framework to create Windows Store apps. You should be aware of API differences between the two platforms. However, there are classes to help you work with those differences.

For details, see:

- [.NET Framework Support for Windows Store Apps and Windows Runtime](../../../docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md) (MSDN article)
- [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md) (MSDN article)
- `System.IO.WindowsRuntimeStreamExtensions` (MSDN API reference page)
- `System.WindowsRuntimeSystemExtensions` (MSDN API reference page)| |Build .NET Framework apps for non-Microsoft platforms|**Portable Class Library reference assemblies** in the .NET Framework, and a Visual Studio extension or third-party tool such as Xamarin.

For details, see:

- [Portable Class Library now available on all platforms.](http://blogs.msdn.com/b/dotnet/archive/2013/10/14/portable-class-library-pcl-now-available-on-all-platforms.aspx) (blog post)
- [Xamarin](http://xamarin.com/visual-studio) (Xamarin website)| diff --git a/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md b/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md index 7d7d972dbb4ca..968cdfd858390 100644 --- a/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md +++ b/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md @@ -24,7 +24,7 @@ ms.workload: - "dotnetcore" --- # Passing a URI to the Windows Runtime -Windows Runtime methods accept only absolute URIs. If you pass a relative URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, an exception is thrown. Here's why: When you use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] in .NET Framework code, the [Windows.Foundation.Uri](http://go.microsoft.com/fwlink/p/?LinkId=238376) class appears as in Intellisense. The class allows relative URIs, but the [Windows.Foundation.Uri](http://go.microsoft.com/fwlink/p/?LinkId=238376) class does not. This is also true for methods you expose in [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. If your component exposes a method that takes a URI, the signature in your code includes . However, to users of your component, the signature includes [Windows.Foundation.Uri](http://go.microsoft.com/fwlink/p/?LinkId=238376). A URI that is passed to your component must be an absolute URI. +Windows Runtime methods accept only absolute URIs. If you pass a relative URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, an exception is thrown. Here's why: When you use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] in .NET Framework code, the class appears as in Intellisense. The class allows relative URIs, but the class does not. This is also true for methods you expose in [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. If your component exposes a method that takes a URI, the signature in your code includes . However, to users of your component, the signature includes . A URI that is passed to your component must be an absolute URI. This topic shows how to detect an absolute URI and how to create one when referring to a resource in the app package. diff --git a/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md b/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md index 3a39a31e300d7..6a51aa1aaa49b 100644 --- a/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md +++ b/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md @@ -26,18 +26,18 @@ ms.workload: # .NET Framework Support for Windows Store Apps and Windows Runtime The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of software development scenarios with the [!INCLUDE[wrt](../../../includes/wrt-md.md)]. These scenarios fall into three categories: -- Developing [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps with XAML controls, as described in [Roadmap for Windows Store apps using C# or Visual Basic](http://go.microsoft.com/fwlink/p/?LinkID=242212), [Developing Windows Store apps (VB/C#/C++ and XAML)](http://go.microsoft.com/fwlink/p/?LinkId=238311), and [.NET for Windows Store apps overview](http://go.microsoft.com/fwlink/p/?LinkId=238312) in the Windows Dev Center. +- Developing [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps with XAML controls, as described in [Roadmap for Windows Store apps using C# or Visual Basic](/previous-versions/windows/apps/br229583(v=win.10)), [How tos (XAML)](/previous-versions/windows/apps/br229566(v=win.10)), and [.NET for Windows Store apps overview](https://msdn.microsoft.com/library/windows/apps/br230302%28v=VS.110%29.aspx). - Developing class libraries to use in the [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps that you create with the .NET Framework. -- Developing [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components, packaged in .WinMD files, which can be used by any programming language that supports the [!INCLUDE[wrt](../../../includes/wrt-md.md)]. For example, see [Creating Windows Runtime Components in C# and Visual Basic](http://go.microsoft.com/fwlink/p/?LinkId=238313) in the Windows Dev Center. +- Developing [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components, packaged in .WinMD files, which can be used by any programming language that supports the [!INCLUDE[wrt](../../../includes/wrt-md.md)]. For example, see [Creating Windows Runtime Components in C# and Visual Basic](https://msdn.microsoft.com/library/windows/apps/br230301(v=VS.110).aspx). This topic outlines the support that the .NET Framework provides for all three categories, and describes the scenarios for [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. The first section includes basic information about the relationship between the .NET Framework and the [!INCLUDE[wrt](../../../includes/wrt-md.md)], and explains some oddities you might encounter in the Help system and the IDE. The [second section](#WindowsRuntimeComponents) discusses scenarios for developing [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. ## The Basics The .NET Framework supports the three development scenarios listed earlier by providing [!INCLUDE[net_win8_profile](../../../includes/net-win8-profile-md.md)], and by supporting the [!INCLUDE[wrt](../../../includes/wrt-md.md)] itself. -- [.NET for Windows Store apps](http://go.microsoft.com/fwlink/p/?LinkId=247912) provides a streamlined view of the .NET Framework class libraries and include only the types and members you can use to create [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps and [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. +- [.NET for Windows Store apps](https://msdn.microsoft.com/library/windows/apps/br230232(v=vs.110).aspx) provides a streamlined view of the .NET Framework class libraries and include only the types and members you can use to create [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps and [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. - When you use Visual Studio ([!INCLUDE[vs_dev11_long](../../../includes/vs-dev11-long-md.md)] or later) to develop a [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] app or a [!INCLUDE[wrt](../../../includes/wrt-md.md)] component, a set of reference assemblies ensures that you see only the relevant types and members. @@ -45,9 +45,9 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so - Features that simply wrap the operating system API are also removed, because the [!INCLUDE[wrt](../../../includes/wrt-md.md)] is easy to call from managed code. - To read more about the [!INCLUDE[net_win8_profile](../../../includes/net-win8-profile-md.md)], see the [.NET for Windows Store apps overview](http://go.microsoft.com/fwlink/p/?LinkId=238312) in the Windows Dev Center.To read about the API selection process, see the [.NET for Windows Store apps](http://go.microsoft.com/fwlink/p/?LinkId=251061) entry in the .NET blog. + To read more about the [!INCLUDE[net_win8_profile](../../../includes/net-win8-profile-md.md)], see the [.NET for Windows Store apps overview](https://msdn.microsoft.com/library/windows/apps/br230302(v=VS.110).aspx). To read about the API selection process, see the [.NET for Metro style apps](https://blogs.msdn.microsoft.com/dotnet/2012/04/17/net-for-metro-style-apps/) entry in the .NET blog. -- The [Windows Runtime](http://go.microsoft.com/fwlink/p/?LinkId=238319) provides the user interface elements for building [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps, and provides access to operating system features. Like the .NET Framework, the [!INCLUDE[wrt](../../../includes/wrt-md.md)] has metadata that enables the C# and Visual Basic compilers to use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] the way they use the .NET Framework class libraries. The .NET Framework makes it easier to use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] by hiding some differences: +- The [Windows Runtime](/uwp/api/) provides the user interface elements for building [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps, and provides access to operating system features. Like the .NET Framework, the [!INCLUDE[wrt](../../../includes/wrt-md.md)] has metadata that enables the C# and Visual Basic compilers to use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] the way they use the .NET Framework class libraries. The .NET Framework makes it easier to use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] by hiding some differences: - Some differences in programming patterns between the .NET Framework and the [!INCLUDE[wrt](../../../includes/wrt-md.md)], such as the pattern for adding and removing event handlers, are hidden. You simply use the .NET Framework pattern. @@ -57,13 +57,13 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so ### The .NET Framework and the [!INCLUDE[wrt](../../../includes/wrt-md.md)] Reference Documentation - The Windows and the .NET Framework documentation sets are separate. If you press F1 to display Help on a type or member, reference documentation from the appropriate set is displayed. However, if you browse through the [Windows Runtime reference](http://go.microsoft.com/fwlink/p/?LinkId=238319) you might encounter examples that seem puzzling: + The Windows Runtime and the .NET Framework documentation sets are separate. If you press F1 to display Help on a type or member, reference documentation from the appropriate set is displayed. However, if you browse through the [Windows Runtime reference](/uwp/api/) you might encounter examples that seem puzzling: -- Topics such as the [IIterable interface](http://go.microsoft.com/fwlink/p/?LinkId=238321) don't have declaration syntax for Visual Basic or C#. Instead, a note appears above the syntax section (in this case, ".NET: This interface appears as System.Collections.Generic.IEnumerable\"). This is because the .NET Framework and the [!INCLUDE[wrt](../../../includes/wrt-md.md)] provide similar functionality with different interfaces. In addition, there are behavioral differences: `IIterable` has a `First` method instead of a method to return the enumerator. Instead of forcing you to learn a different way of performing a common task, the .NET Framework supports the [!INCLUDE[wrt](../../../includes/wrt-md.md)] by making your managed code appear to use the type you're familiar with. You won't see the `IIterable` interface in the IDE, and therefore the only way you'll encounter it in the [!INCLUDE[wrt](../../../includes/wrt-md.md)] reference documentation is by browsing through that documentation directly. +- Topics such as the interface don't have declaration syntax for Visual Basic or C#. Instead, a note appears above the syntax section (in this case, ".NET: This interface appears as System.Collections.Generic.IEnumerable\"). This is because the .NET Framework and the [!INCLUDE[wrt](../../../includes/wrt-md.md)] provide similar functionality with different interfaces. In addition, there are behavioral differences: `IIterable` has a `First` method instead of a method to return the enumerator. Instead of forcing you to learn a different way of performing a common task, the .NET Framework supports the [!INCLUDE[wrt](../../../includes/wrt-md.md)] by making your managed code appear to use the type you're familiar with. You won't see the `IIterable` interface in the IDE, and therefore the only way you'll encounter it in the [!INCLUDE[wrt](../../../includes/wrt-md.md)] reference documentation is by browsing through that documentation directly. -- The [SyndicationFeed constructor](http://go.microsoft.com/fwlink/p/?LinkId=238322) documentation illustrates a closely related issue: Its parameter types appear to be different for different languages. For C# and Visual Basic, the parameter types are and . Again, this is because the .NET Framework has its own `String` and `Uri` types, and for such commonly used types it doesn't make sense to force .NET Framework users to learn a different way of doing things. In the IDE, the .NET Framework hides the corresponding [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. +- The documentation illustrates a closely related issue: Its parameter types appear to be different for different languages. For C# and Visual Basic, the parameter types are and . Again, this is because the .NET Framework has its own `String` and `Uri` types, and for such commonly used types it doesn't make sense to force .NET Framework users to learn a different way of doing things. In the IDE, the .NET Framework hides the corresponding [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. -- In a few cases, such as the [Windows.UI.Xaml.GridLength](http://go.microsoft.com/fwlink/p/?LinkId=251059) structure, the .NET Framework provides a type with the same name but more functionality. For example, a set of constructor and property topics are associated with `GridLength`, but they have syntax blocks only for Visual Basic and C# because the members are available only in managed code. In the [!INCLUDE[wrt](../../../includes/wrt-md.md)], structures have only fields. The [!INCLUDE[wrt](../../../includes/wrt-md.md)] structure requires a helper class, [Windows.UI.Xaml.GridLengthHelper](http://go.microsoft.com/fwlink/p/?LinkId=251060), to provide equivalent functionality. You won't see that helper class in the IDE when you're writing managed code. +- In a few cases, such as the structure, the .NET Framework provides a type with the same name but more functionality. For example, a set of constructor and property topics are associated with `GridLength`, but they have syntax blocks only for Visual Basic and C# because the members are available only in managed code. In the [!INCLUDE[wrt](../../../includes/wrt-md.md)], structures have only fields. The [!INCLUDE[wrt](../../../includes/wrt-md.md)] structure requires a helper class, , to provide equivalent functionality. You won't see that helper class in the IDE when you're writing managed code. - In the IDE, [!INCLUDE[wrt](../../../includes/wrt-md.md)] types appear to derive from . They appear to have members inherited from , such as . These members operate as they would if the types actually inherited from , and [!INCLUDE[wrt](../../../includes/wrt-md.md)] types can be cast to . This functionality is part of the support that the .NET Framework provides for the [!INCLUDE[wrt](../../../includes/wrt-md.md)]. However, if you view the types in the [!INCLUDE[wrt](../../../includes/wrt-md.md)] reference documentation, no such members appear. The documentation for these apparent inherited members is provided by the reference documentation. @@ -89,7 +89,7 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so The way interfaces appear in managed code affects the way types that implement these interfaces appear. For example, the `PropertySet` class implements `IMap`, which appears in managed code as `IDictionary`. `PropertySet` appears as if it implemented `IDictionary` instead of `IMap`, so in managed code it appears to have an `Add` method, which behaves like the `Add` method on .NET Framework dictionaries. It doesn't appear to have an `Insert` method. - For more information about using the .NET Framework to create a [!INCLUDE[wrt](../../../includes/wrt-md.md)] component, and a walkthrough that shows how to use such a component with JavaScript, see [Creating Windows Runtime Components in C# and Visual Basic](http://go.microsoft.com/fwlink/p/?LinkId=238313) in the Windows Dev Center. + For more information about using the .NET Framework to create a [!INCLUDE[wrt](../../../includes/wrt-md.md)] component, and a walkthrough that shows how to use such a component with JavaScript, see [Creating Windows Runtime Components in C# and Visual Basic](https://msdn.microsoft.com/library/windows/apps/br230301%28v=VS.110%29.aspx). ### Primitive Types To enable the natural use of the [!INCLUDE[wrt](../../../includes/wrt-md.md)] in managed code, .NET Framework primitive types appear instead of [!INCLUDE[wrt](../../../includes/wrt-md.md)] primitive types in your code. In the .NET Framework, primitive types like the `Int32` structure have many useful properties and methods, such as the `Int32.TryParse` method. By contrast, primitive types and structures in the [!INCLUDE[wrt](../../../includes/wrt-md.md)] have only fields. When you use primitives in managed code, they appear to be .NET Framework types, and you can use the properties and methods of the .NET Framework types as you normally would. The following list provides a summary: @@ -109,7 +109,7 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so Other basic, commonly used [!INCLUDE[wrt](../../../includes/wrt-md.md)] types that appear in managed code as their .NET Framework equivalents include the `Windows.Foundation.DateTime` structure, which appears in managed code as the structure, and the `Windows.Foundation.TimeSpan` structure, which appears as the structure. ### Other Differences - In a few cases, the fact that .NET Framework types appear in your code instead of [!INCLUDE[wrt](../../../includes/wrt-md.md)] types requires action on your part. For example, the [Windows.Foundation.Uri](http://go.microsoft.com/fwlink/p/?LinkId=238376) class appears as in .NET Framework code. allows a relative URI, but [Windows.Foundation.Uri](http://go.microsoft.com/fwlink/p/?LinkId=238376) requires an absolute URI. Therefore, when you pass a URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, you must ensure that it's absolute. (See [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md).) + In a few cases, the fact that .NET Framework types appear in your code instead of [!INCLUDE[wrt](../../../includes/wrt-md.md)] types requires action on your part. For example, the class appears as in .NET Framework code. allows a relative URI, but requires an absolute URI. Therefore, when you pass a URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, you must ensure that it's absolute. (See [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md).) ## Scenarios for Developing Windows Runtime Components @@ -127,9 +127,9 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so > [!NOTE] > If your component will be used only with C# or Visual Basic, there's no reason to make it a [!INCLUDE[wrt](../../../includes/wrt-md.md)] component. If you make it an ordinary .NET Framework class library instead, you don't have to restrict its public API surface to [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. -- You can release versions of reusable components by using the [!INCLUDE[wrt](../../../includes/wrt-md.md)][VersionAttribute](http://go.microsoft.com/fwlink/p/?LinkId=238563) attribute to identify which types (and which members within a type) were added in different versions. +- You can release versions of reusable components by using the [!INCLUDE[wrt](../../../includes/wrt-md.md)] attribute to identify which types (and which members within a type) were added in different versions. -- The types in your component can derive from [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. Controls can derive from the primitive control types in the [Windows.UI.Xaml.Controls.Primitives](http://go.microsoft.com/fwlink/p/?LinkId=238564) namespace or from more finished controls such as [Button](http://go.microsoft.com/fwlink/p/?LinkId=238565). +- The types in your component can derive from [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. Controls can derive from the primitive control types in the namespace or from more finished controls such as . > [!IMPORTANT] > Starting with [!INCLUDE[win8](../../../includes/win8-md.md)] and the [!INCLUDE[net_v45](../../../includes/net-v45-md.md)], all public types in a managed [!INCLUDE[wrt](../../../includes/wrt-md.md)] component must be sealed. A type in another [!INCLUDE[wrt](../../../includes/wrt-md.md)] component can't derive from them. If you want to provide polymorphic behavior in your component, you can create an interface and implement it in the polymorphic types. @@ -142,7 +142,7 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so When you develop a [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] app for Windows using JavaScript, you might find that some parts of the application logic perform better in managed code, or are easier to develop. JavaScript can't use .NET Framework class libraries directly, but you can make the class library a .WinMD file. In this scenario, the [!INCLUDE[wrt](../../../includes/wrt-md.md)] component is an integral part of the app, so it doesn't make sense to provide version attributes. ### Reusable [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] UI Controls - You can package a set of related UI controls in a reusable [!INCLUDE[wrt](../../../includes/wrt-md.md)] component. The component can be marketed on its own or used as an element in the apps you create. In this scenario, it makes sense to use the [!INCLUDE[wrt](../../../includes/wrt-md.md)][VersionAttribute](http://go.microsoft.com/fwlink/p/?LinkId=238563) attribute to improve compatibility. + You can package a set of related UI controls in a reusable [!INCLUDE[wrt](../../../includes/wrt-md.md)] component. The component can be marketed on its own or used as an element in the apps you create. In this scenario, it makes sense to use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] attribute to improve compatibility. ### Reusable Application Logic from Existing .NET Framework Apps You can package managed code from your existing desktop apps as a standalone [!INCLUDE[wrt](../../../includes/wrt-md.md)] component. This enables you to use the component in [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps built using C++ or JavaScript, as well as in [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps built using C# or Visual Basic. Versioning is an option if there are multiple reuse scenarios for the code. @@ -151,9 +151,9 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so |Title|Description| |-----------|-----------------| -|[.NET for Windows Store apps overview](http://go.microsoft.com/fwlink/p/?LinkId=238312)|Describes the .NET Framework types and members that you can use to create [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps and [!INCLUDE[wrt](../../../includes/wrt-md.md)]Components. (In the Windows Dev Center.)| -|[Roadmap for Windows Store apps using C# or Visual Basic](http://go.microsoft.com/fwlink/p/?LinkId=242212)|Provides key resources to help you get started developing [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps by using C# or Visual Basic, including many Quickstart topics, guidelines, and best practices. (In the Windows Dev Center.)| -|[Developing Windows Store apps (VB/C#/C++ and XAML)](http://go.microsoft.com/fwlink/p/?LinkId=238311)|Provides key resources to help you get started developing [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps by using C# or Visual Basic, including many Quickstart topics, guidelines, and best practices. (In the Windows Dev Center.)| -|[Creating Windows Runtime Components in C# and Visual Basic](http://go.microsoft.com/fwlink/p/?LinkId=238313)|Describes how to create a [!INCLUDE[wrt](../../../includes/wrt-md.md)] component using the .NET Framework, explains how to use it as part of a [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] app built for Windows using JavaScript, and describes how to debug the combination with Visual Studio. (In the Windows Dev Center.)| +|[.NET for Windows Store apps overview](https://msdn.microsoft.com/library/windows/apps/br230302(v=VS.110).aspx)|Describes the .NET Framework types and members that you can use to create [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps and [!INCLUDE[wrt](../../../includes/wrt-md.md)]Components. (In the Windows Dev Center.)| +|[Roadmap for Windows Store apps using C# or Visual Basic](/previous-versions/windows/apps/br229583(v=win.10))|Provides key resources to help you get started developing [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps by using C# or Visual Basic, including many Quickstart topics, guidelines, and best practices. (In the Windows Dev Center.)| +|[How tos (XAML)](/previous-versions/windows/apps/br229566(v=win.10))|Provides key resources to help you get started developing [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] apps by using C# or Visual Basic, including many Quickstart topics, guidelines, and best practices. (In the Windows Dev Center.)| +|[Creating Windows Runtime Components in C# and Visual Basic](https://msdn.microsoft.com/library/windows/apps/br230301%28v=VS.110%29.aspx)|Describes how to create a [!INCLUDE[wrt](../../../includes/wrt-md.md)] component using the .NET Framework, explains how to use it as part of a [!INCLUDE[win8_appname_long](../../../includes/win8-appname-long-md.md)] app built for Windows using JavaScript, and describes how to debug the combination with Visual Studio. (In the Windows Dev Center.)| |[Windows Runtime reference](/uwp/api/)|The reference documentation for the [!INCLUDE[wrt](../../../includes/wrt-md.md)]. (In the Windows Dev Center.)| |[Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md)|Describes an issue that can arise when you pass a URI from managed code to the [!INCLUDE[wrt](../../../includes/wrt-md.md)], and how to avoid it.| From 59a07a476e7b21cda2a52c93823143a83eaa4273 Mon Sep 17 00:00:00 2001 From: pkulikov Date: Tue, 17 Apr 2018 19:26:22 +0200 Subject: [PATCH 2/3] Added full type name for Windows.Foundation.Uri --- .../cross-platform/passing-a-uri-to-the-windows-runtime.md | 2 +- .../support-for-windows-store-apps-and-windows-runtime.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md b/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md index 968cdfd858390..7343c61ca2cf8 100644 --- a/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md +++ b/docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md @@ -24,7 +24,7 @@ ms.workload: - "dotnetcore" --- # Passing a URI to the Windows Runtime -Windows Runtime methods accept only absolute URIs. If you pass a relative URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, an exception is thrown. Here's why: When you use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] in .NET Framework code, the class appears as in Intellisense. The class allows relative URIs, but the class does not. This is also true for methods you expose in [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. If your component exposes a method that takes a URI, the signature in your code includes . However, to users of your component, the signature includes . A URI that is passed to your component must be an absolute URI. +Windows Runtime methods accept only absolute URIs. If you pass a relative URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, an exception is thrown. Here's why: When you use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] in .NET Framework code, the class appears as in Intellisense. The class allows relative URIs, but the class does not. This is also true for methods you expose in [!INCLUDE[wrt](../../../includes/wrt-md.md)] Components. If your component exposes a method that takes a URI, the signature in your code includes . However, to users of your component, the signature includes . A URI that is passed to your component must be an absolute URI. This topic shows how to detect an absolute URI and how to create one when referring to a resource in the app package. diff --git a/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md b/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md index 6a51aa1aaa49b..bf003b56b8ff8 100644 --- a/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md +++ b/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md @@ -109,7 +109,7 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so Other basic, commonly used [!INCLUDE[wrt](../../../includes/wrt-md.md)] types that appear in managed code as their .NET Framework equivalents include the `Windows.Foundation.DateTime` structure, which appears in managed code as the structure, and the `Windows.Foundation.TimeSpan` structure, which appears as the structure. ### Other Differences - In a few cases, the fact that .NET Framework types appear in your code instead of [!INCLUDE[wrt](../../../includes/wrt-md.md)] types requires action on your part. For example, the class appears as in .NET Framework code. allows a relative URI, but requires an absolute URI. Therefore, when you pass a URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, you must ensure that it's absolute. (See [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md).) + In a few cases, the fact that .NET Framework types appear in your code instead of [!INCLUDE[wrt](../../../includes/wrt-md.md)] types requires action on your part. For example, the class appears as in .NET Framework code. allows a relative URI, but requires an absolute URI. Therefore, when you pass a URI to a [!INCLUDE[wrt](../../../includes/wrt-md.md)] method, you must ensure that it's absolute. (See [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md).) ## Scenarios for Developing Windows Runtime Components From 43659df7c3adde05af7ca3885b6431538cb5090d Mon Sep 17 00:00:00 2001 From: pkulikov Date: Thu, 19 Apr 2018 20:36:58 +0200 Subject: [PATCH 3/3] Addressed feedback --- .../support-for-windows-store-apps-and-windows-runtime.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md b/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md index bf003b56b8ff8..101e3efed5c7c 100644 --- a/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md +++ b/docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md @@ -61,7 +61,7 @@ The [!INCLUDE[net_v45](../../../includes/net-v45-md.md)] supports a number of so - Topics such as the interface don't have declaration syntax for Visual Basic or C#. Instead, a note appears above the syntax section (in this case, ".NET: This interface appears as System.Collections.Generic.IEnumerable\"). This is because the .NET Framework and the [!INCLUDE[wrt](../../../includes/wrt-md.md)] provide similar functionality with different interfaces. In addition, there are behavioral differences: `IIterable` has a `First` method instead of a method to return the enumerator. Instead of forcing you to learn a different way of performing a common task, the .NET Framework supports the [!INCLUDE[wrt](../../../includes/wrt-md.md)] by making your managed code appear to use the type you're familiar with. You won't see the `IIterable` interface in the IDE, and therefore the only way you'll encounter it in the [!INCLUDE[wrt](../../../includes/wrt-md.md)] reference documentation is by browsing through that documentation directly. -- The documentation illustrates a closely related issue: Its parameter types appear to be different for different languages. For C# and Visual Basic, the parameter types are and . Again, this is because the .NET Framework has its own `String` and `Uri` types, and for such commonly used types it doesn't make sense to force .NET Framework users to learn a different way of doing things. In the IDE, the .NET Framework hides the corresponding [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. +- The documentation illustrates a closely related issue: Its parameter types appear to be different for different languages. For C# and Visual Basic, the parameter types are and . Again, this is because the .NET Framework has its own `String` and `Uri` types, and for such commonly used types it doesn't make sense to force .NET Framework users to learn a different way of doing things. In the IDE, the .NET Framework hides the corresponding [!INCLUDE[wrt](../../../includes/wrt-md.md)] types. - In a few cases, such as the structure, the .NET Framework provides a type with the same name but more functionality. For example, a set of constructor and property topics are associated with `GridLength`, but they have syntax blocks only for Visual Basic and C# because the members are available only in managed code. In the [!INCLUDE[wrt](../../../includes/wrt-md.md)], structures have only fields. The [!INCLUDE[wrt](../../../includes/wrt-md.md)] structure requires a helper class, , to provide equivalent functionality. You won't see that helper class in the IDE when you're writing managed code.