Silverlight version conflict
I get the following error when I try to run my Silverlight application:
Line: 53 Error: Unhandled Error in Silverlight Application Code: 2106
Category: InitializeError Message: Failed to load the application. It was built with an obsolete version of SilverlightIn "Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0" I have version 3.0.40307.0 installed but I also have the following 2 direc开发者_JAVA技巧tories: - "Program Files\Microsoft Silverlight\3.0.40307.0" - "Program Files\Microsoft Silverlight\3.0.50106.0" And it's the 3.0.50106.0 version that is used by the browser.
How do I "tell" Visual Studio to target the 3.0.50106.0 version?
Best Regards, Jesper
If you're moving from SL2 to Silverlight 3, there were some breaking changes, one that might be biting ya:
System.Web.Silverlight.dll has been removed from the Silverlight SDK
In other words, replace <asp:silverlight>
with the equivalent <object>
tag.
Regarding telling it which to use, unless you're running VS2010, you can't multi-target Silverlight apps, so when you open a SL project it will be upgraded to whatever version you have installed.
You can check which version is being targeted by looking at the .proj file, check which dll's it's referencing (eg Microsoft SDKs\Silverlight\ v2.0 \Reference Assemblies\system.dll, Microsoft SDKs\Silverlight\ v2.0 \Reference Assemblies\mscorlib.dll, etc...)
精彩评论