Build/Test Issues

Project using PostSharp builds in Visual Studio but not in NCrunch.

Started by playtime222 on 2,077 views

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.postsharp.net/request/27818-project-using-postsharp-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.

Edited

Hi,

Thanks for sharing this issue.

It looks to me like Postsharp are including a non-file string in the PDB symbol data. We haven't seen this before, but its probably legal as otherwise the runtime would throw it out.

Hopefully this will be a simple fix on our side. We'll let you know as soon as we have more information.
Would you be interested in trying the build below to see if this solves the issue for you?

NCrunch_Console_4.6.0.2.msi
NCrunch_Console_4.6.0.2.zip
NCrunch_GridNodeServer_4.6.0.2.msi
NCrunch_GridNodeServer_4.6.0.2.zip
NCrunch_LicenseServer_4.6.0.2.zip
NCrunch_VS2008_4.6.0.2.msi
NCrunch_VS2010_4.6.0.2.msi
NCrunch_VS2010_4.6.0.2.zip
NCrunch_VS2012_4.6.0.2.msi
NCrunch_VS2012_4.6.0.2.zip
NCrunch_VS2013_4.6.0.2.msi
NCrunch_VS2013_4.6.0.2.zip
NCrunch_VS2015_4.6.0.2.msi
NCrunch_VS2015_4.6.0.2.msi.7z
NCrunch_VS2015_4.6.0.2.zip
NCrunch_VS2017_4.6.0.2.msi
NCrunch_VS2017_4.6.0.2.msi.7z
NCrunch_VS2017_4.6.0.2.zip
NCrunch_VS2019_4.6.0.2.msi
NCrunch_VS2019_4.6.0.2.msi.7z
NCrunch_VS2019_4.6.0.2.zip
Works on my box with the test project I sent you previously, so we can call that done. I'll be migrating a large project shortly to .NET 5. This gives me some confidence I can move forward with that now. Thanks for the swift response.

Post a reply

Log in to reply.