Exception thrown: 'System.FormatException' in mscorlib.ni.dll

Unity 5.3.5p1
Visual Studio Community 2015 v14.0.25123.00 Update 2

Building for WindowsStore Phone 8.1
After build and upon deploying to Device :

System.FormatException occurred
HResult=-2146233033
Message=Could not find any recognizable digits.
Source=mscorlib
StackTrace:
at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags)
InnerException: null

Specificly:
in MainPage.xaml.cs

  else if (manifest[0] == '#') // color value starts with #
           value = Convert.ToInt32(manifest, 16) & 0x00FFFFFF;
         else

Do note, that application does deploy and execute on device with no further errors encountered, but I would like to resolve this exception.

How to do so? Please and thank you

Looks like there’s a bug in the lines you pasted. It should have been like this:

value = Convert.ToInt32(manifest.Substring(1), 16) & 0x00FFFFFF;

Thanks!
That was indeed it.
Any need for me to file a bug report?

It’s your bug :slight_smile:

No sir… Unity generated that code.

Oh… sorry, in that case, yes please report it.

I have absolutely the same problem in Unity 5.4.0 when I try to release for windows universal app. Please help.
Possible solution would be to edit the AppxManifest.xml and fix the splash screen color - removing the “#” but how to edit this manifest and compile the game ?

Just do the workaround Tautvydas has suggested.

@Tomas1856 - but this is in Unity’s internal classes. It is thrown from MainPage.xaml.cs → GetSplashBackgroundColor
See my screenshot here:

You can change that without any problems. Bug fix is incoming, but until we fix it, you’ll have to workaround manually.