Setting up a new computer I've been unable to run any tests since things won't build
There are projects in this solution that have not been reported as loaded by the IDE during NCrunch initialisation. It is possible that these projects are of an unusual type and NCrunch has been unable to correctly detect them, or they may be 'unloaded' in Visual Studio.
If these projects are not required for your NCrunch session, it is recommended that you ignore them using the NCrunch 'Ignore this component completely' configuration setting.
The following projects exist in this solution but could not be resolved by NCrunch during initialisation:
This is in Visual Studio Enterprise 2019 16.2.5
NCrunch 3.31.0.3
A colleague also recently got a new system, which basically the same setup, and does not have this problem.
My first guess would be that you have projects in this solution that need something to be installed on your machine, which isn't there right now. This message is basically a catch-all for a situation where NCrunch sees that projects are inside the VS solution file, but VS isn't reporting them.
What kind of projects are listed? Do you get the same result if you create a new solution with these kind of projects included in it? Do the project types appear in the list of available projects for creation?
Everything builds ok from VS, and tests are working in the Resharper test-runner. So I don't see any obvious dependency missing.
It's mostly typical csharp projects, about 50 of them, one or two service fabric projects, that has been configured to be ignored by ncrunch.
I have another solution sharing some, but not all, of the projects. Same issue in both.
An interesting thing is that there is only a single project listed as not resolved, and according to the visual studio build order it's the first project to build in both solutions.
Creating a new sln, with only this project
I.e.
dotnet new sln
dotnet sln add ..\the project\
Exhibits the same issue.
But I did notice another thing checking the processing queue, I also got this error
[13:11:42.855-LocalBuildTask-69] ERROR (Internal): System.Exception: Code file C:\somefile.cs has no content to compile
at nCrunch.Core.BuildManagement.BuildEnvironment.()
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.ProcessingQueue..()
The file in question seem to cause some utf-8 vs. iso-8859-1, confusion having an invalid utf-8 character in a comment. Looks like it could be a bit a work to get that sorted though, will get back to you after fixing this.
johnn wrote:Yes, after removing the offending ISO-8859-1 characters ncrunch is happily building again
Nice work in figuring this out. It's interesting that this showed up on your machine but not on other ones.
Is there any chance I could get a copy of the problematic file so that I can introduce a fix for this? Note that any file that reproduces the issue is fine (if you want to build a new one or strip it down for IP reasons). You can submit it via the NCrunch contact form.
// Invalid UTF-8: �
using System;
namespace NCrunchRepro
{
public class Class1
{
}
}
The invalid character there is just é in ISO-8859-1
The reason I was the only one seeing it is probably related to how I installed and configured git, and the order in which I did that relative to cloning the repository.