Silverlight 5 Backward Compatibility - silverlight

I have a Silverlight application developed with version 4.0. I tried running it with Silverlight 5 client and everything seems to be fine up to now.
But I am wondering; if my users installs Silverlight 5 for client, is it sure my application will still work well? Do I have to run all my Test Cases again?
If anyone notices something that has been broke between versions, please list it here! :)
Thanks

There's little evidence around the internet at the moment, other than that published by Microsoft, which can be found here and here, which states, to summarise:
Several changes have been made to the Silverlight runtime and the
Silverlight Tools between Silverlight 4 and Silverlight 5. For these
changes, the following principles apply:
Most Silverlight 4 applications will work with Silverlight 5 without
any changes.
When breaking changes are required, Silverlight will try to maintain
support for the old behavior, as well as the new behavior, by using a
quirks mode.
Nevertheless, some changes made to Silverlight components can
potentially cause your older Silverlight-based applications to fail
(compile time, XAML load time, or possibly design time) or to behave
differently.
And,
There are no known breaking changes between Silverlight 4 and
Silverlight 5 in the Silverlight core runtime. Applications that were originally compiled using Silverlight 4 tools, and that continue to target the Silverlight 4 runtime, should work without issues on a client that has the Silverlight 5 runtime.
If your project references any Silverlight SDK client assemblies [...] make sure that your project
specifically references the Silverlight 5 version of the SDK client
assemblies [...]. A project that targets Silverlight 5 cannot use the Silverlight
4 SDK assemblies.
There's more information in the links I provide, for instance, related to quirks mode, third party references, and behavioural changes.

I have a project with a Silverlight 4 tool used to display a barchart etc. The Project upgrade to VS2013 automatically upgraded to Silverlight 5 and there were no warnings. I worked on other areas of the project and only by chance did I actually run it in debug mode to find that the display was broken somewhere inside the tool. I managed to scamper back to VS2012 and scavenge the changes I had made in the VS2013 version of the project.

Related

How do I deploy a 3D Silverlight 5 web application to a third-party hosting server?

What I want to do
I've been playing around with the newly released Silverlight 5 and Silverlight 5 Toolkit (December 2011), and I would like to try deploying my 3D Silverlight test application to a third-party hosting server (AppHarbor in my case, but I'm open to other options).
My test application is simply the default Silverlight 3D application that you get when you create a new Silverlight 3D app:
Blog: http://blogs.msdn.com/b/eternalcoding/archive/2011/12/10/silverlight-toolkit-september-2011-for-silverlight-5-what-s-new.aspx
It looks like AppHarbor (and most other hosting sites) require that you copy the required Silverlight 5 DLLs into your project, because they don't have the required SDKs/Toolkits installed on their servers.
Seems fine in theory, but I have no idea how to actually do this with Silverlight.
The problem
The problem is two-fold:
I'm not sure exactly which DLLs need to be manually copied into my project, and I'm not sure how they should be included and referenced.
After some experimentation with copying a few of the Silverlight XNA DLLs into my project and referencing the local project DLLs (instead of the SDK-installed and Toolkit-installed DLLs), the basic 3D Silverlight app now crashes when I run it in the browser -- locally. (The Silverlight plugin crashes.) I didn't have this problem before I started fiddling with the references and DLLs; the default project works just fine. So I haven't even gotten to deploying to a hosting server, because it no longer runs locally.
An aside
On the latter point above (Silverlight plugin crashing), the issue seems to be related to the 3D Silverlight functionality, which apparently requires elevated trust/permissions -- admittedly, I don't fully understand how that all works yet.
Generally speaking -- irrespective of all of this DLL/reference fiddling -- it seems like I need to check "Require elevated trust when running in-browser" in the Silverlight3dApp project properties to get the spinning 3D cube app to show up in the browser. Alternatively, if I leave that unchecked, I need to manually right-click the Silverlight 5 app in the browser and enable 3D graphics on the Permissions tab. (Side note: I'm interested in how this will effect my end-users if I ever do get this deployed. Will they have to manually adjust permissions in the same way? Anyway, that's a question for a different day.)
The point of this aside:
The Silverlight plugin does not crash if I leave everything the way it is by default.
If I copy the Silverlight DLLs into my project and reference them locally, the Silverlight plugin crashes if 3D permissions are enabled.
If I copy the Silverlight DLLs into my project and reference them locally, the Silverlight plugin does not crash if 3D permissions are disabled.
The question
Has anyone successfully deployed that basic Silverlight 5 3D app to a server without Silverlight 5 (and the Silverlight 5 Toolkit) installed?
How did you do it? What files need to be copied into my project and referenced locally? Which references (if any) need to be removed?
Sub-question: If anyone has any insights about the elevated trust/permissions issue, I would love to hear those as well.
For AppHarbor I create a folder in the Silverlight project (lib) and copy all assemblies that I am dependent on and mark all the assemblies with copy to output.
Next I use subst to make a virtual drive that points to this folder and I add all the references to the assemblies on that virtual drive. (This is not needed for AppHarbor but this way I can check out my code to any folder on any machine I want without messing up the paths)
Note that you also need to add these dll's to the repository (git/mercurial) because a standard .hgignore file will skip the *.dll files.
Have you verified you are running the latest runtime for Silverlight? Did you have a previous developer runtime installed? http://www.microsoft.com/getsilverlight/get-started/install/
Hmm... I'm going to go with the above answer. I'm using the latest Silverlight 5 runtime and Silverlight 5 Toolkit and have not had any issues. Here's an app where I'm loading and animating an FBX model in Silverlight (it does require you to right click and set the permissions) and it works fine:
http://www.dustinhorne.com/necodecamp.html
As an aside I'm wrestling with whether to run in elevated trust or force the user to allow 3D acceleration. Personally I hate making the whole app elevated trust just for the 3D stuff from a security standpoint, although if you want to run it out of browser you may want to do that anyway and sign the app with a code signing certificate.

