Yesterday a colleague of mine was trying to get his Silverlight 3 building on our continuous integration (CI) server and was getting an error, 'Silverlight 3 SDK is not installed', even though the SDK was installed on that machine.
It turns out that this is a common error when trying to compile a Silverlight app on a 64 bit platform. Unfortunately most of the solutions out there involved manually editing the appropriate Silverlight .target file to change paths to the SDK.
Another solution was to set the 'MSBuild Platform' to x86 under TFS 2010 (http://blog.benday.com/archive/2010/04/20/23272.aspx). This was a cleaner solution, but not much use to us as we use CruiseControl.NET rather than TFS.
In the end the solution was fairly simple. All we had to do was call the 32bit .NET 4.0 version of msbuild which resides in C:\Windows\Microsoft.NET\Framework\v4.0.30319 rather than the default 64 bit version.
We ended up removing the <msbuild> task from our nant build file, which was calling the 64 bit version, and replaced it with an <exec> task pointing to the appropriate version of msbuild.
Showing posts with label silverlight. Show all posts
Showing posts with label silverlight. Show all posts
Thursday, August 19, 2010
Wednesday, March 3, 2010
Calculating when a MultiScaleImage has reached 1:1 scale of the original image.
For a project I am working on I'm using a Silverlight MultiScaleImage to display an exceptionally large tiled image. As part of this I wanted to enforce a maximum zoom when the image was displayed at 1:1 scale. After some Googling I wasn't able to find any immediate solutions so I had to tackle it myself.
The solution I came up with in the end was fairly simple. I already had the original image width in pixels, so all I had to do was to compare that against MultiScaleImage.ActualWidth divided by MultiScaleImage.ViewportWidth before zooming.
e.g.
Note: I'm still pretty new to the MultiScaleImage so if there's a better way feel free to comment.
The solution I came up with in the end was fairly simple. I already had the original image width in pixels, so all I had to do was to compare that against MultiScaleImage.ActualWidth divided by MultiScaleImage.ViewportWidth before zooming.
e.g.
if(_msi.ActualWidth / _msi.ViewportWidth > OriginalImageWidth)
{
return;
}
_msi.ZoomAboutLogicalPoint(...Note: I'm still pretty new to the MultiScaleImage so if there's a better way feel free to comment.
Subscribe to:
Comments (Atom)