question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error CS0012 when building for Hololens

See original GitHub issue

Overview

I am working on a simple prototype. I have a 3D scan of a part which we have prepared into an FBX and would like to view in augmented reality. Scan is fine and object is added to unity however when I build using the latest release of the toolkit on the latest release of Unity I am met with errors on the Visual Studio side of things.

Unity Scene: 1

Unity Build Window: 2

Visual Studio Window: 3

Error I am receiving:

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0012	The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'.	Assembly-CSharp	D:\Users\cmdann\Development\Games\TurbineAR\Assets\HoloToolkit\Utilities\Scripts\ApplicationViewManager.cs	62	Active

All error output: https://gist.github.com/CMDann/1c843168953160a6c94e00b831b58fc1

Notes:

  • I tried cleaning the solution which resulted in more CS0012 errors
  • I am running Visual Studio 2017 Enterprise

Expected Behavior

I would like to deploy the application to the Hololens hardware.

Actual Behavior

Errors (CS0012) in visual studio preventing the application from building.

Steps to reproduce

  • Prepare Scene
  • Build to visual studio
  • Attempt to run on device

Unity Editor Version

  • Unity 2017.2.0b11

Mixed Reality Toolkit Release Version

  • HoloToolkit-Unity-v1.2017.2.0
  • HoloToolkit-Unity-Examples-v1.2017.2.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
keveleighcommented, May 18, 2018

@StephenHodgson The link was formatted weirdly. I just edited it.

1reaction
gladys0313commented, May 18, 2018

Hey guys, I had the same problem and now I have figured it out, please take a look here: https://stackoverflow.com/questions/50314519/cs0012-error-when-building-origami-hololens-101-tutorial/50407748#50407748

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error CS0012 when building for Hololens · Issue #1385
I would like to deploy the application to the Hololens hardware. Actual Behavior. Errors (CS0012) in visual studio preventing the application ...
Read more >
CS0012 error when building Origami (Hololens 101 tutorial)
The type "CoreApplicationView" is defined in an assembly that is not referenced. You must add a reference to assembly "Windows, Version=255.255.
Read more >
CS0012 error when trying to deploy Origami (Hololens 101 ...
In "Building Settings", I selected "Universal Windows Platform", "target device" is hololens, "Build type" is D3D, "SDK" is Latest installed ...
Read more >
CS0012 errors in VS2019 but not in VS 2017 for exact ...
When building a working project in Visual Studio 2017, everything builds without issue. When opening the exact same project in VS 2019, ...
Read more >
[UWP][ARM][.Net] VS2019 fails building project generated ...
Error: "CS0012: The type 'Enum' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2. ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found