Problem when build master in Visual Studio 2015

I’m using Unity 5.2.1p2,
If I build release : every thing ok.
If I build master: build success, but some feature not work, and some time crash
If I build master, but uncheck “Compile with .Net Native tool chain” : every thing ok, but I can’t submit store.
Please help me :frowning:

I got some warning
Output:
------ Build started: Project: SweetMadness, Configuration: Master x86 ------
2> UnityInstallationDir “C:\Program Files\Unity\Editor”.
2> UnityWSAPlayerDir “C:\Program Files\Unity\Editor\Data\PlaybackEngines\metrosupport”.
2> UnityProjectDir “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity”.
2> Copying unprocessed assemblies…
2> Running AssemblyConverter…
2> AssemblyConverter done.
2> SweetMadness → E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS\SweetMadness\bin\x86\Master\SweetMadness.exe
2> Starting .NET Native compilation
2> Processing application code
2> Computing application closure and generating interop code
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Invalid IL detected in method ‘System.Int64 UnityEngine.Internal.$MethodUtility.$Invoke1633(System.Int64, System.Int64*)’ at IL offset 0xB referring to invalid Windows Runtime method ‘Windows.Foundation.HResult Windows.Foundation.IAsyncInfo.ErrorCode.get()’.
2> Compiling interop code
2> Generating serialization code
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Method ‘Type.GetInterface(string)’ was not included in compilation, but was referenced in method ‘JsonMapper.AddArrayMetadata(Type)’. There may have been a missing assembly.
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Method ‘Type.GetMethod(string, Type[ ])’ was not included in compilation, but was referenced in method ‘JsonMapper.GetConvOp(Type, Type)’. There may have been a missing assembly.
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Method ‘TextReader.Close()’ was not included in compilation, but was referenced in method ‘JsonReader.Close()’. There may have been a missing assembly.
2> Cleaning up unreferenced code
2> Running native compilers

Your error is cut off.

Here is build log:
Restoring NuGet packages…
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck ‘Allow NuGet to download missing packages during build.’
Error occurred while restoring NuGet packages: Error HRESULT E_FAIL has been returned from a call to a COM component.
1>------ Build started: Project: Facebook, Configuration: Release Win32 ------
1> FBSDK-UWP.vcxproj → E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS\Release\FBSDK-UWP\Facebook.dll
2>------ Build started: Project: SweetMadness, Configuration: Master x86 ------
2> UnityInstallationDir “C:\Program Files\Unity\Editor”.
2> UnityWSAPlayerDir “C:\Program Files\Unity\Editor\Data\PlaybackEngines\metrosupport”.
2> UnityProjectDir “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity”.
2> Copying unprocessed assemblies…
2> Running AssemblyConverter…
2> AssemblyConverter done.
2> SweetMadness → E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS\SweetMadness\bin\x86\Master\SweetMadness.exe
2> Starting .NET Native compilation
2> Processing application code
2> Computing application closure and generating interop code
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Invalid IL detected in method ‘System.Int64 UnityEngine.Internal.$MethodUtility.$Invoke1633(System.Int64, System.Int64*)’ at IL offset 0xB referring to invalid Windows Runtime method ‘Windows.Foundation.HResult Windows.Foundation.IAsyncInfo.ErrorCode.get()’.
2> Compiling interop code
2> Generating serialization code
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Method ‘Type.GetInterface(string)’ was not included in compilation, but was referenced in method ‘JsonMapper.AddArrayMetadata(Type)’. There may have been a missing assembly.
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Method ‘Type.GetMethod(string, Type[ ])’ was not included in compilation, but was referenced in method ‘JsonMapper.GetConvOp(Type, Type)’. There may have been a missing assembly.
2>C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets(791,7): warning : Method ‘TextReader.Close()’ was not included in compilation, but was referenced in method ‘JsonReader.Close()’. There may have been a missing assembly.
2> Cleaning up unreferenced code
2> Running native compilers
2> Generating fixups for native code
2> Compilation successful.
2>
3>------ Deploy started: Project: SweetMadness, Configuration: Master x86 ------
3>Updating the layout…
3>Copying files: Total 19 mb to layout…
3>Deployment complete (3783ms). Full package name: “044249B7.SweetMadness_1.2.1.0_x86__xsvtd4fj5ejby”
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

And log file here

2351086–159208–Log.txt (42 KB)

So what exactly is happening? Do you have a stacktrace for the crash?

It crash when call Invoke from a UnityEvent object.
I think I know what is problem. I will try it. Thanks you very much

