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

Notification

Icon
Error

Project builds fine in IDE and MSBuild but fails in NCrunch build
jeremygray
#1 Posted : Monday, June 20, 2011 5:41:37 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/20/2011(UTC)
Posts: 32
Location: Vancouver, BC, Canada

Thanks: 1 times
Was thanked: 3 time(s) in 3 post(s)
I've been looking forward to NCrunch for a while and finally had a chance to try out the beta this morning. I quickly encountered a series of issues and guessed my way through each, making some progress but eventually running out of time and running into enough issues. I thought it best to rewind back to the first issue, post it here, and then see if reporting things step by step can resolve things more simply and completely.

The first error I received from NCrunch was of the following form:

[10:25:54.9812-BuildTask-5] Error 'Compilation': ASSEMBLY_NAME_HERE: error CS1616 (0): Option 'delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module

This error does not appear when building the project or solution in the IDE or building the project on the command line using MSBuild. I understand that signing attributes can/should be removed from AssemblyInfo.cs once the project properties signing settings have been configured, and I have done so and NCrunch successfully compiled this project afterwards. Regardless, I thought it best to ask:

Is it expected behaviour of NCrunch to fail with this error when neither the IDE or MSBuild do?
Remco
#2 Posted : Tuesday, June 21, 2011 6:24:44 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
This failure does make sense in that in 1.32b (and below) NCrunch will force MSbuild to delaysign the assembly where the project is configured to use a strong name. As you've described, you had an attribute in your source code describing how the assembly should be signed ... thus MSBuild sees both pieces of configuration and simply throws an error.

Upcoming 1.33b won't force the delay signing. This change has actually been made because of a different problem, but it should also fix the issue above. The best workaround to the issue is as you've described (avoiding using the code attribute).

Definitely it's not the expected behaviour of NCrunch to fail where MSBuild will pass. If you do find other alignment issues, please continue to post them here. I'm confident that NCrunch can work on almost any project, though not all projects are created equal :)

jeremygray
#3 Posted : Tuesday, June 21, 2011 4:01:18 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/20/2011(UTC)
Posts: 32
Location: Vancouver, BC, Canada

Thanks: 1 times
Was thanked: 3 time(s) in 3 post(s)
Thanks for the response and especially for the tidbit re: 1.33b. If there's an ETA for that version, I'd love to know whether I should set aside some time to promptly clean up all of this company's unnecessary AssemblyInfo signing attributes or just wait for a new build. :)

Onto my next item, which I'll open up in its own thread...
Remco
#4 Posted : Tuesday, June 21, 2011 6:55:14 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
No ETA just yet - I think the safest option would be to remove the attributes and use build configuration instead. This is probably the more conventional approach anyway :)
Remco
#5 Posted : Monday, September 5, 2011 7:44:44 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
For anyone interested, this issue should be fixed in the recently released 1.33b.
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.037 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download