Error when building Unity Build in Visual Studio

edited September 2017 in Questions And Answers

Hello there,

I'm trying to get into building stuff for the Hololense. Everything works fine in Unity (no Building Errors, can look around and all other stuff) but when I make a build (with and without Developer C# Checkbox) and try to buid it in Visual Studio (Emulator & Remote Desktop to the Hololense itself) I'll get around 10k-20k errors saying stuff like "Predefined type "System.Object" is not defined or imported" and "The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

Even when following the Microsoft Tutorials I get the same Errors.

I tried to clean and rebuild it, to build the whole thing new in Unity, change the .Net version and so on but even a completely new Project with nothing in the scene shows me 77 Errors.

I use VS 2017 and tried Unity 2017.01 and the Beta but same problems in both versions.

Sorry for my bad English ^^'
I really hope someone can help me

Best Answer

  • Accepted Answer

    Nvm I fixed it. Will make a new Post on how for everyone who is interested in ow to fix it.

Answers

  • Have you tried selecting a different SDK version when you build? By default it tries to use "Latest installed".

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • @james_ashley said:
    Have you tried selecting a different SDK version when you build? By default it tries to use "Latest installed".

    No, never tried to change the SDK version (thought the new one will be better)
    I reinstalled windows and will it try again today (after VS 2017 and Unity is installed)

  • Using a older SDK just gives me more Errors.. Any Ideas?

    Btw "using System" is greyed.. Any way to fix that?

  • Accepted Answer

    Nvm I fixed it. Will make a new Post on how for everyone who is interested in ow to fix it.

  • Hi TheGaMERCat how did you solve it?

Sign In or Register to comment.