Hi,
If anyone’s having trouble compiling a Javascript app for Metro here’s my tips:
- If it doesn’t compile at all with some error about “boo.lang” versions 2.0.9.5 (which it might do if you’ve upgraded your project form 3.x to 4.x):
In Visual Studio delete:
boo.lang.dll
unityScript.lang.dll
from the references.
- All the places where you have joined strings with a “+” change it to use String.Concat:
var a:String="Hello ";
var b:String="World!";
var c:String=a+b; //Will fail when building for Metro!!!!
var c:String=String.Concat(a,b);// Will work!!!
This is a strange bug. I would be interested just what caused this bug!!! It took me over 3 hours to work out why my app was failing!!! And it’s not easy to go over all your code to check if any of your “+”'s are actually string concats so it would be nice for a fix!
- Or on the other hand just use C#.
I have raised this to Unity as a bug. But hope this helps other people. If you have any other tips write them below.