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

Notification

Icon
Error

An exception was thrown in the remote environment, Errors occurred while trying to load the project
ovation22
#1 Posted : Monday, February 12, 2018 4:25:12 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/12/2018(UTC)
Posts: 6
Location: United States of America

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
I came in this morning and was forced to reboot to apply Windows Updates. What once was working in 2 separate solutions now results in similar issues/failures. Is there something further I should look at or any additional information I can provide to help track down the issue?

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 specified project reference metadata for the reference "..\MBA.Integrations.Utilities.Prism\MBA.Integrations.Utilities.Prism.csproj" is missing or has an invalid value: Project
The specified project reference metadata for the reference "..\MBA.Integrations.Utilities\MBA.Integrations.Utilities.csproj" is missing or has an invalid value: Project
   at nCrunch.Compiler.RemoteBuildRunner.(FilePath , LoadTimeQuery , String , String , DirectoryPath , String , String )
   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.RemoteInstance.(Byte[] )
   at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
   at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , ProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 , Nullable`1 , GridAddress )
   at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
   at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(ProcessorArchitecture , String )
   at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)
ovation22
#2 Posted : Monday, February 12, 2018 4:50:05 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 2/12/2018(UTC)
Posts: 6
Location: United States of America

Thanks: 4 times
Was thanked: 1 time(s) in 1 post(s)
Hmm, upon further investigation it looks like a colleague using Project Rider might be to blame. Looks like Rider adds references as:

<ProjectReference Include="..\MBA.Data.Services.Processes.Interface\MBA.Data.Services.Processes.Interface.csproj">
<Project>{A37F61F4-6E7C-4CCD-91A8-2AAD9AE2A88E}</Project>
<Name>MBA.Data.Services.Processes.Interface</Name>
</ProjectReference>

Modifying to:

<ProjectReference Include="..\MBA.Data.Services.Processes.Interface\MBA.Data.Services.Processes.Interface.csproj" />

And all is well. This feels like perhaps an update to NCrunch might be required? All tests run as expected with Resharper and VS Test.
Remco
#3 Posted : Monday, February 12, 2018 11:25:48 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this problem.

It's interesting that VS is still able to accept this change in structure. Prior versions would have exploded if this were changed. We'll take a look to see if we can make NCrunch more resilient here. Thanks for taking the time to report this.
michaelkroes
#4 Posted : Thursday, February 15, 2018 4:21:57 AM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 306
Location: Netherlands

Thanks: 138 times
Was thanked: 73 time(s) in 69 post(s)
Hi, I had a look at reproducing this problem.

I created a solution with two projects in Visual Studio one referencing the other. When I did this the csproj file had the same layout as you reported after opening it in Rider (So the one with the multiple tags and the guid). I also opened that project in Rider and readded the project reference. Both visual studio and ncrunch could work with that project file. I tried different versions of visual studio as well.

Would you mind helping us out by creating a sample project that fails in NCrunch after it was opened in Rider? Could you send us that via the contact form? (https://www.ncrunch.net/Support/Contact)
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.030 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download