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.
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=22.214.171.124, 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=126.96.36.199, Culture=neutral, PublicKeyToken=342882479c9e5e25' is not registered.). Installation instructions: To install this policy, please read ReadMe.txt."
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?
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?
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.
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.
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.
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?