Version:
NCrunch Console Tool v4.5.0.3
OS:
Teamcity Build Agent
Windows Server 2016 Standard
Test Framework:
xUnit
Pre-Change Visual Studio Solution Project Overview and Target Frameworks (this works!):
C# Web Project1 - Framework 4.8
C# Web Project1_Tests - Framework 4.8
C# Library Project2 - Framework 4.8
C# Library Project2_Tests - Framework 4.8
C# Library Project3 - Framework 4.8
C# Library Project3_Tests - Framework 4.8
Post-Change Visual Studio Solution Project Overview and Target Frameworks (this does NOT work):
*We are updating a class library to from >NET Framework to .NET Standard, and a test project to from .NET Framework to .NET Core.
C# Web Project1 - Framework 4.8
C# Web Project1_Tests - Framework 4.8
C# Library Project2 - .NET Standard 2.0
C# Library Project2_Tests - .NET Core App 3.1C# Library Project3 - Framework 4.8
C# Library Project3_Tests - Framework 4.8
PROBLEM:
After attempting to upgrade a test project to .NET Core and a Class Library to .NET Standard, we are now receiving the following errors:
Quote:[14:01:23.1007-Core-7] ERROR: Unable to restore required Nuget packages for .NET Core test environment
NCrunch was unable to restore Nuget packages required to build a test environment for this solution, due to an unspecified failure when invoking 'msbuild.exe /t:restore'
The following packages do not exist under the Nuget packages folder for the active user profile, yet they have been flagged by NCrunch as potentially needed for normal operation. NCrunch has attempted to restore these files via an MSBuild restore step, which has either failed or not returned the expected result. It's possible that these packages may not be needed for building projects or running tests in your environment. If you experience downstream problems with NCrunch on this solution, it is recommended you restore or download the packages manually.
Note that the restore of packages may fail if NCrunch is being hosted under a windows account that does not have sufficient rights to store files in the Nuget packages directory.System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
System.Diagnostics.TraceSource v4.3.0
System.Runtime.Loader v4.3.0
xunit.runner.utility v2.4.1
We've had issues with this error in the past and our solution was detailed in this post:
https://forum.ncrunch.net/yaf_po...g-Unneeded-Packages.aspxThis issue is ONLY related to when we attempt the Target Framework versions as detailed above, otherwise the solution listed in the above linked forum page is working successfully. I've validated that the above packages do exist in the home directory .ncrunch\ location for the user running NCrunch, and that user does have sufficient permissions to write/read them.
Once the above restore failure occurs we then get this error (XXX_* indicates redacted text):
Quote:14:02:08.8307-LocalAnalysisTask-18] Calling into task runner to analyse target assembly: C:\Users\XXX_username\AppData\Local\NCrunch\8196\13\XXX_WebProject1.Web.Tests.Unit\bin\Debug\XXX_WebProject1.Web.Tests.Unit.dll
[14:02:09.3606-LocalAnalysisTask-26] ERROR (Internal): nCrunch.TaskRunner.Ipc.IpcConnectionClosedException: The connection has been closed
at nCrunch.TaskRunner.Ipc.Fast.IpcReader.Initialise()
at nCrunch.TaskRunner.Ipc.Fast.IpcStream.Connect(String ipcName, Boolean isHost)
at nCrunch.TaskRunner.Ipc.Fast.FastIpcClient.Connect(String ipcName)
at nCrunch.Core.ProcessManagement.DefaultProcessLoader.ConnectToProcess(ExternalProcess externalProcess, ProcessLoadParameters parameters, Action`1 outOfBandMessageHandler)
at nCrunch.Core.ProcessManagement.ExternalProcessManager..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.ProcessManagement.ExternalProcessManager.(EffectiveProcessorArchitecture , ProcessLoadParameters )
And then finally this output indicating a failure:
Quote:Execution result based on (ConsoleOutput):
Load errors: False
Failed tasks: True
Failed tests: False
Not run tests: False
Impacted tests:
Result: BuildFailure
[14:02:19.7409-?-1] Shutting down engine
[14:02:19.9747-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\11
[14:02:21.9852-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\1
[14:02:22.0632-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\10
[14:02:22.3593-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\6
[14:02:22.3905-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\13
[14:02:22.5307-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\12
[14:02:22.6243-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\14
[14:02:22.671-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\3
[14:02:22.7022-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\2
[14:02:22.7489-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\5
[14:02:22.8269-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\9
[14:02:22.8736-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\8
[14:02:23.2633-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\7
[14:02:23.31-Core-43] Cleaning up workspace: C:\Users\XXX_user\AppData\Local\NCrunch\8196\4
[14:02:25.0401-?-1] Returning result: BuildFailure
Thank you,
-Matt