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.

HoloToolkit build is not compatible with Visual Studio 2017 and MSBuild 15.0

See original GitHub issue

In the official HoloLens documentation, Visual Studio 2017 is supported (https://developer.microsoft.com/en-us/windows/mixed-reality/install_the_tools)

Since Visual Studio 2017, MSBuild 15.0 is not longer a standalone package and we can install different versions, each are in a subfolder of Visual Studio.

However, Holotoolkit is relying on registry key, that is right with previous version of Visual Studio 2017 :

        public static string CalcMSBuildPath(string msBuildVersion)
        {
            using (Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(string.Format(@"Software\Microsoft\MSBuild\ToolsVersions\{0}", msBuildVersion)))
            {
                if (key == null)
                {
                    return null;
                }
                string msBuildBinFolder = key.GetValue("MSBuildToolsPath") as string;
                string msBuildPath = Path.Combine(msBuildBinFolder, "msbuild.exe");
                return msBuildPath;
            }
        }

The file https://github.com/Microsoft/HoloToolkit-Unity/blob/master/Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs should be changed to take new MSBuild location into account.

Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
StephenHodgsoncommented, Jun 11, 2017

Ended up going going the route of vswhere like @thebanjomatic pointed out.

1reaction
jessemccullochcommented, Apr 29, 2017

@LifeAlchemist - After replacing the files that you did, I also hard-coded the calcMSBuildPatch method in BuildDeployTools.cs to return the path to my MSBuild 15 instance. Mine is at C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe

Yours should be at a similar path, just replacing Professional with whatever version of VS2017 you are running, if it’s not professional.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HoloToolkit build is not compatible with Visual Studio 2017 ...
Since Visual Studio 2017, MSBuild 15.0 is not longer a standalone package and we can install different versions, each are in a subfolder...
Read more >
The tools version "15.0" is unrecognized - Incompatible ...
c# - The tools version "15.0" is unrecognized - Incompatible/Unloaded project in Visual Studio 2019 (v16. 0.0 Preview 5.0) - Stack Overflow.
Read more >
Visual studio not retrieving the right path to MsBuild version
I have installed MSbuild 15.0 on this device so I am expecting the error to atleast be = “15.0” instead of nothing.
Read more >
Assembly-CSharp.dll' could not be found [HoloLens]
I created a test project to troubleshoot a build error. Using Unity 5.5.1f. I set up the project to build for Hololens and...
Read more >
Visual Studio Toolbox: Accelerate your builds of SDK-style ...
The Visual Studio Toolbox show helps you become a more productive developer by focusing on tooling in and out of Visual Studio.
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