Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Unity Build Error:The type 'Object' is defined in an assembly that is not referenced #53

Closed
Boo0317 opened this issue Sep 2, 2019 · 5 comments
Labels
wontfix This will not be worked on

Comments

@Boo0317
Copy link

Boo0317 commented Sep 2, 2019

Unity Version 2018.3.0f2
It always has error when I build unity project like this:
Assets\Microsoft.MixedReality.WebRTC.Unity\Scripts\Media\VideoSource.cs(34,32): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
I think I have lost something, but I don't know what is missing.
It worked well on Unity Editor.

@Boo0317
Copy link
Author

Boo0317 commented Sep 2, 2019

20190902173758

@eirikhollis
Copy link

Is your project setup like this?
image
Under Edit -> Project Settings -> Other Settings

@djee-ms
Copy link
Member

djee-ms commented Sep 2, 2019

Hi @Boo0317,

The error message points at a missing .NET Standard 2.0 library, which should be installed by Unity if you have the setup that @eirikhollis pointed above.

@Boo0317
Copy link
Author

Boo0317 commented Sep 3, 2019

Thank you for your quickly reply.I've tried IL2CPP it build successed, but I want to build an Unity C# project so I selected .NET rather than IL2CPP. Does it only support IL2CPP now?

@djee-ms
Copy link
Member

djee-ms commented Sep 3, 2019

This is a Unity limitation, see e.g. https://forum.unity.com/threads/2018-2-16f1-uwp-net-scripting-backend-net-standard-2-0-build-errors.588733/

We don't support .NET Standard 2.0 on .NET scripting backend. It's only supported when using Mono and IL2CPP.

The .NET backend is deprecated in 2018.3 and completely removed in 2019.1. There is not much I can do about it, you will have to use IL2CPP.

@djee-ms djee-ms added the wontfix This will not be worked on label Sep 3, 2019
@djee-ms djee-ms closed this as completed Sep 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants