Daily Usage Issues

UserException from AnalyseComponentBuild with VS 17.4 Solved with NC v5.14

Started by nikize on 1,565 views

With upgrade to Visual Studio Version 17.14.0 yesterday these issues have been seen on multiple machines in different solutions
NCrunch 5.13.0.4 and earlier (My license was valid to 2025-04-24), so have not been able to test 5.14
Rollback to VS 17.13.6 and NCrunch is working again

dotnet --list-sdks
8.0.408 [C:\Program Files\dotnet\sdk]
9.0.203 [C:\Program Files\dotnet\sdk]
9.0.300 [C:\Program Files\dotnet\sdk]


System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file: 
'RootElementName' is not set. When UseAttributeForTargetFrameworkInfoPropertyNames is true, make sure to set a value for 'RootElementName'.
   at nCrunch.Compiler.ComponentAnalysisContext.()
   at nCrunch.Compiler.ComponentAnalysisContext.AnalyseComponentBuild()
   at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
   at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.(Byte[] )
   at nCrunch.TaskRunner.Ipc.RemoteProxyCommunicator.Invoke(String methodName, Object[] args)
   at nCrunch.Compiler.RemoteBuildRunnerProxy.AnalyseComponentBuild(ComponentLoadParameters parameters)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , DirectoryPath , ExternalProcess )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , EffectiveProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridClientDescription , DotNetCoreSdkVersion  )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
   at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(EffectiveProcessorArchitecture , String )
   at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, IDEVersion ideVersion, BuildEngineId buildEngineId, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFrameworkForMsbuild, String visibleTargetFramework)


With a global.json forcing 8.0 this changes somewhat


System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file: 
The target "_SplitProjectReferencesByFileExistence" does not exist in the project.
   at nCrunch.Compiler.ComponentAnalysisContext.()
   at nCrunch.Compiler.ComponentAnalysisContext.AnalyseComponentBuild()


Edit:
In a pure core project I do see `There is a circular dependency in the target dependency graph involving target` and understand this will require the fix in 5.14.
The other projects I tested are framework (forms and asp.net) so they do get issues when trying to build with dotnet cli

Edited

Thanks for sharing these issues.

Quite a few things broke in the VS 17.14 release and required changes on NCrunch's side. Most of what you've posted here involves errors that are tied to recent fixes, so I'd suggest upgrading to NCrunch v5.14 to see if the problems are solved. I've added a 7 day license to your account that you can use to test this version before upgrading your license.
Thanks, Confirming that it does work with v5.14
License upgrade purchased (this is my personal account, the license actually used is on a different, company owned account)

Post a reply

Log in to reply.