Silverlight and Visual Studio

You may be puzzled sometime by a dialog box that Visual Studio displays about Silverlight. The dialog box comes in a number of forms, but basically it tells you that you need an updated version of Silverlight on your system. The dialog box also provides an URL where you can go to download the latest version. Because you can’t open your Silverlight project until you get the latest version of Silverlight (despite the fact that you opened it just yesterday without any trouble), you dutifully click the link and download the latest version of Silverlight. The file is likely named Silverlight_Developer.exe or something similar.

After the download is complete, you double click the file and begin the installation. However, the installation program tells you that you do indeed have the most recent version of Silverlight installed on your machine. Closing your project and reopening it produces the same error message. Of course, this is just the sort of frustrating problem that drives everyone (including developers) crazy.

The problem is that you do indeed have the latest version of Silverlight installed, but it’s the standard version, not the developer version. At some point, you likely performed an update of your Silverlight installation through your browser. The browser will always download the standard version because that’s all it needs. Visual Studio, on the other hand, requires the developer version.

Unfortunately, short of inspecting the files closely, nothing tells you about these two versions. When you look at the entry in the Programs and Features window, all you see is Microsoft Silverlight. There is nothing to tell you which version you have installed.

To fix this problem, uninstall the standard version of Microsoft Silverlight. Don’t uninstall the Microsoft Silverlight SDK entries. Now, double click the Silverlight_Developer.exe file again and the installation will run just fine. Close and reopen your project and you’ll find that it too works just as it should. If you have a browser open, make sure you close and reopen the browser as well or you’ll experience problems debugging your application.

It would be nice if Microsoft had provided a better entry in the Programs and Features window. Better yet, it could have provided a better error message when you opened your project. Lacking these helps means that you must discover just how to fix the problem on your own. Let me know if you encounter any other odd Visual Studio behaviors of this sort at John@JohnMuellerBooks.com.

 

Author: John

John Mueller is a freelance author and technical editor. He has writing in his blood, having produced 99 books and over 600 articles to date. The topics range from networking to artificial intelligence and from database management to heads-down programming. Some of his current books include a Web security book, discussions of how to manage big data using data science, a Windows command -line reference, and a book that shows how to build your own custom PC. His technical editing skills have helped over more than 67 authors refine the content of their manuscripts. John has provided technical editing services to both Data Based Advisor and Coast Compute magazines. He has also contributed articles to magazines such as Software Quality Connection, DevSource, InformIT, SQL Server Professional, Visual C++ Developer, Hard Core Visual Basic, asp.netPRO, Software Test and Performance, and Visual Basic Developer. Be sure to read John’s blog at http://blog.johnmuellerbooks.com/. When John isn’t working at the computer, you can find him outside in the garden, cutting wood, or generally enjoying nature. John also likes making wine and knitting. When not occupied with anything else, he makes glycerin soap and candles, which comes in handy for gift baskets. You can reach John on the Internet at John@JohnMuellerBooks.com. John is also setting up a website at http://www.johnmuellerbooks.com/. Feel free to take a look and make suggestions on how he can improve it.