My question is related to this post, but I wanted to open a new thread for a slight variation of the problem.
I get the same error message running in Visual Studio 2017, and in the post, the stated workaround was to run the solution in Visual Studio 2015 instead. However, when I try to deploy in 2015, it gives me an error message saying I'm targeting the Windows 10 Creators Update and therefore need an updated version of Visual Studio to run it (which is, of course, 2017).
Does anyone know how to get around this or how to stop it from targeting the Creators Update? I'm writing my thesis using a HoloLens, so I'm on a very tight time crunch, unfortunately. :(
Thank you!!
P.S. The Unity website has marked this bug as resolved in Unity 2017, but I still get the bug on 2017.2, so updating Unity won't help.
Ok, I actually found a workaround for anyone else who has this same problem.
1) Build your Unity project as usual and then run it once in VS2017.
2) This build will fail, but it will generate your project.lock.json file.
3) Open that file (I just did this by searching for "project.lock.json" in my build file in file explorer) and look under the "targets" tag.
4) There will be quite a few lines that specify the target version. It will look like this:
Change all of those target versions to just v10.0 so it looks like this:
5) Now run again in Visual Studio 2017 and it should be fixed!
Be sure to go give this hero an up-vote for finding the workaround first (https://forums.hololens.com/discussion/8382/hololens-universal10-build-json-dll-error-solve#latest)!