Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.|
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table looks very outdated. Rather than diving to fix it, I've only updated links, some of which were broken.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good @pkulikov. We have some work item to add some notes to these topics to deprecate PCL, so no need to try to fix them right now.


<a name="create_pcl"></a>
## Creating a Portable Class Library project
Expand Down Expand Up @@ -150,7 +150,7 @@ Change Targets dialog box in Visual Studio 2012
➌ Requires [Microsoft HTTP Client Libraries](https://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](https://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](https://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)).

<a name="members"></a>
## Supported types and members
Expand Down Expand Up @@ -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.

Expand All @@ -212,9 +212,9 @@ Version Information example
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.60129.0" />
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0"
<a href="https://www.microsoft.com/getsilverlight/get-started/install/"
style="text-decoration:none">
<img src=http://go.microsoft.com/fwlink/?LinkId=161376
<img src=http://download.microsoft.com/download/5/1/6/5165823D-1D79-4871-8AC2-42DDDB94A5C2/PNGs/SLMedallion_ENU.png
alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object>
Expand Down
6 changes: 3 additions & 3 deletions docs/standard/cross-platform/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ 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).<br /><br /> - Currently no Visual Basic support.<br />- You can separate platform-specific code by using #`if` statements.<br /><br /> For details, see:<br /><br /> - [Build apps that target Windows and Windows Phone by using Visual Studio](https://msdn.microsoft.com/library/windows/apps/dn609832.aspx) (MSDN article)<br />- [Using Visual Studio to build Universal XAML Apps](https://blogs.msdn.microsoft.com/visualstudio/2014/04/14/using-visual-studio-to-build-universal-xaml-apps/) (blog post)<br />- [Using Visual Studio to Build XAML Converged Apps](https://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.<br /><br /> - This approach is typically used for code that implements business logic.<br />- You can use Visual Basic or C#.<br />- API support varies by platform.<br />- 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.<br />- If needed, you can abstract out platform-specific code by using interfaces or abstract classes.<br /><br /> For details, see:<br /><br /> - [Portable Class Library](../../../docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md) (MSDN article)<br />- [How to Make Portable Class Libraries Work for You](https://blogs.msdn.microsoft.com/dsplaisted/2012/08/27/how-to-make-portable-class-libraries-work-for-you/) (blog post)<br />- [Using Portable Class Library with MVVM](../../../docs/standard/cross-platform/using-portable-class-library-with-model-view-view-model.md) (MSDN article)<br />- [App Resources for Libraries That Target Multiple Platforms](../../../docs/standard/cross-platform/app-resources-for-libraries-that-target-multiple-platforms.md) (MSDN article)<br />- [.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.<br /><br /> - This approach is typically used for code that implements business logic.<br />- You can use Visual Basic or C#.<br />- API support varies by platform.<br />- 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.<br />- If needed, you can abstract out platform-specific code by using interfaces or abstract classes.<br /><br /> For details, see:<br /><br /> - [Portable Class Library](../../../docs/standard/cross-platform/cross-platform-development-with-the-portable-class-library.md)<br />- [How to Make Portable Class Libraries Work for You](https://blogs.msdn.microsoft.com/dsplaisted/2012/08/27/how-to-make-portable-class-libraries-work-for-you/) (blog post)<br />- [Using Portable Class Library with MVVM](../../../docs/standard/cross-platform/using-portable-class-library-with-model-view-view-model.md) <br />- [App Resources for Libraries That Target Multiple Platforms](../../../docs/standard/cross-platform/app-resources-for-libraries-that-target-multiple-platforms.md) <br />- [.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.<br /><br /> - 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.<br /> 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.<br /><br /> For details, see:<br /><br /> - [Share code with Add as Link](http://msdn.microsoft.com/library/windowsphone/develop/jj714082\(v=vs.105\).aspx) (MSDN article)<br />- [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.<br /><br /> For details, see:<br /><br /> - [.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)<br />- [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md) (MSDN article)<br />- <!--zz <xref:System.IO.WindowsRuntimeStreamExtensions>--> `System.IO.WindowsRuntimeStreamExtensions` (MSDN API reference page)<br />- <!--zz <xref:System.WindowsRuntimeSystemExtensions>--> `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.<br /><br /> For details, see:<br /><br /> - [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)<br />- [Xamarin](http://xamarin.com/visual-studio) (Xamarin website)|
|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.<br /><br /> For details, see:<br /><br /> - [.NET Framework Support for Windows Store Apps and Windows Runtime](../../../docs/standard/cross-platform/support-for-windows-store-apps-and-windows-runtime.md) <br />- [Passing a URI to the Windows Runtime](../../../docs/standard/cross-platform/passing-a-uri-to-the-windows-runtime.md) <br />- <!--zz <xref:System.IO.WindowsRuntimeStreamExtensions>--> [`System.IO.WindowsRuntimeStreamExtensions`](https://msdn.microsoft.com/library/system.io.windowsruntimestreamextensions(v=vs.110).aspx) (MSDN API reference page)<br />- <!--zz <xref:System.WindowsRuntimeSystemExtensions>--> [`System.WindowsRuntimeSystemExtensions`](https://msdn.microsoft.com/library/system.windowsruntimesystemextensions(v=vs.110).aspx) (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.<br /><br /> For details, see:<br /><br /> - [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)<br />- [Xamarin documentation](/xamarin)|
|Use JavaScript and HTML for cross-platform development|**Universal App templates** in Visual Studio 2013, Update 2 to develop against Windows Runtime APIs for Windows 8.1 and Windows Phone 8.1. Currently, you can’t use JavaScript and HTML with .NET Framework APIs to develop cross-platform apps.<br /><br /> For details, see:<br /><br /> - [JavaScript Project Templates](http://msdn.microsoft.com/library/windows/apps/hh758331.aspx)<br />- [Porting a Windows Runtime app using JavaScript to Windows Phone](http://msdn.microsoft.com/library/windows/apps/dn636144.aspx)|
Original file line number Diff line number Diff line change
Expand Up @@ -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 <xref:System.ArgumentException> 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 <xref:System.Uri?displayProperty=nameWithType> in Intellisense. The <xref:System.Uri?displayProperty=nameWithType> 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 <xref:System.Uri?displayProperty=nameWithType>. 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 <xref:System.ArgumentException> exception is thrown. Here's why: When you use the [!INCLUDE[wrt](../../../includes/wrt-md.md)] in .NET Framework code, the <xref:Windows.Foundation.Uri?displayProperty=nameWithType> class appears as <xref:System.Uri?displayProperty=nameWithType> in Intellisense. The <xref:System.Uri?displayProperty=nameWithType> class allows relative URIs, but the <xref:Windows.Foundation.Uri?displayProperty=nameWithType> 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 <xref:System.Uri?displayProperty=nameWithType>. However, to users of your component, the signature includes <xref:Windows.Foundation.Uri?displayProperty=nameWithType>. 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.

Expand Down
Loading