views:

255

answers:

2

When I add a Silverlight project to a blank solution, it asks me whether I want to add a web project to host the silverlight page or automatically generate a test page. Oddly enough, when I automatically generate a test page, everything in fine. However, when I add the web project I have problems.

I first get an error saying that it needs System.Web.Silverlight.dll in the bin folder of the web, so I do this. Then when I run it, all I get is the “Install Silverlight” icon. I’ve tried playing with and/or removing the minimum version tag and the version tag, but I just can’t seem to get it to work that way.

Has anyone had this problem before? If so, how did you get around it?

+1  A: 

Sounds like you've got an old toolkit installed or the project template is corrupt.

Try a re-install the lattest Silverlight Tools for Visual Studio

Graeme Bradbury
That's the version that I have installed. What do you mean by the project template being currupted? How does that happen?
Charles Graham
The template sets up all the references and your reference to System.Web.silverlight.dll seems to point to somewhere unusual (Bin folder) on a default installation it would be (c:\Program Files\Microsoft SDKs\Silverlight\v2.0\Libraries\Server\System.Web.Silverlight.dll)
Graeme Bradbury
How do I fix the template itself? Re-install the Silverlight Tools for VS?
Charles Graham
A: 

To get rid of the first error, go to your references in your web project, and go to the properties for System.Web.Silverlight and go to its properties. Make CopyLocal true.

To get rid of the install icon problem, go to the Silverlight control markup in your aspx page and remove the MinimumVersion attribute. This doesn't seem like te most ideal solution, but at least one can debug.

Charles Graham