HoloToolkit build is not compatible with Visual Studio 2017 and MSBuild 15.0
See original GitHub issueIn 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:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ended up going going the route of vswhere like @thebanjomatic pointed out.
@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.