Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

UserException from AnalyseComponentBuild with VS 17.4 Solved with NC v5.14
nikize
#1 Posted : Thursday, May 15, 2025 6:52:51 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/15/2025(UTC)
Posts: 2
Location: Sweden

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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]

Code:

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

Code:

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
Remco
#2 Posted : Thursday, May 15, 2025 7:47:59 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,312

Thanks: 990 times
Was thanked: 1329 time(s) in 1232 post(s)
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.
2 users thanked Remco for this useful post.
nikize on 5/15/2025(UTC), Marcello on 5/30/2025(UTC)
nikize
#3 Posted : Thursday, May 15, 2025 8:09:25 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/15/2025(UTC)
Posts: 2
Location: Sweden

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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)
1 user thanked nikize for this useful post.
Remco on 5/15/2025(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download