I made a test SL5 OOB project and tried to build under x64 platform but I get the warning:
"Assembly generation -- Referenced assembly 'CommonLanguageRuntimeLibrary' targets a different processor".
and an error:
Error 2 Could not load file or assembly 'file:///C:\work\TestSilverlightOOB\TestSilverlightOOB\obj\x64\Debug\TestSilverlightOOB.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.Common.targets 214 9 TestSilverlightOOB
Same for WebHosted with RIA enabled.
Finally the answer to the questions is no. Silverlight apps cannot be build as x64 apps.
The reason is the references from here
c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v5.0
are x86 and there is no x64 SDK for Silverlight 5
Since it is running correctly in 32 bit mode, and since I see the error points to a SL library in the 32 bit Program files, while running in 64 bit mode, the most probable cause I see is the conflict between the two platforms.
Please try to get Silverlight from here: https://www.microsoft.com/getsilverlight/Get-Started/Install/Default
Hopefully, if you target x64 processors, if you have the above installed, it will find it automatically.
While doing a short research, I have also found this: https://social.msdn.microsoft.com/Forums/vstudio/en-US/20a742a1-b99c-4638-8590-9a9d6a95fb69/building-silverlight-project-using-msbuildexe?forum=msbuild
While not convenient, the accepted answer might be helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With