I've installed the latest release of NCrunch for Visual Studio 2013, and cannot run any unit tests due to NCrunch failing to find MSBuild.
This is the call stack for the exception shown:
System.Exception: Unable to find a usable version of MSBuild on this machine.
at nCrunch.Core.BuildManagement.MSBuildEngineRegistry.GetBuildableProjectForVisualStudioVersion(VisualStudioVersion vsVersion)
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(FilePath projectFilePath, BuildXml buildXml, String useBuildConfiguration, String useBuildPlatform, DirectoryPath solutionDir, String solutionName, List`1 importExpressionsToEvaluate, ProcessorArchitecture processorArchitecture, VisualStudioVersion vsVersion, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.(ProcessorArchitecture )
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(FilePath projectFilePath, BuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, ISnapshotConfig snapshotConfig, VisualStudioVersion vsVersion)
Setup Problems
Unable to find a usable version of MSBuild on this machine
Started by gsm122448 on 6,464 views
Remco NCrunch Developer
#9301
14 Oct 2016 22:23 UTC
Hi, thanks for sharing this issue.
When NCrunch searches for MSBuild under VS2013, it looks for the following assembly in your GAC:
Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL
If the assembly cannot be found, NCrunch will throw this error.
It's my understanding that under VS2013, this assembly should normally be registered in your GAC. Can you check whether it exists? If the VS installer didn't register it, you may need to do so manually using Gacutil.exe
When NCrunch searches for MSBuild under VS2013, it looks for the following assembly in your GAC:
Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL
If the assembly cannot be found, NCrunch will throw this error.
It's my understanding that under VS2013, this assembly should normally be registered in your GAC. Can you check whether it exists? If the VS installer didn't register it, you may need to do so manually using Gacutil.exe
Post a reply
Log in to reply.