Reputation: 56874
I am inheriting a Silverlight project from a developer who just upped-and-quit and left behind no instructions or documentation (whatsoever). Scrambling to pick up the pieces and get my sandbox working.
Company gave me a license for VS 2010 Developer, which I have installed. I open the project's SOLUTION file and try to clean -> build it, but getting a compiler error. It's missing the System.Windows.Interactivity.dll
file. I have already installed Silverlight SDK and Expression Blend, which are the two places previous SO questions (similar to this, but not identical!) recommended looking.
Although I do see it inside Expression Blend's installation, when I try to add it as a reference to the Silverlight project, I get the following error:
You can't add a reference to System.Windows.Interactivity.dll as it was not built against the Silverlight runtime. Silverlight projects will only work with Silverlight assemblies.
What are my options here?!? Thanks in advance.
Upvotes: 1
Views: 7714
Reputation: 1908
When you add the reference, verify that you are adding the dll that is under the Silverlight folder (ie. "Silverlight" should be in the path of the assembly name).
It should be found in the following folders (exclude the " (x86)" if running 32-bit Windows), depending on SL 4.0 or 5.0:
Installed by Expression Blend 4:
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v4.0\Libraries
Installed by Microsoft Expression Blend Preview for Silverlight 5: (http://www.microsoft.com/download/en/details.aspx?id=9503 )
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v5.0\Libraries
Upvotes: 4
Reputation: 6460
The quick and dirty solution is to install the Blend SDK for Silverlight. From what you described these assemblies should already be on your system, but for some reason they're not (or they're in a weird place). The reason for the error you described is that you're trying to add the WPF version of the assembly to a Silverlight project and that's obviously a no-no. (Two ways to solve that problem: the WPF version should have a version of 4.x while the Silverlight version will have either 2.x for SL4 or 5.x for SL5. So you can discriminate by version number. Or you can get a Visual Studio extension like Productivity Power Tools that gives you better ways of adding references.)
Note that if you're doing Silverlight 5, the only way to get these assemblies is to install the Blend Preview for Silverlight 5. A stand alone installer for the Blend SDK for Silverlight 5 does not yet exist.
Upvotes: 1
Reputation: 5554
The files are in Program Files (x86)
C:\Progra~2\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\System.Windows.Interactivity.dll
C:\Progra~2\Microsoft SDKs\Expression\Blend\Silverlight\v4.0\Libraries\System.Windows.Interactivity.dll
C:\Progra~2\Microsoft SDKs\Expression\Blend\Silverlight\v5.0\Libraries\System.Windows.Interactivity.dll
Upvotes: 0