how to setup VS 2010 to allow debugging of Silverlight 3 and Silverlight 4

I have some code which is in Silverlight 3. I am unable to move to SL4 at this time.
I would however like to use VS 2010 to do my SL 3 development... and SL4 development.
The idea of both runtimes coexisting on 1 machine i thought I heard Microsoft got
right this time in VS 2010.
is this correct?
if yes, then Where can I find the instructions how to set this up?
thanks for any help you can provide,
Sincerely,
J
Silverlight is not side-by-side. VS 2010 provides multi-targeting support for the full .NET framework, which is side-by-side, but NOT Silverlight.
There can only be one version of the Silverlight plugin and runtime on the machine.
That said, if you want to build code targeting one or the other, that is possible by checking in the Silverlight versions to your source enlistment. This post is a little outdated but provides an example for doing this for SL2 and SL3.

Why do Silverlight 4 Assemblys still have the version 2.0.5.0?

Why do Silverlight 4 Assemblys still have the version 2.0.5.0 in Visual Studios Object Browser?
Well I can't claim to know the exact reason for this, you would need someone from the SL team to state the reason categorically and I haven't seen any blogs from them doing that.
However I strongly suspect this is related to the fact that there is still only one Silverlight plugin, that is to say when a user installs the Silverlight 4 plugin it replaces the existing one. The Silverlight 4 plugin will run not only Silverlight 4 apps but also Silverlight 3 and 2 apps. As a consequence Silverlight 2 apps will be looking for 2.0.5.0 libraries and that certain issues are avoided if the later versions simply use the same version number.
Of course I could be way off and hope that if I am an MS geezer come and shoot this down, in the process of which giving us the real answer.
Because it needs to reference the System.Core 2.0.5.0

Can we still develop Silverlight 2 applications

I've inherited a set of Silverlight 2 applications (new job), one of which needs upgrading. We can do the updates in code without problems, but the available dev machines all appear to be running Silverlight 3.
I can't seem to find Silverlight 2 tools for download any more - is there a way to multi-target Silverlight the same way we can multi-target older versions of the main CLR?
thanks
Toby
There's really no reason to multitarget Silverlight. Unlike CLR, there isn't a side-by-side story: people run the latest version.
There's still an argument to develop for Silverlight 3, so go ahead and use the Silverlight 3 development tools - your Silverlight 2 apps should work just fine.
There may be some extremely limited, controlled environments without Internet or IT connectivity with Silverlight 2, but I'd expect that to be vary rare in my opinion. In such a case you could use MSBuild to build Silverlight 2 (even if you have newer bits on your machine) by placing the build tasks in your enlistment and redirecting from the standard SDK: http://www.jeff.wilcox.name/2009/03/sxs-sl2-sl3-building/
Here are the Silverlight 2 tools for Visual Studio 2008 SP1. You won't be able to developer Silverlight 2 apps in VS2010: http://www.microsoft.com/downloads/details.aspx?FamilyId=c22d6a7b-546f-4407-8ef6-d60c8ee221ed&displaylang=en

Difference between silverlight tools, silverlight SDK, silverlight toolkit, silverlight development tools

I'm installing a programming environment for Silverlight and trying to straighten out what needs to be installed, feedback is appreciated:
At http://silverlight.net/GetStarted, point number one allows you to install "Silverlight Tools for Visual Studio 2008 SP1". The book (Silverlight 2, Wiley) that I am reading seems to refer to this as the "Silverlight SDK".
Also at http://silverlight.net/GetStarted, point number four allows you to install "Silverlight Toolkit" which my book refers to as "Silverlight Development Tools".
So the way I understand it, there are only 2 things to install, the names just seem to not be consistent. Or are there really 3 or 4 different things to install?
You're correct:
- the first one refers to the actual SDK (along with documentation, Visual Studio templates and examples). You must install this one in order to develop a Silverlight 2 web application.
- the second one is a collection of controls and classes already coded and ready to be used in any Silverlight 2 web application. This one is not required but you can find it very useful since it's a community project, constantly mantained and updated with new features.

Resources