Your extension will be available shortly on the Visual Studio Marketplace at this link.

Portable Library Tools 2

Microsoft Free

Provides tools for Visual Studio 2010 for creating class libraries that run on Windows, Silverlight, Windows Phone and Xbox 360.

4.5 Star
Visual Studio
Download (96,071)
E-mail Twitter Digg Facebook
Add to favorites
Sign in to write a review
Sort by:

4 Star
by GansTver | February 28 2016


3 Star
by Yoru No Tori | September 18 2013

I ve got Visual studio 2012, would be nice to have this tool for this version of the software... :O please???

5 Star
by Kiếm Tiên - Diệp Nhược Ca | January 02 2013

Microsoft Visual Studio 2010 (with SP1) must be installed before installing Portable Library Tools 2 for Visual Studio 2010.
But I installed Microsoft Visual Studio 2010 SP1. What is problem?

4 Star
by Caio Vilas Boas | December 07 2012

Works great, but would be nice to have Silverlight support.

4 Star
by modalove | September 18 2012

Amazing Tool! but -1 for testability.
Thank you so much

4 Star
by rick.duarte-br | September 12 2012

System.ComponentModel.DataAnnotations is not available for Windows Phone.

5 Star
by Jonas Kello | July 24 2012

Perfect! Now we can use the FieldOffset attribute! Thank you for releasing this!

5 Star
by Another Developer Guy | July 18 2012

This is probably the most useful tool that I have ever used. I hate cluttering my code #if. Keep up the excellent work!

This can support assembly sharing for all the major platforms Android/Silverlight/iOS/WP/Metro/.NET/Xbox. Developer's paradise!

5 Star
by Lidan Hackmon | May 26 2012

Amazing tool. Still, there are some missing objects.
ObservableCollection (cannot be shared with PC .Net 4)

The latest release contains ObservableCollection! This is awesome!
I'm actually able to share the same project between Windows Phone, PC and WCF service of the same application.

Thumbs up BCL Team.

5 Star
by The Thinker | May 19 2012


5 Star
by George Danila | May 13 2012

Excelent :D

5 Star
by Brian Swiger | March 19 2012

Great addition that was desperately needed for multi-platform. It's not perfect yet, but is a great stride forward to delivering a cross-platform runtime. Please keep adding namespaces such as the new ones introduced in .NET 4 and 4.5. Thank you!

4 Star
by Mike Feng | March 07 2012

It is great tool, but as the other said, please add the namespace System.XML.Linq and System.ComponentModel.DataAnnotations.dll since they are available in new .net framework.

BCL Team May 09 2012
| Edit |

The new update includes support for these, when targeting platforms that support it (.NET 4.0.3, Silverlight, Phone and .NET for Metro style apps).

5 Star
by Daniel B Holt | February 25 2012

4 Star
by Xperiandri | January 04 2012

Could you add Silvelight 5 support?

5 Star
by Zverev Eugene | December 19 2011

Extremelly needed tool.

5 Star
by MikeBMcL | November 20 2011

This is an extremely useful tool. It has helped me a lot when designing data models for projects where the target platforms have not yet been finalized and where leaving open the option to add additional platforms in the future is desirable.

2 Star
by Jonathan Allen | November 14 2011

I love the idea, but as it stands I can't use it. At the very least I need "View Model Support" across .NET, Silverlight, and Windows Phone.

BCL Team May 09 2012
| Edit |

In the latest update, support for sharing View Model is available between .NET 4.5 and the other platforms.

3 Star
by ealbert1 | September 19 2011

For the purpose of validating the Models/Dtos both in the UI and server side, it would be beneficial if IDataErrorInfo is available.

5 Star
by Jozef Izso | September 14 2011