I just tried Unity 5.2.2 but I got this error:
1>------ Build started: Project: Facebook, Configuration: Release Win32 ------
1> FBSDK-UWP.vcxproj → E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\Release\FBSDK-UWP\Facebook.dll
2>------ Build started: Project: SweetMadness, Configuration: Release x86 ------
2> UnityInstallationDir “E:\Soft\Unity\Editor”.
2> UnityWSAPlayerDir “E:\Soft\Unity\Editor\Data\PlaybackEngines\metrosupport”.
2> UnityProjectDir “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity”.
2> Copying unprocessed assemblies…
2> Running AssemblyConverter…
2> System.ArgumentNullException: Value cannot be null.
2> Parameter name: type
2> at Mono.Cecil.ModuleDefinition.ImportReference(TypeReference type, IGenericParameterProvider context)
2> at Mono.Cecil.ModuleDefinition.ImportReference(TypeReference type)
2> at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
2> at Unity.FixReferencesStep.Visit(TypeDefinition type)
2> at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
2> at Unity.TypeDefinitionDispatcher…ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
2> at Unity.FixReferencesStep.ProcessModule()
2> at Unity.ModuleStep.Execute()
2> at Unity.FixReferencesStep.Execute()
2> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
2> at Unity.Operation.Execute()
2> at Unity.Program.Main(String[ ] args)
2>E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\SweetMadness.csproj(241,5): error MSB3073: The command ““E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\Unity\Tools\AssemblyConverter.exe” -platform=uap -lock=“E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\project.lock.json” -bits=32 -path=”." -path=“…\Players\UAP\x86\Release” “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\Assembly-CSharp.dll” “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\UnityEngine.dll” “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\UnityEngine.UI.dll” “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\G7Plugin.dll” “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\LitJson.dll” “E:\Guava7\Projects\SweetMadnessNew\sweet-madness-unity\BuildWS2\SweetMadness\UnityEngine.Networking.dll”" exited with code 1.
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Hello Guys,

We are facing the same issue, is there a solution for the same ?

Following is our project log:

Restoring NuGet packages…
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck ‘Allow NuGet to download missing packages during build.’
1>------ Build started: Project: product, Configuration: Debug x86 ------
1> UnityInstallationDir “C:\Program Files\Unity\Editor”.
1> UnityWSAPlayerDir “C:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport”.
1> UnityProjectDir “E:\productWindows”.
1> Copying unprocessed assemblies…
1> Running AssemblyConverter…
1> System.ArgumentNullException: Value cannot be null.
1> Parameter name: type
1> at Mono.Cecil.ModuleDefinition.ImportReference(TypeReference type, IGenericParameterProvider context)
1> at Mono.Cecil.ModuleDefinition.ImportReference(TypeReference type)
1> at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
1> at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)
1> at Unity.FixReferencesStep.Visit(MethodDefinition method, GenericContext context)
1> at Unity.FixReferencesStep.Visit(TypeDefinition type)
1> at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
1> at Unity.TypeDefinitionDispatcher…ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
1> at Unity.FixReferencesStep.ProcessModule()
1> at Unity.ModuleStep.Execute()
1> at Unity.FixReferencesStep.Execute()
1> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
1> at Unity.Operation.Execute()
1> at Unity.Program.Main(String[ ] args)
1>E:\productBuilds\product\product.csproj(284,5): error MSB3073: The command ““E:\productBuilds\Unity\Tools\AssemblyConverter.exe” -platform=uap -lock=“E:\productBuilds\product\project.lock.json” -bits=32 -removeDebuggableAttribute=False -path=”." -path=“…\Players\UAP\x86\Debug” “E:\productBuilds\product\Assembly-CSharp-firstpass.dll” “E:\productBuilds\product\Assembly-CSharp.dll” “E:\productBuilds\product\Assembly-UnityScript.dll” “E:\productBuilds\product\UnityEngine.dll” “E:\productBuilds\product\Stores.dll” “E:\productBuilds\product\UnityEngine.Analytics.dll” “E:\productBuilds\product\winrt.dll” “E:\productBuilds\product\GameSparks.dll” “E:\productBuilds\product\P31RestKit.dll” “E:\productBuilds\product\UnityEngine.UI.dll” “E:\productBuilds\product\Tapjoy.dll” “E:\productBuilds\product\ArabicSupport.dll” “E:\productBuilds\product\Apple.dll” “E:\productBuilds\product\GameSparks.Api.dll” “E:\productBuilds\product\UnityEngine.Networking.dll” “E:\productBuilds\product\UnityEngine.Purchasing.dll”" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Do you get any errors in the console when building to Windows Store target from Unity?

Looks like a bug with generics we’ve fixed not so long ago. Can you try upgrading to the latest patch release?

Hello Guys,

Will try with the latest patch release.

Thank you.