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

Notification

Icon
Error

Interop.ActiveDS causes unreliable build in ncrunch
JByford-Rew
#1 Posted : Wednesday, May 18, 2011 10:13:48 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
Our project uses Interop.ActiveDS and the build does not work.
When I say build the ncrunch processing queue
Remco
#2 Posted : Wednesday, May 18, 2011 12:04:07 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Are you able to give any more information about how the build is failing? I.e. the messages showing etc.

Also, if you haven't already - it's worth having a look at troubleshooting build issues in the wiki.
JByford-Rew
#3 Posted : Wednesday, May 18, 2011 3:34:43 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
The problem is intermittent. When I first load the solution the ncrunch process queue reports the error below. After I 'rebuild solution' from the VS Build menu, it will be fine. I have also added a **.* as the additional files in the affected project but am unsure if this helps because the problem is intermittent.

error I get

"SGEN (0): Could not load file or assembly 'Interop.ActiveDs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a8927aaac6c90a93' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)"

Thanks
Remco
#4 Posted : Wednesday, May 18, 2011 4:43:36 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Is the Interop.ActiveDs assembly being referenced directly from the output directory of the location it's built from? This would make sense, as rebuilding the entire solution would update the file (and therefore NCrunch would grab a new reference to it).

I have little knowledge about this assembly or how it's derived, but should it perhaps be a project reference rather than an assembly reference?



Cheers,

Remco
JByford-Rew
#5 Posted : Thursday, May 19, 2011 8:33:44 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
The interop assembly is referenced in the References folder of the troublesome project within the solution (containing many projects). I am not sure if it is referenced from the output directory. I cannot be a project reference as we did not create the ActiveDS component but Visual Studio creates the Interop.
Remco
#6 Posted : Thursday, May 19, 2011 11:25:28 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
The next time you see the SGEN failure, could you use the Submit Bug Report option in the dropdown menu? I'd like to have a look at the logfile to see what's going on.


Cheers,

Remco
JByford-Rew
#7 Posted : Thursday, May 19, 2011 3:15:35 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
Submitted
1 user thanked JByford-Rew for this useful post.
Remco on 5/19/2011(UTC)
JByford-Rew
#8 Posted : Monday, May 23, 2011 8:19:27 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
Hi, I wondered if you had a chance to look at the error log relating to this yet?
Remco
#9 Posted : Monday, May 23, 2011 5:15:38 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Sorry for the delay in getting back to you on this one. I've had a thumb through the report, although it looks like the log file didn't make it through intact. Did the report submission form show everything as OK when you submitted the report?

It would be great if you can try pushing another report through. Another way to get more information about the build issue is to go to your global configuration, turn on 'LogToOutputWindow', and set 'LogVerbosity' to 'Detailed'. When you select the failed task in the processing queue, you should see a much more detailed dump of the MSBuild output leading up to the error. Copy/pasting this dump into the forum is an alternative to submitting the bug report.

I've also had a bit of a look at the assembly reference you're having issues with, and it seems this is quite a common assembly with which to have issues when working between x86/x64. Is there anything more you can tell me about the target CPU for the projects you're building?

I'd be interested to know whether removing your wildcard **.* reference makes much difference in how this build issue behaves. NCrunch wasn't really designed to work with a wildcard that might also include build output files (which **.* would tend to do).
JByford-Rew
#10 Posted : Tuesday, May 24, 2011 9:01:01 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
Remove **.* breaks it again immediately. There is no pattern to what breaks it and what actions make it work again. It seems completely random when ncrunch decides to build that part of the solution again. **.* seems to have a positive affect though.
JByford-Rew
#11 Posted : Tuesday, May 24, 2011 9:20:32 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
After turning on LogToOutputWindow and Detailed LogVerbosity and clicking on the failed task in the processing queue I get the same amount of detailed message which is
"SGEN (0): Could not load file or assembly 'Interop.ActiveDs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a8927aaac6c90a93' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)"


JByford-Rew
#12 Posted : Tuesday, May 24, 2011 9:34:40 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/18/2011(UTC)
Posts: 8
Location: Newbury, UK

Was thanked: 1 time(s) in 1 post(s)
Sometimes I get this message
"
(0): Unable to find built assembly. Checked locations: C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\debug\Interconnect.Framework.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\debug\Interconnect.Framework.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\debug\CIF.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\debug\CIF.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\Interconnect.Framework.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\Interconnect.Framework.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\CIF.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\CIF.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\debug\Interconnect.Framework.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\debug\Interconnect.Framework.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\debug\CIF.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\debug\CIF.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\Debug\Interconnect.Framework.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\Debug\Interconnect.Framework.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\Debug\CIF.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\bin\Debug\CIF.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\.\Interconnect.Framework.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\.\Interconnect.Framework.exe
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\.\CIF.dll
C:\Users\JeremyBR\AppData\Local\NCrunch\6740\3\x\x\.\CIF.exe
"
Remco
#13 Posted : Tuesday, May 24, 2011 6:26:02 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I believe the **.* is acting as a crutch for your NCrunch build, allowing it to work in situations where probably it should be failing consistently .. That's a theory anyway :)

Would you be able to copy/paste the MSBuild output leading up to the SGEN failure?

Something else you can try is to set CopyReferencedAssembliesToWorkspace property on all of your projects to TRUE. This will help us identify whether the SGEN problem is a symptom of a dependency resolution issue.
Remco
#14 Posted : Sunday, June 19, 2011 4:06:01 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
It seems that the SGEN issue is caused by the build process attempting to derive a serialization assembly from a project that is set to be signed during the build.

Basically, NCrunch is forcing MSBuild to delay sign the assembly so that it has the opportunity to properly instrument it post-build. SGEN kicks in too early, and the delay signing messes it up.

I'm working on a fix for this to be released in 1.33b.

Meanwhile, the cleanest workaround for this issue is to turn off the 'Generate serialization assembly' option for your project when building in DEBUG mode. Otherwise, you can shut off NCrunch's instrumentation for this project by adjusting the InstrumentAssembly configuration option (though you will lose all code coverage for the project if you do this).
GraemeF
#15 Posted : Thursday, September 1, 2011 9:55:58 AM(UTC)
Rank: Member

Groups: Registered
Joined: 5/14/2011(UTC)
Posts: 12
Location: UK

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
Remco;220 wrote:
It seems that the SGEN issue is caused by the build process attempting to derive a serialization assembly from a project that is set to be signed during the build.

Basically, NCrunch is forcing MSBuild to delay sign the assembly so that it has the opportunity to properly instrument it post-build. SGEN kicks in too early, and the delay signing messes it up.

I'm working on a fix for this to be released in 1.33b.


Hi - just wondering if this fix will be in the next release :)
Remco
#16 Posted : Thursday, September 1, 2011 6:35:37 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Absolutely! :)
1 user thanked Remco for this useful post.
GraemeF on 9/5/2011(UTC)
GraemeF
#17 Posted : Monday, September 5, 2011 12:20:55 PM(UTC)
Rank: Member

Groups: Registered
Joined: 5/14/2011(UTC)
Posts: 12
Location: UK

Thanks: 4 times
Was thanked: 2 time(s) in 2 post(s)
Everything works straight away in v1.33b - I've even deleted all of our crunch config files! Brilliant! :D
1 user thanked GraemeF for this useful post.
Remco on 9/5/2011(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.092 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download