1 - 20 of 26 Items   
Sign in to start a discussion

  • SynchronizationContext.SetSynchronizationContext
    4 Posts | Last post November 05, 2012
    • Love the tool!
      I'm using the VS2012 portable libraries as supplemented by WP8. The titular member is supported by all platforms except XBox. In particular, it's supported on these platforms but not by portable libraries on these platforms: net40, net403, sl4, sl5, wp70, wp71. It *is* included for portable libraries on these platforms: net45, win8, wp8.
      Could you add it to the earlier platforms as well? They already have SynchronizationContext, but I need SetSynchronizationContext in particular.
    • While "present" on Phone 7.x and Silverlight, it's not callable by user code because its "security critical". We do make it available, however, when targeting .NET 4.5, Phone 8 and Windows Store apps.
    • How about net4?
    • Unfortunately, we didn't support it for 4.0, but I filed a bug to add support for it.
  • Targeting problems with MS.Bcl.Async
    4 Posts | Last post November 05, 2012
    • (VS2012/Win7x64 with KB2468871)
      If I install Microsoft.Bcl.Async version 1.0.12-beta (and its dependency Microsoft.Bcl version 1.0.11-beta) into a new .NET 4.0 (or .NET 4.0.3) class library, I get warnings like:
      The primary reference "Microsoft.Threading.Tasks" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0.3". To resolve this problem, either remove the reference "Microsoft.Threading.Tasks" or retarget your application to a framework version which contains "System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
      If I attempt to use TaskEx, then these warnings cause an actual error.
      Also, if I have a class library that is SL4 using MS.Bcl.Async, or if I have a class library targeting net40 or sl4 that references a pcl using MS.Bcl.Async, then I get warnings like this:
      Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "" [...\Test\bin\Release\System.Runtime.dll] to Version "" [...\packages\Microsoft.Bcl.1.0.11-beta\lib\sl4\System.Runtime.dll] to solve conflict and get rid of warning.
      C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
      These warnings then cause the first warning/error when those libraries are used by a platform-specific library (net40 or sl4).
    • See:
    • Thanks! For some strange reason, I was thinking app.config had no effect on library projects...
      I'm still getting warning MSB3247 (with no details) on the SL4 targets. Can this be safely ignored?
    • With regards to the Silverlight warning, can you go to the output window and paste the text around the MSB3247 warning? MSBuild will output the assemblies that are the cause. It's likely that a lack of an App.Config is also the problem.
  • VB Modules and WP8
    3 Posts | Last post November 01, 2012
    • I just tried extending my portable class library from .Net 4.5 and .Net Store Apps to include WP8 and now have a whole bunch of VB language related issues. Whilst I can work around some easily enough, it looks like I can't use Modules. That's not a big issue by itself, but it seems to take Extension Methods down with it. Not being able to use the = sign with strings also seems a bit dodgy.
      I'm beginning to wonder if the WP8 SDK actually installed properly. I might test it on another machine...
    • Apologies for the inconvenience. We shipped a bug in the VB template that prevents this from working when targeting just those three platforms. You can workaround it by opening the project file in a text editor (Right-click -> Unload, Right-click -> Edit) and adding <VBRuntime>Embed</VBRuntime> just under the <ProjectTypeGuids> element.
    • Thanks David, that did the trick.
  • CallerMemberNameAttribute
    3 Posts | Last post November 01, 2012
    • It's not official but the Silverlight 5 compiler *does* already support automatically looking up caller members to alleviate implementing INotifyPropertyChanged.
      You'd have to add the class System.Runtime.CompilerServices.CallerMemberNameAttribute manually in your library, believe it or not!
      Weird. So, would be nice if the Portable Class Library would support this and provide the class out-of-the-box and officially.
    • Thanks for the suggestion. If you wait a couple of more days, your wish will be granted. :) Keep a watch out for the async update that we talk about here: This will include CallMemberNameAttribute support.
    • We added this support in the package available from here:
  • When Will Portable Library Tools 2 RTM?
    4 Posts | Last post September 21, 2012
    • They've been RC stage for a month, and Visual Studio 2012 which uses the newer portable libraries has already released. Due to policy I can't use them until ther are officially released so I'm stuck on the old Portable Library tools which aren't even available from Microsoft anymore.
    • Yes, they will RTM soon.
    • Any update? It's been almost a month.
    • We've uploaded the RTM.
  • Removing Expect: 100-Continue header from HttpWebRequest POST
    1 Posts | Last post September 16, 2012
    • Hi,
      I can't find HttpWebRequest.ServicePoint or System.Net.ServicePoint.Expect100Continue property in PCL that likes other .net platforms has.
      Can I excluding the Expect header from HttpWebRequest? or any other workaround?
  • XmlAnyElementAttribute supported but XmlElement not?
    2 Posts | Last post September 12, 2012
    • see
      It is basically impossible to use XmlAnyElementAttribute as per the documentation since XmlElement is not supported.
    • I've replied to the thread on stackoverflow, basically, XElement is its replacement.
  • None of the Operations are generated when adding a Service Reference
    1 Posts | Last post September 12, 2012
    • I added a Service Reference and the IMyServiceReference interface is empty and no operations are generated in the IMyServiceReferenceClient.
      I was trying to convert a current solution to use Portable Class Libraries. So I created a new project, and just added the Service Reference.
  • GeoCoordinate
    1 Posts | Last post September 10, 2012
    • I develop for WP7, WinRT and .NET 4.5 (App Push Notifications). Please add supoport for GeoCoordinate. I use it in several of my models and it is supported by all environments except WinRT where they have changed things and used a different class (Why?).
  • Problems creating Service Reference
    3 Posts | Last post September 10, 2012
    • When I'm creating a Service Reference in a Portable Library, I get problems when the WCF service (on the server!) is configured to use the transport clientCredentialType "windows".
      I get a "custom tool error" that says "the transport of 'windows' is not supported".
      I'll have to remove this configuration at the server, then create or update the service reference, and then I can add this configuration again.
      This is annoying, I think the Portable Library should rather simply not care and create the proxy code anyway.
    • Thanks for the feedback, basically the reason you are getting an error, is because "windows" isn't supported everywhere (ie Phone), and we're blocking you from creating a service reference that won't work at runtime. Unfortunately, we have a limitation where we don't currently decide that based on whether you are targeting Phone or not.
      Would you prefer us to the create the service anyway?
    • that's right, I'm not even targeting Phone, and yup, definitely the service should be created anyway, as long as the generated proxy code is not any different.
11 - 20 of 128 Items