Prism 2 (Composite Application Guidance for WPF & Silverlight) migrated to Silverlight 4 Beta
November 20th, 2009
Most of you know that a Silverlight 4 Beta was released last Wednesday, after Scott Gu’s PDC keynote. If you are a Prism user, and if you are reading this there’s a high chance you are, you are probably wondering how this relates to p&p future plans. Well, Blaine has given us a brief idea of Prism’s future in this forum thread, so you might want to check it out.
On a related but different subject Fernando and I migrated the latest Prism release to Silverlight 4 Beta version & Net 4.0. A few minor changes needed to be done in the code (explained here), and some other in the .csproj files due to an issue we came up using the Silverlight migration wizard.
Migration Issues
After going through the migration wizard, you will notice that all Silverlight projects are not loaded. This is because they are still looking for the 3.0 installation directory instead of 4.0 as you can see in the picture below.
To fix this issue you need to edit your .csproj file and redirect it to the Silverlight 4 directory. The line that is related to this issue is the following:
<Import Project=“$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion) \Microsoft.Silverlight.CSharp.targets” />
Here you have two options:
- Replace “$(SilverlightVersion)” for “v4.0″.
- Modify any existing declarations of “SilverlightVersion“ in your file and update them to 4.0. Take into account that some of them might be using the “FrameworkVersion”. The code below shows this situation:
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
Prism Migrated Download
If you want to save some time, you can download the CAL, Quickstarts and RI from here. The code is provided “AS IS” with no warranties and confers no rights and is shipped under the “works on our machine” license.
Have fun coding in Silverlight 4!!!
Prism 2 (Composite Application Guidance for WPF & Silverlight) migrated to Visual Studio 2010 Beta 2
November 9th, 2009
As most of you might know, Visual Studio 2010 Beta 2 was released some days ago. Ever since, many people have asked at the Prism codeplex forums if Prism works with this latest version. That’s why with Fer we decided to migrate Prism latest release for Silverlight 3 to VS 2010 Beta 2. Our conclusion after our smoke tests is that it does work
.
Migration Steps
- Migrated every solution.

- Ran the tests and smoke tested each application.
- Fixed any issues that appeared (mostly related to missing assembly references).
- As a little extra, we added the White assembly references required to run the acceptance tests.
Changes Required
Below you can find a small explanation of the changes required for the migration:
- The Reference Implementation Tests fail (4 tests) when you run them. The fix is explained in this thread.
- Many projects will throw a missing assembly reference exception related to “System.Xaml.dll”. You need to add this assembly as a reference in most test projects.
- The Multitargeting Quickstart throws an error when running it. To fix it, change the Resources constructor modifier from internal to public.
- Some build errors might be thrown because of code analysis issues in Silverlight projects (CA:0055 Analysis of Silverlight assemblies is not supported):
- Uncheck the “Enable Code Analysis on build” check box in the Code Analysis tab.
- Make sure code analysis is not one of the compilation symbols in the Build tab.
Download
The code provides all the fixes performed, and is provided “AS IS” with no warranties and confers no rights. It is shipped under the “works on my machine” license. You can download it from here.
I hope this saves you the trouble of migrating Prism to VS 2010.
