Visual Studio Code Analysis and Code Metrics ForumDiscuss issues regarding FxCop and Visual Studio's Code Analysis features, including both Managed and C/C++ Code Analysis, Code Analysis Policy and Code Metrics.© 2009 Microsoft Corporation. All rights reserved.Fri, 27 Nov 2009 22:19:47 Zc6b9a35b-6695-45a4-8fc8-dae73e167f0ahttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/b7f9da6d-7e93-4d52-9763-418dce3c7fd7http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/b7f9da6d-7e93-4d52-9763-418dce3c7fd7msdnfoolhttp://social.msdn.microsoft.com/Profile/en-US/?user=msdnfoolVS 2010 Beta 2: CA2135 & CA2118The following code passed code analysis in VS 2008 SP 1:<br/><br/><br/> <div style="background-color:white;color:black"> <pre> [SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode = <span style="color:blue">true</span>)] <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">class</span> MarshalHelpers { <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">void</span> FillMemory(IntPtr buffer, <span style="color:blue">int</span> bufferSize, <span style="color:blue">byte</span> value) { NativeMethods.FillMemory(buffer, (IntPtr)bufferSize, value); } <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">void</span> ZeroMemory(IntPtr buffer, <span style="color:blue">int</span> bufferSize) { NativeMethods.ZeroMemory(buffer, (IntPtr)bufferSize); } [SuppressUnmanagedCodeSecurity] <span style="color:blue">private</span> <span style="color:blue">static</span> <span style="color:blue">class</span> NativeMethods { [DllImport(<span style="color:#a31515">&quot;kernel32.dll&quot;</span>, SetLastError = <span style="color:blue">true</span>)] <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">extern</span> <span style="color:blue">void</span> FillMemory(IntPtr destination, IntPtr length, <span style="color:blue">byte</span> fill); [DllImport(<span style="color:#a31515">&quot;kernel32.dll&quot;</span>, SetLastError = <span style="color:blue">true</span>)] <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">extern</span> <span style="color:blue">void</span> ZeroMemory(IntPtr destination, IntPtr length); } } </pre> </div> <br/>However, with VS 2010 Beta 2 and I get 'CA2135: Level 2 assemblies should not contain LinkDemands' against the MarshalHelpers class - so I replace the LinkDemand with SecurityCritical as follows:<br/><br/><br/> <div style="background-color:white;color:black"> <pre> [SecurityCritical] <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">class</span> MarshalHelpers { <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">void</span> FillMemory(IntPtr buffer, <span style="color:blue">int</span> bufferSize, <span style="color:blue">byte</span> value) { NativeMethods.FillMemory(buffer, (IntPtr)bufferSize, value); } <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">void</span> ZeroMemory(IntPtr buffer, <span style="color:blue">int</span> bufferSize) { NativeMethods.ZeroMemory(buffer, (IntPtr)bufferSize); } [SuppressUnmanagedCodeSecurity] <span style="color:blue">private</span> <span style="color:blue">static</span> <span style="color:blue">class</span> NativeMethods { [DllImport(<span style="color:#a31515">&quot;kernel32.dll&quot;</span>, SetLastError = <span style="color:blue">true</span>)] <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">extern</span> <span style="color:blue">void</span> FillMemory(IntPtr destination, IntPtr length, <span style="color:blue">byte</span> fill); [DllImport(<span style="color:#a31515">&quot;kernel32.dll&quot;</span>, SetLastError = <span style="color:blue">true</span>)] <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">extern</span> <span style="color:blue">void</span> ZeroMemory(IntPtr destination, IntPtr length); } } </pre> </div> <br/>But then I get 'CA2118: Review SuppressUnmanagedCodeSecurityAttribute usage' against NativeMethods.FillMemory &amp; NativeMethods.ZeroMemory, which is what the previous LinkDemand was for. My understanding is that SecurityCritical replaces the functionality of the LinkDemand, so is this a bug, or am I missing something? (Adding back the LinkDemand, but keeping the SecurityCritical attribute, trips CA2135 against the MarshalHelpers class again.)Mon, 23 Nov 2009 03:16:31 Z2009-11-27T22:19:47Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/13ffffb9-95c4-4b02-bd89-5715188bc915http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/13ffffb9-95c4-4b02-bd89-5715188bc915sasaminnhttp://social.msdn.microsoft.com/Profile/en-US/?user=sasaminnWhy does't the stand-alone FxCop have maintainability and reliability rules ?<a title="VSTS code analysis VS Fxcop" href="http://social.msdn.microsoft.com/forums/en-US/vstscode/thread/6dada6a8-eb7b-4196-8e49-9435e32707e7/" title="VSTS code analysis VS Fxcop">In past thread</a> , Mr. Brahmnes Fung said &quot;VSTS 2005 have maintainability and reliability rules and the standalone FxCop don't have these rules&quot;.<br/> Why does't FxCop have them ?<br/>Fri, 27 Nov 2009 06:15:19 Z2009-11-27T13:57:21Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/fb26e73c-3710-48bc-b5b7-4c9a1cbc9aechttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/fb26e73c-3710-48bc-b5b7-4c9a1cbc9aecAlevonhttp://social.msdn.microsoft.com/Profile/en-US/?user=Alevoncommand line argumentHow can I pass an argument to a custom made FxCop rule.<br/><br/>For ex:<br/><br/>FxCopCmd.exe /f:&quot;files.dll&quot; /o:&quot;Out.xml&quot; /r:-&quot;Rules.dll&quot; /myargument:true/false<br/>Thu, 26 Nov 2009 08:34:16 Z2009-11-27T05:04:25Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/c61c0039-34bf-41f6-8959-d300b2517e9fhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/c61c0039-34bf-41f6-8959-d300b2517e9fMassacrinohttp://social.msdn.microsoft.com/Profile/en-US/?user=MassacrinoHow do I pop up the MSDN page for a CAxxxx violation in Visual Studio?Hi there!<br/> <br/> I 've integrated FxCop into my csprojs using the MSBuild Community FxCop task, so I get all my fxcops in the Visual Studio error list panel together with the compiler messages. NB I actually do *not* use an fxcop project and fxcop stand-alone gui<br/> <br/> The only thing I really miss in VS is the ability to just click F1 on the message entry and pop up the MSDN page for the CAxxxx violation<br/> <br/> Does anyone have any idea of how this could be done? It would make the usage experience more pleasant for the team, which means more needed love for FxCop :-)<br/> <br/> Any advice much appreciated!Thu, 26 Nov 2009 11:03:03 Z2009-11-27T02:13:34Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/9e5ad30c-0cb0-421c-9276-fd04a23f510ehttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/9e5ad30c-0cb0-421c-9276-fd04a23f510enico nicohttp://social.msdn.microsoft.com/Profile/en-US/?user=nico%20nicoHow to adapt the ImplementIDisposableCorrectly rule ?Hi all,<br/> <br/> when i'm using the ImplementIDisposableCorrectly rule, it detects some errors that in my particular case should not be detected.<br/> <br/> for example, this code : <br/> <pre lang="x-c#">public class MyClass : IDisposable { public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { } } public static class Disposing { public static void Dispose&lt;T&gt;(ref T obj) where T : IDisposable { obj.Dispose(); obj = default(T); } } public class TestClass : IDisposable { private MyClass _myclass = new MyClass(); public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { if (disposing) Disposing.Dispose(ref _myclass); } }</pre> is detects as bad one.<br/> <br/> So I would like to adapt this rule (tried to derive, but class is sealed) to detect my special case and allow it.<br/> <br/> How can I do that ?<br/> Thanks in advance for your help<br/> <br/> Best regardsWed, 25 Nov 2009 09:17:11 Z2009-11-26T08:11:18Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/316ebd8d-1ad4-4094-973b-3f337426759chttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/316ebd8d-1ad4-4094-973b-3f337426759calpesheverurshttp://social.msdn.microsoft.com/Profile/en-US/?user=alpesheverursError Code: 0x80072EE6 What are the reasons of exception thrown with error code<span style="font-size:11pt;font-family:'Calibri','sans-serif';color:red" lang=EN-AU> <strong>0x80072EE6</strong> </span> <strong> ?</strong>Wed, 25 Nov 2009 11:49:19 Z2009-11-26T03:45:09Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/61a1e447-2fbc-414a-aaf6-619f70862a41http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/61a1e447-2fbc-414a-aaf6-619f70862a41nico nicohttp://social.msdn.microsoft.com/Profile/en-US/?user=nico%20nicoAnalysis in generated codeHi all,<br/> <br/> I would like to analyse some parts of the generated code (dataset for example).<br/> So I've unchecked the &quot;suppress analysis results against generated code&quot;.<br/> <br/> But this code violates many rules and I would like to run the analysis on this generated code ONLY for my custom rule. <br/> Is there a way to run through the generated code only for one custom rule ?<br/> <br/> Thanks in advance for your help,<br/> Best regards.Mon, 23 Nov 2009 10:33:35 Z2009-11-24T12:59:06Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/463fd3a1-1e0d-42f6-8f44-dc742855ba82http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/463fd3a1-1e0d-42f6-8f44-dc742855ba82Royston at i2http://social.msdn.microsoft.com/Profile/en-US/?user=Royston%20at%20i2CA0055 error in VS2010 beta 2 - Will Visual Studio 2010 support FxCop for Silverlight?Hi there,<br/> <br/> Apologies if this has already been asked + answered (I've looked, but couldn't find it): will FxCop be supported on Silverlight (3 or 4) in Visual Studio 2010?<br/> <br/> We currently use Silverlight 3 with Visual Studio 2008, and make <em>very heavy</em> use of FxCop: we have several of our own custom rule assemblies and rely upon the whole process to keep ourselves in check.<br/> <br/> Visual Studio 2010 beta 2 gives a CA0055 error when we switch Code Analysis on for a Silverlight assembly, saying that analysis of Silverlight assemblies is not supported.<br/> <br/> Is this a beta 2 limitation or is there a plan to stop supporting FxCop for Silverlight assemblies for the final 2010 release?  (That would be a massive shame: one of the reasons for using Silverlight over something like Flex is that we get much better developer tool support...)<br/> <br/> Cheers,<br/>  Royston.<br/><hr class="sig">Royston ShufflebothamMon, 23 Nov 2009 11:42:56 Z2009-11-24T08:37:56Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/e40a8514-2157-4934-8431-a7a46cbbed63http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/e40a8514-2157-4934-8431-a7a46cbbed63SandipDangathttp://social.msdn.microsoft.com/Profile/en-US/?user=SandipDangatfxcop code review utility Version 1.36 vs Version 1.35<p>Please tell me exact Implementation &amp; Other differences between FXCop 1.35 &amp; FXCop 1.36.</p>Mon, 23 Nov 2009 06:18:49 Z2009-11-24T03:48:06Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/a44aa5c1-c62a-46b7-8009-dc46ba21ba93http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/a44aa5c1-c62a-46b7-8009-dc46ba21ba93Bryan Lipinskihttp://social.msdn.microsoft.com/Profile/en-US/?user=Bryan%20LipinskiCA2217: Not working properly for 64-bit enums    I've been working on making some of the C# projects on my team FxCop compliant.  I recently encountered a weird bug with CA2217.  There is a particularly large flag enum that keeps triggering the warning, despite being valid.<br/><br/>&lt;Example&gt;<br/><br/>[Flags]<br/>public enum Values : long<br/>{<br/>    Value1 = 0x1 &lt;&lt; 0,<br/>    Value2 = 0x1 &lt;&lt; 1,<br/>    ...<br/>    Value32 = 0x1 &lt;&lt; 31,<br/>    Value33 = 0x1 &lt;&lt; 32,<br/>    Value34 = 0x1 &lt;&lt; 33<br/>}<br/><br/>&lt;/Example&gt;<br/><br/>The above results in the following CodeAnalysis warning:<br/><br/>Warning CA2217 : Microsoft.Usage : 'Values' is marked with FlagsAttribute but a discrete member cannot be found for every settable bit that is used across the range of enum values. Remove FlagsAttribute from the type or define new members for the following (currently missing) values: 0x80000000, 0x100000000, 0x200000000, 0x400000000, 0x800000000, 0x1000000000, 0x2000000000, 0x4000000000, 0x8000000000, 0x10000000000, 0x20000000000, 0x40000000000, 0x80000000000, 0x100000000000, 0x200000000000, 0x400000000000, 0x800000000000, 0x1000000000000, 0x2000000000000, 0x4000000000000, 0x8000000000000, 0x10000000000000, 0x20000000000000, 0x40000000000000, 0x80000000000000, 0x100000000000000, 0x200000000000000, 0x400000000000000, 0x800000000000000, 0x1000000000000000, 0x2000000000000000, 0x4000000000000000, 0x8000000000000000 <br/><br/>   This seems like a particularly strange suggestion, and when I change the last entries to be within the size of int everything works fine.  Is there a known bug with this rule and long enums?Tue, 07 Jul 2009 23:11:37 Z2009-11-24T01:33:35Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/4a502ef5-eec1-466d-a134-5e7db278f67chttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/4a502ef5-eec1-466d-a134-5e7db278f67cBrigadirhttp://social.msdn.microsoft.com/Profile/en-US/?user=BrigadirA noise from static analyzer on standard headers (shobjidl.h and atldbcli.h)?<p>Here is a problem with my project:<br/>If I compile any solution configuration (Debug or Release) for the Win32 platform with &quot;/analyze&quot; I get the next warnings:<br/>a)<br/>3&gt;<em>$(WindowsSdkDir)\include\shobjidl.h</em>(32803) : warning C6387: '*ppv' might be '0': this does not adhere to the specification for the function 'SHLoadLibraryFromItem': Lines: 32805, 32806, 32807, 32808, 32817<br/>3&gt;<em>$(WindowsSdkDir)\include\shobjidl.h</em>(32820) : warning C6387: '*ppv' might be '0': this does not adhere to the specification for the function 'SHLoadLibraryFromKnownFolder': Lines: 32822, 32823, 32824, 32825, 32834<br/>3&gt;<em>$(WindowsSdkDir)\include\shobjidl.h</em>(32837) : warning C6387: '*ppv' might be '0': this does not adhere to the specification for the function 'SHLoadLibraryFromParsingName': Lines: 32839, 32840, 32841, 32842, 32847<br/>3&gt;<em>$(WindowsSdkDir)\include\shobjidl.h</em>(32880) : warning C6387: '*ppszResolvedPath' might be '0': this does not adhere to the specification for the function 'SHResolveFolderPathInLibrary': Lines: 32882, 32883, 32884, 32885, 32902<br/>3&gt;<em>$(WindowsSdkDir)\include\shobjidl.h</em>(32905) : warning C6387: '*ppszSavedToPath' might be '0': this does not adhere to the specification for the function 'SHSaveLibraryInFolderPath': Lines: 32907, 32909, 32912, 32913, 32914, 32928 <br/><br/>b)<br/>3&gt;<em>$(VCInstallDir)\atlmfc\include\atldbcli.h</em>(4583) : warning C6011: Dereferencing NULL pointer 'm_pColumnInfo': Lines: 4541, 4542, 4543, 4544, 4547, 4548, 4552, 4554, 4555, 4556, 4559, 4560, 4563, 4568, 4570, 4572, 4575, 4577, 4578, 4579, 4583<br/>3&gt;<em>$(VCInstallDir)\atlmfc\include\atldbcli.h</em>(6165) : warning C6011: Dereferencing NULL pointer 'pPropSets+i': Lines: 6146, 6148, 6149, 6150, 6152, 6153, 6156, 6158, 6159, 6160, 6162, 6164, 6165<br/> <br/>For convenience, I replaced all physical file system paths with VS macros. Modification date of the shobjidl.h file is 2009-07-14, ‏‎19:53:48; atldbcli.h -- 2007-07-09, ‏‎16:32:24.<br/><br/>My configuration is:<br/>* Visual Studio Team System 2008 Service Pack 1 ENU (cl.exe -- 15.00.30729.01 for 80x86);<br/>* Some defines from properties sheet: /D &quot;PLATFORM_WIN32&quot; /D &quot;NTDDI_VERSION=NTDDI_WIN7&quot; /D &quot;_WIN32_WINNT=_WIN32_WINNT_WIN7&quot; /D &quot;WINVER=0x0601&quot;;<br/>* Windows SDK for Windows 7 (7.0), AMD64;<br/>* Windows DDK 7.0.0.7600;<br/>* Windows 7 Ultimate x64.<br/><br/>I believe compiler is right. For example, &quot;$(WindowsSdkDir)\include\shobjidl.h(32803) : warning C6387: ...&quot; points to incorrect &quot;__deref_out&quot; annotation (__deref_out_opt should be used?).<br/>So, in any case: what's wrong? Is this a &quot;static analyzer noise&quot; or is this my mistake?<br/><br/>Thanks!</p>Fri, 13 Nov 2009 20:12:52 Z2009-11-21T16:13:31Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/69f3b7e0-f801-4721-8d4d-7ca8da5cf9b2http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/69f3b7e0-f801-4721-8d4d-7ca8da5cf9b2nico nicohttp://social.msdn.microsoft.com/Profile/en-US/?user=nico%20nicoFind method that call constructorHi all,<br/> <br/> I've this code to test :<br/> <br/> public class MyClass<br/> {<br/>     public void Foo()<br/>     {<br/>         Console.WriteLine(&quot;foo&quot;);<br/>     }<br/> }<br/> public class MyClass2<br/> {<br/>     public void Foo()<br/>     {<br/>         Console.WriteLine(&quot;foo&quot;);<br/>     }<br/> }<br/> public class Test<br/> {<br/>     public void Do()<br/>     {<br/>         MyClass c = new MyClass();<br/>         c.Foo();<br/>     }<br/>     public void Do2()<br/>     {<br/>         MyClass2 c = new MyClass2();<br/>         c.Foo();<br/>     }<br/> }<br/> <br/> i'm overriding the VisitConstruct to find specific call to new and I would like to know the calling method.<br/> <br/> public override void VisitConstruct(Construct construct)<br/> {<br/>     if (construct.Type.Name.Name == &quot;MyClass&quot;)<br/>     {<br/>         // here I want to test the calling method, i.e : Do()<br/>     }<br/>     base.VisitConstruct(construct);<br/> }<br/> <br/> How can I do that ?<br/> <br/> Thanks in advance for any help,<br/> Best regardsWed, 18 Nov 2009 16:56:51 Z2009-11-20T08:01:43Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/5ba97191-3f9f-4ba8-ab86-80d777e4782chttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/5ba97191-3f9f-4ba8-ab86-80d777e4782cTatworthhttp://social.msdn.microsoft.com/Profile/en-US/?user=TatworthCan Microsoft FxCop 1.36 be used with VS2010 Beta 2?I am developing on VS2010 Beta 2 targetting Framework 4.0. Can I use FxCop 1.36?Thu, 19 Nov 2009 15:06:49 Z2009-11-20T05:43:58Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/d6c5dd43-24ed-4ee5-85cf-1160a2324984http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/d6c5dd43-24ed-4ee5-85cf-1160a2324984pevsonichttp://social.msdn.microsoft.com/Profile/en-US/?user=pevsonicCode Analysis for Windows CE Application DevelopmentHiya, <br/> <br/>   I'm a Windows CE developer and I've been using PREfast for a while via platform builder (via Visual Studio 2005 Pro). This has been fine, but I'm now also working with our application development team building quite a complicated app. I've looked to see how I can enable code analysis for the app, but I'm utterly stumped. <br/> <br/> I should add that I looked at the video demo of VS2005 that shows going to :<br/>   Properties &gt; Confugration Properties &gt; C/C++ / Advanced / Enable PREfast<br/> <br/> but this doesn't appear in visual studio for me. I get the impression that this may be a &quot;Team system&quot; specific thing, but obviously Windows CE Platform Builder ships with, and is validated with the 'pro' edition and already has the PREfast functionality so I'm a bit confused...<br/> <br/> I've tried manually adding /analysis and /analyze:WX but the compiler now thinks these are unknown switches. Does this mean somehow VS2005 uses a different version of the compiler when building the apps apart from the platform? Can someone suggest how I can get around this?<br/> <br/> <br/> Cheers,<br/> <br/> ~PevThu, 19 Nov 2009 11:35:21 Z2009-11-23T05:23:51Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/72e2e95e-69f7-49be-ad08-b8f2725a5283http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/72e2e95e-69f7-49be-ad08-b8f2725a5283DongDaihttp://social.msdn.microsoft.com/Profile/en-US/?user=DongDaiPREfast doesn't support uninitialized array check?Just found that PREfast for Windows CE5 and CE6 (integrated) doesn't support the check of uninitialized array which coverity supports. For example: <div> <pre lang=x-cpp>int result; int uninit_array() { int x[4]; result = x[1]; // defect: use of uninitialized array member x[1] }</pre> Do you have plan to support this check in future?</div> <div><br/></div> <div>Thanks,</div> <div>Dong</div>Mon, 09 Nov 2009 07:50:08 Z2009-11-19T05:53:19Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/6788a7d7-f2d8-4e2d-ac87-482750469463http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/6788a7d7-f2d8-4e2d-ac87-482750469463dwelzelhttp://social.msdn.microsoft.com/Profile/en-US/?user=dwelzelHelp with CA0060I'm trying to work through a CA0060 error which is causing a build break.  The specific error is below, if it matters.  I tried adding StrongNameIgnoringVersion as other threads have suggested, but no luck.<br/><br/>Is there anything else I can try?<br/><br/>    20&gt;MSBUILD : error : CA0060 : The indirectly-referenced assembly 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: 'System.Data.SqlServerCe.dll'.<br/>Mon, 16 Nov 2009 05:01:26 Z2009-11-18T12:54:41Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/8d0b8148-cb7d-4c86-b827-c8506479561bhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/8d0b8148-cb7d-4c86-b827-c8506479561bDynamichttp://social.msdn.microsoft.com/Profile/en-US/?user=DynamicHow to Run StyleCop Automatically After Build?I have installed StyleCop and I can run it manually using the Tools menu in VS. I'd want to run StyleCop automatically after my class library project is built. <div><br/></div> <div>Do you know any macro that can be placed in the &quot;Port-Build Event&quot; section of my Project Properties page which would make the StyleCop run?</div> <div><br/></div> <div>I placed this macro:</div> <div>&quot;%ProgramFiles%\Microsoft StyleCop 4.3.2.1\StyleCopSettingsEditor.exe&quot; &quot;$(ProjectDir)/Settings.StyleCop&quot;</div> <div><br/></div> <div>But it only opens the StyleCop rule management window without really running it.</div> <div><br/></div> <div>Any thoughts?</div> <div><br/></div> <div>Thanks,</div> <div><br/></div>Sat, 14 Nov 2009 09:49:27 Z2009-11-25T18:06:47Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/8742efeb-fafc-4d0d-ba5c-6bec4e88e763http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/8742efeb-fafc-4d0d-ba5c-6bec4e88e763SagieShahttp://social.msdn.microsoft.com/Profile/en-US/?user=SagieShaShare code analysis rules between team projectsHi.<br/>I have multiple team projects, and I want to apply Code Analysis check-in policy for them.<br/>How can I declare a set of rules I want to check, and share it between the team projects? Is there an Import/Export option?<br/><br/>I already configured the set of rules I want to run using standalone fxcop. Can I upload it into my TFS?<br/><br/>Thanks,<br/>SagieTue, 17 Nov 2009 17:13:08 Z2009-11-18T06:56:05Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/f25ab262-cb10-417a-89e8-10bf5d77bdf5http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/f25ab262-cb10-417a-89e8-10bf5d77bdf5Anchyhttp://social.msdn.microsoft.com/Profile/en-US/?user=AnchyCode metrics for unmanaged C++ code?<font size=2><span style="font-family:Arial">Does code metrics in Visual Studiu 2008 Tema System  work for unmanaged C++ code?<br></span></font>Wed, 08 Oct 2008 10:15:53 Z2009-11-17T20:44:11Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/45a9bd4e-8763-4e85-a3cf-887aeb27afd7http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/45a9bd4e-8763-4e85-a3cf-887aeb27afd7Keval Shahhttp://social.msdn.microsoft.com/Profile/en-US/?user=Keval%20ShahError: FxCop appears to have hung or deadlockedHi,<br/><br/>We are using FxCop for Code Analysis. <br/>When we build the project in visual studio 2008, we get the following build error saying &quot;FxCop appears to have hung or deadlocked&quot;.<br/><br/>Wed, 04 Nov 2009 07:22:59 Z2009-11-17T09:31:35Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/872d9c97-02b7-4409-9df7-6202ea0820dchttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/872d9c97-02b7-4409-9df7-6202ea0820dcCamilo Telleshttp://social.msdn.microsoft.com/Profile/en-US/?user=Camilo%20TellesPragma not working for warning CA1502?Sirs,<br/><br/>I'm trying to disable the warning CA1502 from a method. When I try to:<br/><br/>#pragma warning disable 1502<br/><br/>The visual studio 2008 SP1 says that the 1502 number is not a recognized warning.<br/><br/>Any help?<br/><br/>Regards<br/><br/>CamiloSun, 15 Nov 2009 02:02:59 Z2009-11-16T04:05:13Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/0364ebb8-c07c-4050-8514-1124441bd88dhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/0364ebb8-c07c-4050-8514-1124441bd88dJuan Zamudiohttp://social.msdn.microsoft.com/Profile/en-US/?user=Juan%20ZamudioSupress warning on caller assemblyHi all, i have two extension methods like this:<br/> <br/> <pre lang="x-c#">public static bool IsDateTime(this string source) { return (IsDateTime(source, CultureInfo.InvariantCulture)); } public static bool IsDateTime(this string source, IFormatProvider provider) { DateTime tempDate; if(DateTime.TryParse(source, provider, DateTimeStyles.None, out tempDate)) { return (true); } return (false); }</pre> Now every time someone call the first overload they get a SpecifyIFormatProvider warning.<br/> Is there a way to avoid this warning on the caller?, in this case I can think it does not matter which overload gets called.<br/> <br/> Thanks for your time.<br/> <br/> Juan ZamudioThu, 12 Nov 2009 05:58:20 Z2009-11-13T02:12:49Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/f57bf052-2a70-48bc-ab74-55dfdeb438f0http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/f57bf052-2a70-48bc-ab74-55dfdeb438f0srodrigu85http://social.msdn.microsoft.com/Profile/en-US/?user=srodrigu85Custom rule to check if we always use the return valueDear all,<br/> I'm trying to do a custom code analysis rule that would detect if all methods that returns a certain type use that return value.<br/> For eg, I've a custom class called &quot;MyPersonalStatusCode&quot;.<br/> Some of my methods return that object:<br/> public MyPersonalStatusCode MyPublicMethod (){};<br/> <br/> I want to raise a warning if I do:<br/> <br/> // some code<br/> MyPublicMethod ();<br/> <br/> instead of:<br/> MyPersonalStatusCode  myreturnValue = MyPublicMethod ();<br/> <br/> I've already managed to find the methods that returns my class, but I dont know how to check if the return value is used or not.<br/> Any pointers that could lead me to a solution?<br/> <br/> Thank you very much,Thu, 05 Nov 2009 07:59:55 Z2009-11-11T12:52:42Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/b534ecb9-8e0e-481f-9dfe-26696b9b7f6ahttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/b534ecb9-8e0e-481f-9dfe-26696b9b7f6aSinixhttp://social.msdn.microsoft.com/Profile/en-US/?user=Sinix[FxCop 1.36, Custom rule] How to find all references to an specific node?Hello!<br/>Is it possible to find all references to concrete node (caller/callee list, field load/store, delegate creation etc) without manual enumerating over all statements?<br/><br/>Sample simple rule to represent scenario: <br/>Restrict load/store of fields if they're exposed via property getter/setter respectively.<br/><br/>It seems, there will be two-phase run:<br/>1) override check on TypeNode: iterate over all properties and store fields they're exposing<br/>2) override check on member: store current member and visit all statements of each. If member references exposed field - there's an problem.<br/><br/>What did I miss? Would it be thread-safe?<br/><br/>Also, is there good manual except one at <a href="http://www.binarycoder.net/">http://www.binarycoder.net/</a>? It's quite untrivial to drill through FxCop code model.Fri, 06 Nov 2009 07:47:50 Z2009-11-10T13:18:38Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/9f4bcf41-7ac8-4c96-a085-2e07685cf79dhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/9f4bcf41-7ac8-4c96-a085-2e07685cf79ddalteriohttp://social.msdn.microsoft.com/Profile/en-US/?user=dalterioCode metrics and VC++ projects<p align=left><font face=Arial size=2>Why is it that all the menu items for code metrics are present and run for VC++ projects when the feature does not work for unmanaged code?</font></p>Wed, 21 Nov 2007 19:24:24 Z2009-11-05T09:59:12Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/c09524b9-d954-45c7-ad6e-3ec82b4fb8f0http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/c09524b9-d954-45c7-ad6e-3ec82b4fb8f0Dejvidhttp://social.msdn.microsoft.com/Profile/en-US/?user=DejvidAnalyze FileZilla with Microsoft FxCop 1.36 Hi, I tried to analyze the software security of &quot;FileZilla Server&quot; using Microsoft FxCop 1.36. Firstly, I installed FxCop as a stand-alone application, than I opened the FxCop.exe file and rightclicked the &quot;myFxCop Project&quot; chose &quot;Add targets&quot; and searched for the exe file in the build folder of FileZillaServer. After I found it and selected, I have got an error message saying: &quot;No engine was able to load target FileZillaServer.exe&quot;. What does this message mean? Is it possible that FileZillaServer is not a .NET application, though it can be compiled in Visual Studio.Tue, 03 Nov 2009 14:36:31 Z2009-11-05T03:16:16Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/69f2ee95-409f-4052-bfec-b8cf364f2d62http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/69f2ee95-409f-4052-bfec-b8cf364f2d62Saeed Neamatihttp://social.msdn.microsoft.com/Profile/en-US/?user=Saeed%20NeamatiCode Anaylysis Tab is not shownHi<br/>I installed Visual Studio Team System and I chose everything in Feature Selection step, but still I don't have Code Analysis tab shown in Project/Properties page, and I also don't have it installed, because I can't see it either in Project menu or in the project context menu. I checked the registery, it seems that it is not installed on my computer. Is there any installation pack available for installing Code Analysis and Code Metrics features.<br/><br/>Thank you all.Wed, 04 Nov 2009 05:43:09 Z2009-11-04T18:58:49Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/40a57dba-c1b9-4cb7-b41a-d13fad3ab23chttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/40a57dba-c1b9-4cb7-b41a-d13fad3ab23cjerryjvlhttp://social.msdn.microsoft.com/Profile/en-US/?user=jerryjvlTrouble with MethodCall Operands in FxCop 1.36I am writing an FxCop rule that tries to find all method calls to a specific logging API. It tries to verify that a number of the parameters to this call are literals, and produces documentation for all the calls made.<br/> <br/> For the most part, checking that Operands on the MethodCall object are Literal instances does the trick just fine, but I get into trouble when an overload with a 'params object[] arguments' is used. As soon as the 'params' occur, *all* arguments to the call are only reported back as 'NodeType.Pop'.<br/> <br/> I found a post somewhere that discussed walking the 'Instructions' and using a call to 'RuleUtilities' to walk backwards over the arguments from the call site, but this API call appears to have been discontinued in 1.36, so that is not helping me either.<br/> <br/> Is there any way to find the method argument literal values in this scenario that does not involve completely custom-writing the method walking/method stack analysis code?Thu, 29 Oct 2009 03:12:11 Z2009-11-04T11:18:18Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/87781278-503e-4766-803b-6d185fd9c0d3http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/87781278-503e-4766-803b-6d185fd9c0d3papadihttp://social.msdn.microsoft.com/Profile/en-US/?user=papadiIgnore casing problem globally<p>Hi!<br/>I have a word that I use to name stuff which I want to be in capital letters. Actually I have external requirement to be all capitals. I hate it, but anyway.<br/>Example: FirstWORD or Project.WORD.Class or WORDItem etc.</p> <ol> <li>I don't want to completely disable 1709 rule.</li> <li>Rules are configured in an external 'targets' file which is referenced by all the projects. CodeAnalysisDictionary cannot help since it's contents are not case sensitive.</li> <li>GlobalSuppressions file is one solution but this would require this to be made in all projects (except if I use linked files). The main problem with this solution is Target property of System.Diagnostics.CodeAnalysis.SuppressMessage. You have to define this attribute almost for each violation of the rule.</li> </ol> <p>Any better ideas?<br/> </p><hr class="sig">Dimitris Papadimitriou, Software Development ProfessionalMon, 02 Nov 2009 14:39:11 Z2009-11-05T02:28:53Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/556f05b8-5d20-43a6-99d5-5d7adc4a3bfdhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/556f05b8-5d20-43a6-99d5-5d7adc4a3bfdStefan Falkhttp://social.msdn.microsoft.com/Profile/en-US/?user=Stefan%20FalkStatic code analysis not available in one VS2008 installationHello everybody,<br/><br/>we use VS2008 Team Edition for Developers here, running von Vista Enterprise x64 including all patches of course. On one machine, static code analysis is simply not available. Neither the user interface in the project properties includes the &quot;code analysis&quot; tab, nor does fxcop run on building projects for which code analysis is enabled.<br/><br/>Where could we check what is missing? VS setup just displays everything is installed. Is there some repair option? Is an uninstall/reinstall cycle necessary? Any help is greatly appreciated of course.<br/><br/>Best Regards,<br/>Stefan FAlk<hr class="sig">Stefan FalkThu, 17 Sep 2009 14:13:33 Z2009-11-03T20:56:19Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/5a9bc1c9-9758-470c-a118-5b97e187fd5chttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/5a9bc1c9-9758-470c-a118-5b97e187fd5cPavan Kulkarnihttp://social.msdn.microsoft.com/Profile/en-US/?user=Pavan%20KulkarniRestricting Code Analysis Errors SuppressionHi All,<br/> <br/> We do Code Analysis for our solution in VSTS. And of course, we suppress few errors as applicable. However, at this point anybody from my team (senior or junior) can suppress errors. Is there any way that I can restrict as to who can suppress?<br/> <br/> Thanks in advance,<br/> PavanTue, 03 Nov 2009 09:48:54 Z2009-11-09T05:22:15Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/92d96006-0076-4138-8c71-5d50f4e9db3ahttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/92d96006-0076-4138-8c71-5d50f4e9db3aallenmpcxhttp://social.msdn.microsoft.com/Profile/en-US/?user=allenmpcxDetecting String Literals with FxCop 1.36Hello,<br /><br />I will just describe&nbsp;my desired result: I need to be able to detect string literals in my project. I could simply just look for every "ldstr" instruction and report a problem, but I need to ignore a string literal if it's passed into a special method (e.g.&nbsp;"Strings.Ignore(System.String)" where the return type is "System.String"). I tried looking for every "ldstr" and then tracing the instructions to see if they eventually called the ignore&nbsp;method, but I think I made too many assumptions (or not enough). It was creating false positives, or not ignoring certain strings.&nbsp;I don't know IL or FxCop 1.36 too well, and I can't seem to find examples of this. <br /><br />Just to add more information, I should be able to ignore the following "ldstr" instructions:<br /> <pre lang="x-c#">byte[] array = new byte[]{0,1,2,3,4,5,6,7,8}; string a = string.Format(Strings.Ignore("Format: {0}"), 5); string b = Strings.Ignore("Ignore this"); string c = string.Format(Strings.Ignore("{0}{1}{2}"), m_Int, m_Bool, m_Float); string d = Strings.Ignore("Array has: " + array.Length + " elements.");</pre> Basically, anytime ANY string literal is passed into the Strings.Ignore method, it needs to be ignored. Otherwise, it needs to be detected and reported as a problem. If&nbsp;a string is stored inside a variable, and then that variable is passed into Strings.Ignore, then it isn't ignored. "ldstr" should only be ignored if they're passed to the ignore method.<br />Mon, 12 Oct 2009 19:12:01 Z2009-10-29T16:03:40Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/e66b3529-b5d5-4928-bcb0-4850df644541http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/e66b3529-b5d5-4928-bcb0-4850df644541DanielRosehttp://social.msdn.microsoft.com/Profile/en-US/?user=DanielRoseCA1707, CA1709, CA1028 on native enumsHi,<br/><br/>I am using a bunch of P/Invoke calls in my application for system functions such as CreateWindowEx, ... (for WPF HwndHost). Those API calls take a bunch of parameters, such as the window style, which are written as WS_VISIBLE (for example). So in my code I have these enum members, as written in the Microsoft Windows headers.<br/><br/>Unfortunately, FxCop fires CA1707 and CA1709 on these. For other false positives related to native interop, FxCop ignores them if they are in the NativeMethods class, but this isn't working for these false positives.<br/><br/>Also, I have my window styles enum of the base type uint. I took this from pinvoke.net. Is this correct? If it is, then the warning CA1028 also fires in error in this case, since I need this for native interop.<br/><br/>Will this be fixed in the future, or is the only way to ignore these warnings?<br/><br/>Kind regards,<br/>Daniel RoseMon, 26 Oct 2009 14:25:20 Z2009-10-28T13:32:41Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/13e132ed-6e88-4326-ac6a-edde0f33f9e2http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/13e132ed-6e88-4326-ac6a-edde0f33f9e2monkeygethttp://social.msdn.microsoft.com/Profile/en-US/?user=monkeygetCode analysis apis/toolsFxCop and Visual Studio's Code Analysis are very nice tools but I'd like to perform my own static code analysis.<br/> <br/> I am looking for apis/frameworks/... to programmatically inspect our .NET projects.<br/> I'd like to write code able to do things like :<br/> <ul> <li>list methods which instantiate an object of class x</li> <li>find methods containing a variable named x </li> <li>list the callees of methods x</li> <li>...</li> </ul> <br/> Just to be clear I am not looking for an existing tool such as FXCop but I am rather looking for some kind of api allowing me to perform whatever kind of static analysis I fancy.Mon, 26 Oct 2009 20:13:05 Z2009-10-27T15:59:30Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/5ea899f4-5825-4a46-8f64-bfe7f2793b98http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/5ea899f4-5825-4a46-8f64-bfe7f2793b98gmancollhttp://social.msdn.microsoft.com/Profile/en-US/?user=gmancollDetecting Explicitly Declared Enum ValuesHi, <div><br/></div> <div>I'm looking for a way to determine whether the values of an enumeration have been defined explicitly in code or assigned automatically by the compiler, for a rule that I'm writing to prevent explicit definitions of values unless they are powers of 2.  Is there a way of detecting this case?  I can't seem to find any property on the Field object that will help to determine this.</div> <div><br/></div> <div>Thanks in advance,</div> <div><br/></div> <div>Graham</div>Wed, 21 Oct 2009 12:50:01 Z2009-10-27T14:46:28Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/dd78f41b-839f-425c-926a-ee1149b9c91fhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/dd78f41b-839f-425c-926a-ee1149b9c91fThe Samsterhttp://social.msdn.microsoft.com/Profile/en-US/?user=The%20SamsterCA1053 (Remove the public constructors from [className]) in test class...I have a class decorated with the [TestClass()] attribute. It was auto-generated by Visual Studio's unit testing framework. I'm getting a CA1053 error when I run code static analysis. Can this be fixed? Will it affect the unit testing generated code or render it unusable?<br><br>Thank you,<br>Sammy<br><br>Sun, 05 Nov 2006 18:36:59 Z2009-10-25T12:03:27Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/cfc15d25-8c2f-435d-b6e9-e5bae1208211http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/cfc15d25-8c2f-435d-b6e9-e5bae1208211Ozone Bluehttp://social.msdn.microsoft.com/Profile/en-US/?user=Ozone%20BlueCA1811, AvoidUncalledPrivateCode: Separate private & internal?I've been running FxCop on a managed assembly we build for a couple of days now, and something has struck me about the AvoidUncalledPrivateCode Performance rule. While it took me a bit to understand why internal members would be flagged alongside private members, I'm still left wondering if perhaps they shouldn't be separate rules.<br/> <br/> To give some context, our project is a managed assembly that serves as an API for an unmanaged product. As such, there are a number of specific constructors and methods that have to be kept as internal-only, but serve a greater breadth of functionality within the library and can/will be used in the future. While I see the logic in flagging both types by this rule, in my context I would draw more of a distinction between internal and private class data and would prefer to flag one but not the other. Any thoughts on whether that would be a valid option, or is there some other reason I don't see as to why it would be prohibitive to flag one but not the other?<br/> <br/> I realize it's probably nit-picking a bit, but I figured I'd ask.  :-)<br/> <br/> <br/> Thanks,<br/> Mike<br/>Wed, 21 Oct 2009 22:03:07 Z2009-10-23T05:10:39Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/10ae2d39-9f98-41ee-a159-a557a1f0fc63http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/10ae2d39-9f98-41ee-a159-a557a1f0fc63Eissinghttp://social.msdn.microsoft.com/Profile/en-US/?user=EissingCan not switch Rule from error to warning<p>Hi, <br/>in the Code Analysis Editor I switch a rule from Error to warning ( unckeck Treat Warning as Error). All seems fine, if I build my solution locally on the Development PC. But if I run the same solution on the Build PC I get a build error for rule CA1709. But this rule is switech to warning.</p> <p>c:\VLS\MainCIBuild\Sources\Main\Source\Vls\DP.Vls.Web\Shipment\Shipment.aspx.cs(86,0): error : CA1709 : Microsoft.Naming : Correct the casing of 'rcb' in member name 'Shipment.rcbReceiverAddressTypes_SelectedIndexChanged(object, RadComboBoxSelectedIndexChangedEventArgs)' by changing it to 'Rcb'.<br/><br/>Buildscript-Setting <br/><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p>&lt;</p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span></p> <p><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">RunCodeAnalysis</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;</span></span><span style="font-size:x-small">Default</span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&lt;/</span></span><span style="font-size:x-small;color:#a31515"><span style="font-size:x-small;color:#a31515">RunCodeAnalysis</span></span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">&gt;</span></span></p> <span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><font size=2 color="#0000ff"><font size=2 color="#0000ff"> <p> </p> </font></font></span><font size=2 color="#0000ff"> <p> </p> </font></span> <p><br/><br/><br/>Please help.<br/><br/>Regards Josef</p><hr class="sig">eisisngTue, 22 Sep 2009 11:59:07 Z2009-10-19T17:30:56Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/6558abcd-cbde-426b-96bc-d0ef5aca3d9chttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/6558abcd-cbde-426b-96bc-d0ef5aca3d9cHaiying Xu - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Haiying%20Xu%20-%20MSFTFxCop 1.36 Released!<font face=Arial size=2> <p class=MsoListParagraph style="margin:0in 0in 10pt 0.5in;line-height:150%"><span style="font-family:'Arial','sans-serif'"><font size=3>We've released FxCop 1.36. See the following for more information:<b style=""></b></font></span></p> <p align=left><span style="font-size:11pt;color:#1f497d;line-height:115%;font-family:'Calibri','sans-serif'"><a title="http://blogs.msdn.com/fxcop/archive/2008/08/19/fxcop-1-36-released.aspx" href="http://blogs.msdn.com/fxcop/archive/2008/08/19/fxcop-1-36-released.aspx">http://blogs.msdn.com/fxcop/archive/2008/08/19/fxcop-1-36-released.aspx</a> </span></font></p>Tue, 19 Aug 2008 20:41:53 Z2009-10-23T17:47:49Zhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/109f9f14-aadd-449b-a2b0-21f6b6364f2bhttp://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/109f9f14-aadd-449b-a2b0-21f6b6364f2belanius0http://social.msdn.microsoft.com/Profile/en-US/?user=elanius0Applicatin Verifier - HighVersionLie and drvstore.dllHi<br /> <br /> I'm trying to pass my application thought MS Logo Toolkit. There was written that I have to have installed Application Verifier with it. But if there is AppVerifier than my application failed during installation. I reported this problem on Windows 7 Software Logo Program but I have no help from there.<br /> https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=496156&amp;SiteID=831<br /> <br /> I will try explain what is problem. For replicate this bug you do not need my application just any driver which is not installed yet and pnputil.exe which is default MS tool for adding drivers into driver store on win vista and higher.<br /> <br /> Here are steps to replicate this bug. I tested it on Win 7 32bit RTM<br /> <br /> 1. Run AppVerifier<br /> 2. Add C:\Windows\system32\pnputil.exe<br /> 3. Check Compatibility-&gt;HighVersionLie<br /> 4. Save<br /> <br /> 5. In Command line write e.g.: pnputil.exe /a C:\drivers\*.inf<br /> <br /> What happen is that AppVerifier increase version of OS to check if tested application will work in future but pnputil.exe failed with error &quot;The request is not supported.&quot; In setupapi.dev.log I can see what is problem <br /> !!! sto:&nbsp;&nbsp;&nbsp;&nbsp; Using mismatched version 6.1.7600 drvstore.dll on version 7.0.8000 system. Error = 0x00000032<br /> <br /> drvstore.dll have problem with higher version of OS. I don't know what to do with this. I'm stuck on this and I can not continue in obtaining Win 7 Logo. <br /> <br /> Any suggestions, links, emails for solve this problem?<br /> Thanks.<br /> &nbsp;Fri, 16 Oct 2009 13:18:34 Z2009-10-19T01:47:41Z