I've been keeping an eye on my two favourite tools - NCrunch and Postsharp - and how they handle .NET5 for a few months now and have regularly tried VS previews. The same issue has constantly blocked me. A .NET 5 project that uses Postsharp will happily build in Visual Studio but will not build in NCrunch. It fails with the following error:
[18:14:39.8916-LocalBuildTask-19] ERROR (Internal): System.Exception: System.IO.IOException: File path must be absolute with disk root: FAKE_POSTSHARP_DEBUGGER_DOCUMENT
at nCrunch.Common.IO.FilePath..ctor(String absoluteFilePath, Boolean isAbsoluteFilePathChecked)
at nCrunch.Compiler.Cil.Symbols.Portable.Tables.CilDocumentNameBlob.ToFilePath()
at nCrunch.Compiler.Cil.Symbols.Portable.CilPortableSymbolsManipulator.MapSymbolDocumentPaths(Dictionary`2 documentPathMap)
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Compiler.NewStaticManipulation.BuiltCilAssembly.Instrument(IInstrumentationFilter[] instrumentationFilters, PerfTracker perfTracker)
at nCrunch.Compiler.CilProcessingTasks.CilInstrumentationTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
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..()
From the above, it looks like one of those issues where neither party is exactly doing it the wrong way but are just doing something incompatible with each other. Hope the NCrunch and PostSharp guys can have a chat and figure out how to fix this one.
See
https://support.postshar...tsharp-builds-in-visual
I installed NCrunch 4.5.0.3 today and the latest Postsharp preview version today and the issue is still there.
Note I tried to attach a zip of the solution here for you to tinker with but you can get it off the post from the above link.
Cheers,
playtime.