Hello
We are using NCrunch for a solution with just over 100 projects.
The developers use it locally in Visual Studio 2017 and on the TFS-build-machine we use the console tool to run the tests.
Our architect decided that sooner or later we should move from the old .NET Framework to .NET Core/Standard.
So some of our new projects should already be .NET Standard libraries.
This seems to be a problem for NCrunch.
The visual studio version complained about NuGet-Packages that could not be restored after I added the first .NET Standard project.
The packages it complained about were packages that none of our projects used.
The solution was to let NCrunch ignore these projects.
Now I have added a new .NET Standard project.
This is not a test-project and there is no corresponding test-project either, so the first instinct was to ignore it as well.
However it is referenced by an other (old .NET Framework) project.
That in turn is tested in a test-project.
So ignoring the .NET Standard project is not a solution, as the the .NET Framework project will not build and the test-project will fail as well.
But luckily this project doesn't give us any trouble in Visual Studio.
On our build machine or using the console tool on my own machine the NCrunch console tool throws an exception.
The build machine does not have Visual Studio installed, just msbuild. Could this explain the exception below?
Exception on build machine without Visual Studio installed:
Quote:2019-03-26T03:20:37.7147585Z [04:20:37.4333-Core-7] All projects have been loaded
2019-03-26T03:20:37.7203889Z [04:20:37.7144-Core-7] ERROR (Internal): System.NullReferenceException: Object reference not set to an instance of an object.
2019-03-26T03:20:37.7204343Z at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCorePlatformType.(VisualStudioVersion )
2019-03-26T03:20:37.7204636Z at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCorePlatformType.AllProjectsLoaded(VisualStudioVersion vsVersion)
2019-03-26T03:20:37.7204920Z at nCrunch.Client.Synchronisation.SnapshotSynchroniser.()
2019-03-26T03:20:37.7205168Z at nCrunch.Client.Synchronisation.SnapshotSynchroniser.(DteProjectsAddedWithBuildXmlEvent )
Locally I have Visual Studio but it fails at some later point.
Exception on my machine with Visual Studio installed:
Quote:[09:45:40.9804-Core-7] All projects have been loaded
[09:45:40.9974-Core-7] ERROR (Internal): System.ComponentModel.Win32Exception (0x80004005): The system can not find the file specified
bei System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
bei nCrunch.Core.PlatformTypes.DotNetCore.MSBuildCommandTool.Invoke(DirectoryPath workingDirectory, String commandLine)
bei nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreSdk.RestorePackages(FilePath projectFilePath, VisualStudioVersion vsVersion)
bei nCrunch.Core.PlatformTypes.DotNetCore.DotNetCorePlatformType.(VisualStudioVersion )
bei nCrunch.Core.PlatformTypes.DotNetCore.DotNetCorePlatformType.AllProjectsLoaded(VisualStudioVersion vsVersion)
bei nCrunch.Client.Synchronisation.SnapshotSynchroniser.()
bei nCrunch.Client.Synchronisation.SnapshotSynchroniser.(DteProjectsAddedWithBuildXmlEvent )
Short of turning all our .NET Standard projects into .NET Framework project, how can we get the console tool to work with our solution?
What can I try to solve this problem?
What can I do to find out what really goes wrong?
Seems I was wrong about the Visual Studio version not giving us any trouble.
The error just returned.
Quote: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.
xunit.abstractions v2.0.1
xunit.runner.utility v2.2.0
We are not using xunit, so why should we include xunit-packages?
I hope someone can help me solve this.
Thank you