Can't use Prism 4 with Silverlight 5

Jul 12, 2012 at 5:38 PM
Edited Jul 12, 2012 at 5:38 PM

I'm creating a Silverlight 5 project and I found that none of prism libraries are available.

What do I have to do?

Jul 12, 2012 at 6:38 PM


Have you download Prism 4.1 version, this version includes the Prism binaries for Silverlight 5.

On the other hand, if your problem is related to binaries not being listed in the Visual Studio Add References dialog box when adding a reference, I believe you should check this known issue, there is explained that you will have to make some changes in order to make the RegisterPrismBinaries works correctly.

I hope you find this handy,

Agustin Adami

Jul 12, 2012 at 7:54 PM
Edited Jul 13, 2012 at 12:25 AM

Hi Agustin. Thank you for answering.

  • What do I do with my previous Prism 4 folder, just throw it away or does it have something that I should keep?
  • And as for the change I have to make, when it says:  "The following line...

    <RegistrationLine Include="[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v4.0\AssemblyFoldersEx\$(RegistrationKey)]"/>

    ...should be:

    <RegistrationLine Include="[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v5.0\AssemblyFoldersEx\$(RegistrationKey)]"/>". Where do I do that, in <Prism Folder>\Scripts\RegisterPrismLibrary.proj, do I have to open it with the notepad?
  • After I change it, will it still work with Silverlight 4?
Jul 13, 2012 at 1:49 AM
Edited Jul 13, 2012 at 1:51 AM

I ran the Prism 4.1 version installer, modified the RegistrationLine in the RegisterPrismLibrary.proj and registered binaries.

But I'm still not able to add references of the prism libraries to a Silverlight 5 project.

What do you suggest me to do?

Jul 13, 2012 at 1:05 PM


So far, I have been able to register the Prism v4.1 binaries by changing the aforementioned line from v4.0 to v5.0 in the RegisterPrismLibrary.proj file with an editor like NotePad without problems.

If you are using Windows 7, I believe, you could try running the RegisterPrismBinaries.bat file (after changing the aforementioned line) as an administrator, this worked for me in the past.

To do this right Click on the file and select the Run as administrator option.

As an alternative remember that you can always add the reference to the libraries, by browsing the binaries in the Bin folder where you extracted the Prism source files (to do this go to Add Reference, Browse Tab).

Also, regarding the Prism 4.0 folder take into account that for Silverlight 4 projects you will have to use the Prism binaries. Based on this you will have to decide if you will keep it or not. Also, note that if you have run the RegisterPrismBinaries.bat from  Prism 4.1 without the aforementioned modifications its probably that your past registered binaries for Silverlight 4 may not work. But if you only run the batch with the modifications then your Prism 4.0 registered binaries for Silverlight 4 should remain the same.

I hope you find this helpful,

Agustin Adami