August 21, 2013 07:53 by
Scott
Silverlight boasts several performance enhancements that will improve its speed and scale within the enterprise. The first is the ability to run animations on the composition thread instead of the UI thread.
The UI thread is a dedicated thread that handles input and output for the user interface. It is where much of the rendering computations and actions take place as well as polling for mouse movements and keyboard input. Heavy computations on the UI thread will cause other operations to become blocked and the application to become unresponsive.
The composition thread is a separate thread that was introduced to provide rendering for 3D graphics in Silverlight 5. It can also be used to run animations. This is important because animations usually run on the UI thread. Not only do they take resources from other processes competing for this thread, but also can degrade when there is massive work performed on the thread. By moving certain animations to the composition thread, they can run independently and remain fluid despite processing on the UI thread. Animations are run on this thread when the UI element that is targeted has the cache mode set to BitmapCache and GPU acceleration is enabled for the Silverlight application.
A second enhancement is the provision of a multi-core Just-in Time compile (JIT). This means the Silverlight runtime can generate code more quickly and provide a faster response time on multi-core machines. Additional optimizations of the networking stack have led to reduced network latency, which means better responsiveness when connecting to remote systems. Add to that speed improvements that were made to the XAML parser and you end up with a well performing system that should run faster on the same hardware as compared to its predecessor. According to Microsoft, improvements to the networking thread alone reduce latency by up to 90 percent.
August 9, 2013 08:09 by
Scott
When we open Silverlight 4 application in Silverlight 5 we get following errors
1) error : Unable to read the project file 'Silverlight4App.csproj'.
2) Silverlight4App.csproj(137,3): The imported project "C:\Program Files\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Silverlight.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
This error occurs as the application was earlier built using Silverlight-4 Reference. So while opening this in Silverlight-5, the Visual studio looks for the Silverlight 5 reference files but it cannot find it.
To resolve this error you will have to follow following steps:
1) Open the project in Visual studio.
2) Go to solution explorer
3) Right click on the project that is not loaded and click on edit the CSPROJ file
4) And then change the Target Frame Work version to 5.0
5) Save and close this file and again right click on the project which is not loaded and click on Reload project.
6) Now the project will be reloaded successfully.
By following above steps your Silverlight 4 application will be converted to Silverlight 5 application.
If in case you again want to go back to Silverlight 4 then just repeat the above steps and set the Target Framework version to “v4.0”.
Hope this helps!!