Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building for Universal Windows Platform #10

Closed
FireDragonGameStudio opened this issue Aug 2, 2018 · 23 comments
Closed

Error when building for Universal Windows Platform #10

FireDragonGameStudio opened this issue Aug 2, 2018 · 23 comments

Comments

@FireDragonGameStudio
Copy link

FireDragonGameStudio commented Aug 2, 2018

Hy,
when I try to build a project for UWP, there are always 3 errors showing up, after the build finished successfully. I'll just attach text files containing the error messages, to keep this post readable. Nevertheless the build succeeded and I'm also able to deploy to Hololens, but these errors are confusing and maybe they'll cause errors in future development.

Is there something I'm missing or doing wrong?

Best regards :)

Operation system and version numbers

OS: Windows 10 x64
Unity: 2018.1.6f1, BuildTarget UWP
HLAPI Community Edition: 2018.1

LogFiles

ReferenceRewriterFoundSomeErrors.txt
ReferenceRewriterErrorMethodSystem.Void.txt
ReferenceRewriterErrorMethodSystem.UInt64.txt

unityconsolecapture

@paulpach
Copy link
Contributor

paulpach commented Aug 2, 2018

does it build with default HLAPI?

@SoftwareGuy
Copy link
Contributor

If it doesn't build with the stock HLAPI then something is very wrong like @paulpach suggests.

@FireDragonGameStudio
Copy link
Author

FireDragonGameStudio commented Aug 3, 2018

Hi @paulpach, hi @SoftwareGuy,
thx for your swift replies. I tried Unity 2018.1.6f1 with default HLAPI and there are no errors. To make sure the Unity version does not affect this one I tried default and HLAPI CE with Unity 2018.1.9f1 and it results in the same behaviour. No errors when using default UNET and the "Reference Rewriter" errors when using HLAPI CE.

Best regards :)

@SoftwareGuy
Copy link
Contributor

What version of the HLAPI DLLs are you using, and what branch? A lot of development is going on in the 2017.4-improvements branch, but it's not recommended to use that one on 2018.1 from what I know.

@FireDragonGameStudio
Copy link
Author

FireDragonGameStudio commented Aug 3, 2018

I use the 2018.1 version, downloaded from the link in the Unity Forum. Would it be helpful if I provide you a sample project?

@paulpach
Copy link
Contributor

paulpach commented Aug 3, 2018

@FireDragonGameStudio it would definitely help.

Find us in discord, where we can chat.

@FireDragonGameStudio
Copy link
Author

@paulpach Unfortunately I can't join the discord server, due to an invalid invite link.

@Lymdun
Copy link
Contributor

Lymdun commented Aug 3, 2018

@FireDragonGameStudio Use this link then.

@FireDragonGameStudio
Copy link
Author

FireDragonGameStudio commented Aug 5, 2018

Hy, please find the link to my example project attached. I hope this can help to track this down. :)
https://drive.google.com/open?id=1Ijn6p3pu0pwBb-gXPw4sAeJ3HOcI6bNR

@SoftwareGuy
Copy link
Contributor

@FireDragonGameStudio
Okay, so 2018.1 UNET with Unity 2018.1. Got it.
Will attempt to replicate this.

Please provide replication instructions; do I just try to compile and have it blow up in my face?

@FireDragonGameStudio
Copy link
Author

@SoftwareGuy Hope you can replicate it. Yes, just build it for UWP, that's all. It should give you the error messages as shown in the image/textfiles of the first post.

@SoftwareGuy
Copy link
Contributor

SoftwareGuy commented Aug 7, 2018

I was able to replicate this after installing the latest UWP SDK (I didn't have it installed since I'm not targeting UWP platforms). You can confirm that it's similar if not the same to your issue by taking a look at the attachments.

I used my local copy of Unity 2018.1.7 x64 to replicate it.

capture
capture2

@FireDragonGameStudio
Copy link
Author

@SoftwareGuy yes, these are exactly the same errors I get, when building a UWP project.

@paulpach
Copy link
Contributor

paulpach commented Aug 7, 2018

The methods are clearly defined in HLAPI.

It sounds like Unity uses a different version of the unity.networking dll when building UWP. Can you check if there are other networking dlls inside the unity installation?

@FireDragonGameStudio
Copy link
Author

Afaik is there some kind of "Metro" UWP dll, which contains the UWP implementations for this case. I'm currently not at home, but I'll check asap.

@paulpach
Copy link
Contributor

paulpach commented Aug 7, 2018

That would explain it. Check if there is a Metro UnityRuntime.Networking.dll somewhere

@SoftwareGuy
Copy link
Contributor

Tried replacing the Metro Unity.Networking.dll file and it apparently fails to run some UWP weaver to generate the UWP code or something (I've given @paulpach the log).

This is going to be a tough one to fix unless it's trivial; as it seems to be one of the uncommon usage cases.

@FireDragonGameStudio
Copy link
Author

@SoftwareGuy As far as i could check, the folder "..\Editor\Data\PlaybackEngines\MetroSupport\Managed\UAP" contains the UnityEngine.Networking.dll AND WinRTLegacy.dll which are both used to build UWP apps. The WinRTLegacy.dll is responsible to provide specific code for UWP apps, which is not available through default .NET implementation.

Is there some HLAPI CE substitute for the WinRTLegacy.dll?

@paulpach
Copy link
Contributor

@FireDragonGameStudio we are making a drop in version. It should work with all platforms

@paulpach
Copy link
Contributor

@FireDragonGameStudio Mirror is released. Can you go ahead, try it and see if it solves the issue?

@FireDragonGameStudio
Copy link
Author

I'll try it and report the result.

@FireDragonGameStudio
Copy link
Author

Unfortunately the UWP/Hololens build still fails with errors (pls see screenshot) I guess the main reason is still the same. Telepathy uses components from the System.Net namespace (as well as other namespaces), which UWP doesn't support. I assume the WinRTLegacy.dll would provide interfaces for this replacement.

capturetelepathyuwpbuilderrors

@FireDragonGameStudio
Copy link
Author

Ok, forget it. I just tried to build with the backend setting changed to IL2CPP and the build was successful. And as the .NET backend is deprecated by Unity with Unity 2018.2 this issue can be closed :) (https://forum.unity.com/threads/deprecation-of-support-for-the-net-scripting-backend-used-by-the-universal-windows-platform.539685/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants