I get these in my NCrunchTest window after upgrade to 1.45.0.12:
(0)#0: CA0001 : Rule=Microsoft.Naming#CA1702, Target=Dba.Core.DomainEvents.IHandler : Unexpected proofing tool error code: 0x8E -- 142.
(0)#1: CA0001 : Rule=Microsoft.Naming#CA1714, Target=Dba.Core.EnumerationUtility : Unexpected proofing tool error code: 0x8E -- 142.
(0)#2: CA0001 : Rule=Microsoft.Naming#CA1704, Target=Dba.Contracts.DealerDataContract : Unexpected proofing tool error code: 0x8E -- 142.
(0)#3: CA0001 : Rule=Microsoft.Naming#CA1710, Target=Dba.Core.DomainEvents.ICommand : Unexpected proofing tool error code: 0x8E -- 142.
(0)#4: CA0001 : Rule=Microsoft.Naming#CA1720, Target=Dba.Core.DomainEvents.ICommandQueryHandler`2.#Handle(!0) : Unexpected proofing tool error code: 0x8E -- 142.
(0)#5: CA0001 : Rule=Microsoft.Naming#CA1707, Target=Dba.Core.DomainEvents.ICommand : Unexpected proofing tool error code: 0x8E -- 142.
(0)#6: CA0001 : Rule=Microsoft.Naming#CA1711, Target=Dba.Contracts.DealerDataContract : Unexpected proofing tool error code: 0x8E -- 142.
(0)#7: CA0001 : Rule=Microsoft.Naming#CA1716, Target=Dba.Core.DomainEvents.IHandler`1 : Unexpected proofing tool error code: 0x8E -- 142.
(0)#8: CA0001 : Rule=Microsoft.Naming#CA1717, Target=Dba.Core.EnumerationConverter : Unexpected proofing tool error code: 0x8E -- 142.
(0)#9: CA0001 : Rule=Microsoft.Naming#CA1726, Target=Dba.Core.DomainEvents.IHandler`1 : Unexpected proofing tool error code: 0x8E -- 142.
Anyone else? or ideas?
Remco NCrunch Developer
#3968
04 Apr 2013 22:04 UTC
Hi, thanks for sharing this issue.
The 1.45 release included support for custom code analysis rule sets. Do you have a custom ruleset for this project or solution? I'm wondering if this may be the reason for this problem now surfacing (where it didn't with 1.44).
The cause of the problem may be related to NCrunch's instrumentation. Does turning off the 'Instrument output assembly' for the project remove the errors?
The 1.45 release included support for custom code analysis rule sets. Do you have a custom ruleset for this project or solution? I'm wondering if this may be the reason for this problem now surfacing (where it didn't with 1.44).
The cause of the problem may be related to NCrunch's instrumentation. Does turning off the 'Instrument output assembly' for the project remove the errors?
Edited 04 Apr 2013 22:04 UTC
I have upgraded to 1.45 today and I am seeing a similar issue. nCrunch is not finding the rulesets specified in our .csproj file, which live elsewhere in our source tree. CA is working correctly for VS and msbuild builds.
(0)#0: CA0053 : Failed to load rules file 'C:\Users\bremor\AppData\Local\NCrunch\3096\32\Security\RuleSets\Xbox\..\..\FxCop\Rules\SDL\': Could not find rule file C:\Users\bremor\AppData\Local\NCrunch\3096\32\Security\RuleSets\Xbox\..\..\FxCop\Rules\SDL\
Code Analysis detected errors. See Code Analysis results window or log file for details.
The relative location for the rule set in the .csproj file is:
<CodeAnalysisRuleSet>..\..\Security\RuleSets\Xbox\SDLASPNETMinimumRules.ruleset</CodeAnalysisRuleSet>
Any ideas?
Thanks!
- Brett
(0)#0: CA0053 : Failed to load rules file 'C:\Users\bremor\AppData\Local\NCrunch\3096\32\Security\RuleSets\Xbox\..\..\FxCop\Rules\SDL\': Could not find rule file C:\Users\bremor\AppData\Local\NCrunch\3096\32\Security\RuleSets\Xbox\..\..\FxCop\Rules\SDL\
Code Analysis detected errors. See Code Analysis results window or log file for details.
The relative location for the rule set in the .csproj file is:
<CodeAnalysisRuleSet>..\..\Security\RuleSets\Xbox\SDLASPNETMinimumRules.ruleset</CodeAnalysisRuleSet>
Any ideas?
Thanks!
- Brett
Remco NCrunch Developer
#4090
29 Apr 2013 22:14 UTC
Hi Brett,
Thanks for sharing this issue! Something seems strange about this error message - it's like NCrunch is missing a directory being referenced from your ruleset file? Can you check whether the ruleset file is being copied into the NCrunch workspace? You can do this by right clicking on the failed build, then choosing 'Advanced->Browse to workspace'. If it isn't there, you should be able to work around this using the Additional files to include configuration setting to tell NCrunch about the file.
If the ruleset file is already in your workspace, I'm wondering if you can tell me a bit more about the structure of your rulesets. Do you have an SDK included in your project/solution using a relative path? If so, you may need to let NCrunch know about it using the Additional files to include configuration setting.
Cheers,
Remco
Thanks for sharing this issue! Something seems strange about this error message - it's like NCrunch is missing a directory being referenced from your ruleset file? Can you check whether the ruleset file is being copied into the NCrunch workspace? You can do this by right clicking on the failed build, then choosing 'Advanced->Browse to workspace'. If it isn't there, you should be able to work around this using the Additional files to include configuration setting to tell NCrunch about the file.
If the ruleset file is already in your workspace, I'm wondering if you can tell me a bit more about the structure of your rulesets. Do you have an SDK included in your project/solution using a relative path? If so, you may need to let NCrunch know about it using the Additional files to include configuration setting.
Cheers,
Remco
It looks like nCrunch is finding the ruleset properly, and copying it into the correct location in the AppData folder, but it's having issues finding the rules dlls referenced in the ruleset. We may be a unique case in that our rules dlls aren't in the GAC, but in our source tree.
Let me know what other info would be helpful, but I would be happy with a short-term fix which lets me disable code analysis while a longer term fix is being developed...
- Brett
Let me know what other info would be helpful, but I would be happy with a short-term fix which lets me disable code analysis while a longer term fix is being developed...
- Brett
Remco NCrunch Developer
#4099
30 Apr 2013 06:38 UTC
Hi Brett,
Making sure the DLLs are all included using the 'Additional files to include' setting should allow you to work around this. The problem is that NCrunch doesn't have enough of an understanding of your rulesets to identify their DLL dependency, so it just leaves the DLLs out of the workspace. If there's any chance I could get a description of how the DLLs are physically referenced from the ruleset (i.e. is this done using XML?) this would be really helping in building a formal solution so that the Additional Files To Include aren't needed.
Cheers,
Remco
Making sure the DLLs are all included using the 'Additional files to include' setting should allow you to work around this. The problem is that NCrunch doesn't have enough of an understanding of your rulesets to identify their DLL dependency, so it just leaves the DLLs out of the workspace. If there's any chance I could get a description of how the DLLs are physically referenced from the ruleset (i.e. is this done using XML?) this would be really helping in building a formal solution so that the Additional Files To Include aren't needed.
Cheers,
Remco
Hey, Remco
I found this in our rules file near the top:
<RuleHintPaths>
<Path>..\..\FxCop\Rules\SDL\</Path>
</RuleHintPaths>
From there, it looks like it scoops up the 2 custom rule dlls our company has for our SDL compliance.
After adding that directory in the Additional Files dialogs of some projects, those started to build and run correctly. Adding that directory at the solution level seems to have fixed it for the whole solution.
Hope that's super useful information!
- Brett
I found this in our rules file near the top:
<RuleHintPaths>
<Path>..\..\FxCop\Rules\SDL\</Path>
</RuleHintPaths>
From there, it looks like it scoops up the 2 custom rule dlls our company has for our SDL compliance.
After adding that directory in the Additional Files dialogs of some projects, those started to build and run correctly. Adding that directory at the solution level seems to have fixed it for the whole solution.
Hope that's super useful information!
- Brett
Remco NCrunch Developer
#4104
30 Apr 2013 22:17 UTC
Thanks Brett! That's just the information I needed. I'll try to introduce a longer term fix, and hope that the additional files will continue to work for you in the meantime.
Cheers,
Remco
Cheers,
Remco
You're awesome. I appreciate the speedy responses!
Post a reply
Log in to reply.