Check for Compilation Warnings and Errors Check-in Policy (2010)

Free

A TFS 2010 check-in policy that checks for compilation warnings and errors. You can optionally restrict the set of warnings to Code Contract warnings only, if desired.

(2) Review
Visual Studio
2010
Download (2,283)
5/29/2010
2.1
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (2)
Q and A (6)
Sign in to write a review
Sort by:

very good tool

by Pablo Domingo | July 27 2010

It is a very good idea but I do not know why but It is not working in VS 2010.

I have configured the component to handle everything, warning and erros as errors but TFS allows us to check in.
I created a class var that is not being used and VS detects this warning but TFS says all policies are satisfied.

Sign in to start a discussion


  • VS2012 or VS 2013 version
    1 Posts | Last post January 15, 2014
    • Any plan on updating this for VS2012 or VS2013?
  • Plans for Visual Studio 2012
    3 Posts | Last post April 16, 2013
    • Hy Jeff, any plans to integrate this tool with Visual Studio 2012?
      
      I'm having some issues using that in TFS 2010 with VSTS 2012.
      
      "Internal error in Check for Compilation Warnings and Errors Policy. Error loading the Check for Compilation Warnings and Errors Policy policy (The policy assembly 'CheckForWarningsPolicy, Version=2.1.0.0, Culture=neutral, PublicKeyToken=342882479c9e5e25' is not registered.). Installation instructions: To install this policy, please read ReadMe.txt.
      
      Error loading the Check for Compilation Warnings and Errors Policy policy (The policy assembly 'CheckForWarningsPolicy, Version=2.1.0.0, Culture=neutral, PublicKeyToken=342882479c9e5e25' is not registered.). Installation instructions: To install this policy, please read ReadMe.txt."
      
      Thank's
    • Hi Jeff,
      
      I am having the same error André is reporting. Any updates?
      Thanks.
    • Hi,
      Any news regarding the VS2012 version?
  • failed parsing file
    1 Posts | Last post May 10, 2012
    • Hi Jeff
      We use your checkin policy in TFS 2010.
      But we always receive following policy warning: "Failed parsing file ..." on check-in a file.
      
      We use other add-ins and extensions like ReSharper, Productivity Power Tools and TFS Power Tools.
      In the background works a TFS 2010 (installed in German language), we use an english VS.
      
      Did you know what that could be that no file pass the policy?
      
      Regards,
      Demian
  • Checking in files unrelated to loaded project
    1 Posts | Last post November 17, 2011
    • We are using this check-in policy with general success but we have seen something that you might be able to at least explain.  If we are checking in files that are unrelated to the loaded project and the project doesn't compile (because it is still in development) the check-in policy is triggered because of the project errors.  This leads to confusion for the developer.  
      
      This is one scenario.  In the morning a developer does a forward integration (FI) from a mainline of code into their development branch to get synced up to the latest changes.  However, they forget to checkin the files checked out by TFS during the FI as "merge,edit".  The developer loads their development project and starts working.  They then notice the checked out "merge,edit" files in source control and remember that they should check those files in.  They try check the files in but trigger this check-in policy because of the build errors in their project.  
      
      There are multiple ways we get around this.  One, don't forget to checkin the "merge,edit" files before loading a project that doesn't build.  Two, get the project you are working on to build.  Three, unload the project, checkin "merge,edit" files and reload the project.  The scenario made me wonder how this check-in policy works because it never forces VS2010 to build anything and if it is only looking at the loaded project it is obviously going to be wrong in some instances.  Can you give some feedback on what the checkin policy looks at to determine if there are warnings/errors with the files being checked in?
  • Three possible bugs found on this tool
    1 Posts | Last post July 19, 2011
    • Hi Jeff, I've been testing this policy in several TFS projects and servers, and I've found these problems:
      
      1) Code Contract Warnings check box: This option is enabled even when the current value in the "Check for" radio button is "Both". I don't think this behavior is by design, because the check box is available only when the "Warnings" value is selected and it took me a while to figure out why the policy didn't detect warnings when the "Both" option was selected. When I changed the value to "Warnings", *unchecked* the Code Contracts Warnings check box and restored the "Both" value, the policy worked as expected. 
      2) Server-wide settings: I tried to set different settings for different team projects on a server, but it didn't work. When I changed settings in a project, the *same* settings where applied to other projects, overwriting the previous values. This happened even with VS restarts between changes.
      3) Compatibility between different versions: I installed the policy in a TFS 2008 server, and I tried to use it from VS 2010. When VS 2010 tried to execute the policy, an error message like "Unable to retrieve the registration information for 'PropertyService'" showed up. I'm using policies that work across different versions, like those found on TFS Power Tools.
      
      When all three problemas are avoided, the policy works as expected. I'm using it right now in some projects, but I hope these problems are addressed so I can use it in all projects.
      
      Thanks for your help, and keep the good work.
  • VS2008 and command-line
    5 Posts | Last post August 18, 2010
    • Hi Jeff - wasn't sure the best way to get this feedback to you. I downloaded the CheckForWarningPolicy.zip for VS2008 from your skydrive. However, there is a problem running it from a command prompt and using TF.EXE checkin. Someone else reported the issue on skydrive and you had a comment that a fix was coming, but that was October. I'm hoping a fix for the VS2008 flavor is available. Thank you.
      Mark Nadig
    • Hello, I must admit that this one slipped through the cracks.  I will get this resolved and posted by early next week (really :-).  --- Thanks, Jeff
    • FYI... I've uploaded an updated version for Visual Studio 2008/TFS 2008 here - http://visualstudiogallery.msdn.microsoft.com/en-us/a48ab174-be65-4110-b617-17d87105036e (this link is also at the bottom of the Description tab).
      
      Please let me know if you run into any other issues.
    • Hi 
      its not working in TFS2010 ..it shows me error TF10139 when i try to check the code which contains no error/warnings..
      i have installed TFS powertools also
      kindly help me.
      
    • Saima,
      
      I have a couple of questions:
      
      1. Have you installed the RTM version of the Power Tools - "Team Foundation Server Power Tools (April 2010)"?
      2. Is this something that occurs on more than one Visual Studio 2010 solution/project or is it just one specific solution?