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

Notification

Icon
Error

Instrument Output Assembly + PostBuildEvent
SeriousM
#1 Posted : Monday, April 2, 2012 3:54:46 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
Hi,

i'm trying to use SheepAPO with NCrunch.
SheepAOP modifies the output assembly after compiling in a Post Build Event.
Sadly NCrunch is locking the file so that i have to disable Instrument Output Assembly to avoid this lock.

Would it be possible to set the file lock after compiling is finished?

/EDIT:
Would it be possible to lock the file just the time you analyze it?
Because is just got now the problem that the file is locked DURING the build event...
/EDIT


PS: NCrunch is AWESOME, thanks for this gorgeous tool!!

wkr, Bernhard
Remco
#2 Posted : Monday, April 2, 2012 9:33:42 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Bernhard,

Thanks for posting and I'm glad you're enjoying NCrunch!

NCrunch only instruments an assembly AFTER the entire build process has finished (including all build events), so I'm wondering if the file lock may be the reverse of what you've described (SheepAOP holding a lock for a short period after its work has been done). I should be able to confirm this if you can submit a bug report after you experience the issue.

Does this happen for you consistently or intermittently?


Cheers,

Remco
Remco
#4 Posted : Tuesday, April 3, 2012 10:14:07 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks for sending through the bug report. I'm currently working to reproduce the problem and will update you as soon as I have a workaround.
1 user thanked Remco for this useful post.
SeriousM on 4/3/2012(UTC)
Remco
#5 Posted : Tuesday, April 3, 2012 10:25:26 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Does it make any difference if you set your 'process pool size' to 0 in your NCrunch global configuration?
SeriousM
#6 Posted : Wednesday, April 4, 2012 11:13:42 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
This has no impact to the problem :(
Remco
#7 Posted : Wednesday, April 4, 2012 9:32:26 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I've been digging through the source code of the SheepAspect project and I think I may have found the issue.

When SheepAspect performs its manipulation of your output assemblies, it uses Mono.Cecil to write assemblies back to disk along with their symbols. The Mono.Cecil symbol writer is backed onto a COM object (ISymbolWriter) that tends to hold file locks until the object is fully disposed and garbage collected (which can happen at a non-deterministic time). I'm aware of this issue because I had similar problems with earlier versions of NCrunch and had to introduce a specific fix to address this.

Under process manager, it would likely show that the NCrunch taskrunner is holding the file lock. This is because the NCrunch taskrunner is hosting MSBuild along with the SheepAspect build step responsible for the above. Under non-NCrunch build conditions the msbuild process is transient; terminating after its work has been completed and thereby releasing the file lock.

Sorry, I'm afraid there is nothing I can do to solve this problem within NCrunch. You'll need to raise it with the SheepAspect developer.


Cheers,

Remco
SeriousM
#8 Posted : Thursday, April 5, 2012 8:16:50 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 4/2/2012(UTC)
Posts: 40
Location: Vienna

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
alright, thank you very much for the testing!!
i will contact the sheep aspect developer due this issues.
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.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download