|
Hi,
I am using Sonar 2.14 and FxCop 10.0. But while build,I am getting error. ------------------------------------------------------------------------------------- Error ------------------------------------------------------------------------------------- [DEBUG] [14:24:51.472] o D:\MyWorkSpace\AAS.Portal\AAS.Gateway\bin\AAS.GateWay.ServiceContracts.dll [DEBUG] [14:24:51.472] - Assembly dependencies : [DEBUG] [14:24:51.472] - Ignoring generated code [DEBUG] [14:24:51.473] Executing command: C:\Program Files (x86)\Microsoft Fxcop 10.0\FxCopCmd.exe /p:D:\MyWorkSpace\AAS.Portal\AAS.Gateway\target\sonar\sonar.FxCop /out:D:\MyWorkSpace\AAS.Portal\AAS.Gateway\target\sonar\fxcop-report.xml /f:D:\MyWorkSpace\AAS.Portal\AAS.Gateway\bin\AAS.GateWay.ServiceContracts.dll /igc /to:600 /gac [INFO] [14:24:51.809] System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.CodeAnalysis.Interop.dll' or one of its dependencies. The specified module could not be found. [INFO] [14:24:51.811] at Microsoft.FxCop.Command.FxCopCommand.ProcessPlatformArgument(ArgumentDictionary argumentDictionary) [INFO] [14:24:51.811] at Microsoft.FxCop.Command.FxCopCommand.Main2(String[] args) [DEBUG] [14:24:51.840] To prevent a memory leak, the JDBC Driver [com.mysql.jdbc.Driver] has been forcibly deregistered [DEBUG] [14:24:51.851] Delete temporary directory: C:\Users\m1014212\AppData\Local\Temp\1\sonar-batch253101681384076299537 [DEBUG] [14:24:51.918] Delete temporary directory: C:\Users\m1014212\AppData\Local\Temp\1\sonar-batch379941681505936256795 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ----------------------------------------------------errorlog.txt-------------------- [INFO] Can not execute Sonar Embedded error: FxCop execution failed. FxCop execution failed with return code '16777217'. Check FxCop documentation for more information. ---------------------------------------------------------------------------------------------------- I am attaching the detail log for it. Thanks Ahead, With Regards, Masood |
|
Hello
Perhaps you have activated an FxCop10 rule whereas FxCop1.36 is used by the sonar batch. You can easily filter FxCop10 rules since their name is suffixed by "(FxCop10)" Hope it helps
Alex On Fri, Aug 10, 2012 at 9:44 AM, Masood <[hidden email]> wrote: Hi, |
|
Thanks for your response.
But, i have not activated an FxCop10 rule. Also, the project is developed using .NET 3.5 technology. Is this can be the reason for not loading the FxCop 10.0 supporting dll(as it is mentioned in error log that it is not able to load "Microsoft.VisualStudio.CodeAnalysis.Interop.dll")? As you mention in the post that we can deactivate FxCop10.0 rule set, but I am not able to distinguish between the Rule set of FxCop 1.36 and FxCop 10.0 in the whole set of FxCop rules present in Sonar. Can you give a sample example for it? Thanks in Advance, With Regards, Masood |
|
Well, as said before each FxCop10 rule as a name that contains "FxCop10".
If you go in the sonar configuration section, on the "quality profile" screen, then input "FxCop10" in the name/key field, you will be able to search for all FxCop10 rules. You can then filter those who are active or inactive.
You can also export the fxcop configuration of your profile and send it to this mailing list. Regards Alex On Sat, Aug 11, 2012 at 8:09 PM, Masood <[hidden email]> wrote: Thanks for your response. |
|
Thanks Alex,
Soon I will Update you on the result. With Regards, Masood |
|
Hi Alex,
I have tried with deactivating the FxCop 10 rule set. But, still not working. If I install FxCop 1.36 and set path setting.xml will it work? (Deactivating the FxCop 10 rules also) I am using Sonar 2.14. Thanks Ahead, Masood |
|
Masood, I would like to try your rule set.
Could you send us your fxcop config file? You can find it in the sonar working directory (target or .sonar) or generate it from the admin web page. Regards Alex
On Fri, Aug 31, 2012 at 2:18 PM, Masood <[hidden email]> wrote: Hi Alex, |
|
Hi Alex,
Request you to find the content of FxCop config file: ------------------------------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <FxCopProject Version="1.36"> <ProjectOptions> <SharedProject>True</SharedProject> <SaveMessages> <Project NewOnly="False" Status="Active, Excluded"/> <Report NewOnly="False" Status="Active"/> </SaveMessages> <ProjectFile Deterministic="True" SaveByRuleGroup="" DefaultRuleCheck="True" DefaultTargetCheck="True" Compress="True"/> <EnableMultithreadedLoad>True</EnableMultithreadedLoad> <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis> <SourceLookup>True</SourceLookup> <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold> <RuleExceptionsThreshold>1</RuleExceptionsThreshold> <Spelling Locale="en-US"/> <OverrideRuleVisibilities>False</OverrideRuleVisibilities> <CustomDictionaries SearchProjectDir="True" SearchUserProfile="True" SearchFxCopDir="True"/> <IgnoreGeneratedCode>False</IgnoreGeneratedCode> </ProjectOptions> <Rules> <RuleFiles> <RuleFile AllRulesEnabled="False" Enabled="True" Name="$(FxCopDir)\Rules\DesignRules.dll"> <Rule Enabled="True" Name="AssembliesShouldHaveValidStrongNames" SonarPriority="major"/> </RuleFile> </RuleFiles> </Rules> </FxCopProject> It was present in targer folder with the name "sonar.FxCop". Hope I have send the correct file. Thanks Ahead, Masood |
|
Hi Alex,
In continuation to my earlier information i like to add some more information: In the system FxCop 1.36 is also present and FxCop 10.0 too. Somehow, FxCop 1.36 is not getting unstall. Does the presence of both fxcop version causing this problem? (OS:Windows Xp,Visual Studio 2005) Thanks Ahead, Masood |
|
Hi Alex,
The Error get resolved by Installing a fresh copy of: 1. Windows SDK 7 2. FxCop 1.36 3. Putting all the dll of the project in bin folder. Thanks for your help. With Regards, Masood |
| Powered by Nabble | Edit this page |
