I have a C# test project that uses a managed 32bit C++ dll. As a result, the csproj file contains this...
Quote:<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
This worked fine when I was targetting Net5 but under Net6, Ncrunch fails to build the project and reports
Quote:[PID:23340 16:41:42.5767 LocalBuildTask-150] ERROR (Internal): System.Exception: dotnet.exe was not found at 'C:\Program Files (x86)\dotnet\dotnet.exe'
at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreSdk.(EffectiveProcessorArchitecture )
at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreSdk.GetToolPath(EffectiveProcessorArchitecture effectiveProcessorArchitecture)
at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreSdk.GetFallbackFolderPath(EffectiveProcessorArchitecture processorArchitecture)
at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreBuildExtender.(SnapshotComponent , FilePath , DirectoryPath[] )
at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreBuildExtender.(SnapshotComponent , BuildOutput )
at nCrunch.Core.PlatformTypes.DotNetCore.DotNetCoreBuildExtender.ProcessSuccessfulBuildOutput(SnapshotComponent component, BuildOutput buildOutput, IList`1 componentReferences)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridAddress clientAddress, Boolean extractCoverageReportStructure)
at nCrunch.Core.Processing.BuildTaskLogic.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.TaskLogic.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.LocalProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Client.Processing.ProcessingQueue..()
However, I believe that this is the wrong location for dotnet 6...
Quote:16:46/Backend>get-command dotnet
CommandType Name Version Source
----------- ---- ------- ------
Application dotnet.exe 6.0.121.5… C:\Program Files\dotnet\dotnet.exe
If I remove the x86 platform target, Ncrunch successfully builds the project but tests fail because the DLL can't be loaded.
Ncrunch is 4.11.02
VS is 17.0.5 (VS2022, stable)