What is difference between Microsoft.Pratice.Prism and Prism.Desktop?

Topics: Prism v4 - WPF 4
Dec 21, 2010 at 10:18 PM
Edited Dec 21, 2010 at 10:19 PM


I made my WPF project file with "Microsoft.Practices.Prism.dll" as same as StockTrader RI example.

It comes from source code version Prism 52595.

In this version, under the "V4/PrismLibrary/Destop" directory can generate the that assembly.

But In the References(by adding reference), two Assemblies name appeared.

One is "Microsoft.Practices.Prism". It comes from "\V4\Bin\Desktop" binary library directory of Prism 4.

Other is "Prism.Desktop" It comes from "V4/PrismLibrary/Destop" source directory of Prism 4.

both are same Assembly name.


I want to using source code "Prism.Desktop" source code only but the Visual Studio 2010 make a error like a this.

"Error    1    The type 'Microsoft.Practices.Prism.Bootstrapper' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.Prism, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.    my project~~"


How can I solve this compile error?

And why two assembly shows different reference name even if same assemply name in the properties view window of visual studio.


Thanks in advance.

Dec 22, 2010 at 5:57 PM


The difference between Microsoft.Practices.Prism and Prism.Desktop is that the former is the compiled assembly, and the latter is the project (with the source code), both provided in the Prism release. The error you're experiencing might be because you're adding some references to compiled assemblies, and some to the projects.

In order to avoid these errors, you could try removing all the references in your target solution, and then adding the references to the projects from the Prism Library (not the compiled DLLs). Conversely, you could add all the compiled DLLs and not the projects, which should work as well.

I hope you find this information useful.


Miguel Bronzovic


Dec 22, 2010 at 11:25 PM

Hi Miguel,

Thanks your helping. It was my first experince a quastion in patterns & practice discussion.

Your tip was works well after removing compiled assembly.

Only using the binary's assembly that's OK.

But I would like to use only compiled assembly for more easy debugging purpose. It was same error message. as I posted it.

Any tip or solving method?


Dec 23, 2010 at 7:21 PM

Hi Redsock,

As I mentioned in my former answer, in case you want to reference the source code of Prism to help when you are debugging your application, you need to remove all the references to the Prism Binary assemblies. That is to say, you should remove all the references to external Prism DLLS, and only keep references to the projects you've added to the solution (taken from the Prism Library solution included in the Prism release). Note that after you have removed the assemblies, you should clean your solution, and only then you should add the references to the projects.

An example of your solution structure would be like this (assuming that you're using all of the Prism Library's functionalities):


Ø Prism.Desktop

Ø Prism.MefExtensions.Desktop or Prism.UnityExtensions.Desktop

Ø Prism.Interactivity


Ø ModuleA --> Reference to the projects from above

Ø ModuleB --> Reference to the projects from above

Ø (...)  --> Reference to the projects from above

Ø ShellProject --> Reference to the projects from above

I hope you find this handy to resolve your scenario.


Miguel Bronzovic