MixedRealityToolkit-Unity: Error CS0012 when building for Hololens
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:
Unity Build Window:

Visual Studio Window:
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
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (10 by maintainers)
@StephenHodgson The link was formatted weirdly. I just edited it.
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
I have 2017.1.2 installed on my machine, I will open the project and try a rebuild.
I have set the SDK target to 10.0.15063