Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Project using PostSharp builds in Visual Studio but not in NCrunch.
playtime222
#1 Posted : Thursday, November 12, 2020 5:28:35 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/5/2019(UTC)
Posts: 4
Location: Netherlands

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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.
Remco
#2 Posted : Thursday, November 12, 2020 11:19:43 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,201

Thanks: 807 times
Was thanked: 1065 time(s) in 1012 post(s)
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.
1 user thanked Remco for this useful post.
playtime222 on 11/13/2020(UTC)
Remco
#3 Posted : Wednesday, November 18, 2020 3:17:59 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,201

Thanks: 807 times
Was thanked: 1065 time(s) in 1012 post(s)
playtime222
#4 Posted : Wednesday, November 18, 2020 10:47:37 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/5/2019(UTC)
Posts: 4
Location: Netherlands

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Will do.
playtime222
#5 Posted : Wednesday, November 18, 2020 10:56:42 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/5/2019(UTC)
Posts: 4
Location: Netherlands

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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.
1 user thanked playtime222 for this useful post.
Remco on 11/18/2020(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.046 seconds.