Error building for Windows 8

  • The project was released on iOS and Android and now we want to port to Windows store. When building for windows store by default setting. It has lots of errors, most are because the json.fx using in the project.

  • We changed “Compilation Overries” from “Use Net Core” to “None”, and builds again. Although it’s still showing tons of errors like “Reference Rewriter: Error: method System.Boolean System.Reflection.ICustomAttributeProvider::IsDefined(System.Type,System.Boolean) doesn’t exist in target framework. It is referenced from Assembly-CSharp-firstpass.dll at System.Boolean JsonFx.Json.JsonIgnoreAttribute::IsJsonIgnore(System.Object).” But the visual studio is able to be generated successfully this time.

  • We run the visual studio project on local matchine, it shows below error:

Error 1 The command "echo UnityInstallationDir ‘C:\Software\Unity4.5.5\Editor’ echo UnityProjectDir ‘C:\Projects\Project Ice’ echo Copying assemblies… copy /Y “C:\Projects\Builds\IceBuild_Store\Project Ice\Unprocessed*” "C:\Projects\Builds\IceBuild_Store\Project Ice" echo Running AssemblyConverter… “C:\Software\Unity4.5.5\Editor\Data\PlaybackEngines\MetroSupport\Tools\AssemblyConverter.exe” -platform=wsa81 “C:\Projects\Builds\IceBuild_Store\Project Ice\Assembly-CSharp-firstpass.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\Assembly-CSharp.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\Assembly-UnityScript.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\Boo.Lang.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\HOTween.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\ICSharpCode.SharpZipLib.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\P31RestKit.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\UnishareSocketLib.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\UnityEngine.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\UnityScript.Lang.dll” “C:\Projects\Builds\IceBuild_Store\Project Ice\WinRTLegacy.dll” echo AssemblyConverter done. " exited with code 1

Does anyone knows the solution? Thanks in advance.

If you see reference rewriter error, that means you still have API which is not supported, you’ll need to fix that.

As for error, please copy-paste it from Output window, cause there’s information missing herr.

It’s better to use .NET Core, then you get compilation errors, that are easier to fix.

The solution is to either replace unavailable API usage with something that is available, or reimplement the missing bits yourself (I personally find the latter approach much easier).

I’m not sure that JsonFX as is will work with Windows Phone / Windows Store. Several JsonFX users have switched over and started using my JSON .NET port asset. That being said, I did some digging around to see what I could find and it looks like someone made a NuGet package with Windows Store and Windows Phone 8 support for Unity. You’ll have to pull in the NuGet probably with Visual Studio (that would be easier than trying to use the command line tool) and you may have to tweak to use with Universal, or you can download the source for it from Github.

Nuget: NuGet Gallery | MarkerMetro.Unity.JsonFx 2.0.0.14
Github: GitHub - MarkerMetro/MarkerMetro.Unity.JsonFx: JsonFX Plugin Port

Hope that helps!