Question

The "change target framework" dialog in the portable class library properties has a link pointing to this page:

http://msdn.microsoft.com/en-us/hh487282.aspx

Said page indicates that there is a silverlight 5 'targeting pack' included in 'Silverlight 5 RC Tools Visual Studio 2010 SP1'.

My assumption is that the RC tools are replaced by the release Silverlight 5 tools - and I definitely don't have the option to choose silverlight 5 despite having these tools.

Thinking they may have left the targeting pack out of the release tools, I tried uninstalling them and installing the RC tools to see if the option to target silverlight 5 would show up - however that didn't seem to work either.

How can I target Silverlight 5 with my portable class library?

Also I should add, I know that silverlight 4 assemblies are compatible with silverlight 5, however referencing silverlight 4 libraries from within a silverlight 5 application has other side affects (such as code analysis / metrics not working) which I'm trying to resolve ("could not unify the platforms") So a fix to that would be equally appreciated :)

Was it helpful?

Solution

Portable Class Libraries supports Silverlight 5 out-of-the-box, choosing Silverlight 4 will enable you to run on Silverlight 5. The Visual Studio 11 Beta out next week adds full support for Silverlight 5 (if you install it on a box with Visual Studio 2010, it will also add Siverlight 5 support to it)

The Code Analysis issue is a known issue (the same problem occurs if you reference RIA Services and attempt to run Code Analysis), unfortunately, there's no known workaround. Sadly, we could not get the fix into time to make it into the Visual Studio 11 Beta. It will, however, be fixed by the time we ship.

David Kean (BCL Team)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top