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?
Build/Test Issues
Project builds fine in IDE and MSBuild but fails in NCrunch build
Started by jeremygray on 9,898 views
Remco NCrunch Developer
#224
21 Jun 2011 06:24 UTC
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 :)
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 :)
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...
Onto my next item, which I'll open up in its own thread...
Remco NCrunch Developer
#228
21 Jun 2011 18:55 UTC
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 NCrunch Developer
#313
05 Sep 2011 19:44 UTC
For anyone interested, this issue should be fixed in the recently released 1.33b.
Post a reply
Log in to reply.