Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check-in policy error with VS 2012 and TFS 2010 - CheckForWarningsPolicy

We were using Team Foudation Server 2010 with Visual Studio 2010 for every project we made in our company. We created some post build events, some check-in policies and everything was working correctly.

Recently we moved to Visual Studio Professional 2012 (Version 11.0.51106.06 Update 1) and now, everytime we try to check-in some code, we get this error:

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.

ReadMe.txt that is cited in the end of the error is not reachable, there is no link or indication where the file is.

I've searched for this answer in google and here, but without any luck. Probably I'm making the wrong search.

I read some questions like:

  • Custom policies in Visual Studio 2012 and TFS 2010
  • TFS 2012 and VS 2010

But none of them worked for me. What can I do to solve this error?

Thank's

like image 902
André Maldonado Avatar asked Nov 03 '22 06:11

André Maldonado


1 Answers

I "solved" the error and I'll post what I did so anyone who's facing the same problem can learn from my experience.

To create this check-in policy in Visual Studio 2010 we used a custom policy developed by Jeff Bramwell (link to MSDN profile). This policy, apparently, it's not being maintained by him as you can see in the policy page in MSDN. I asked a question in the page and sent him a tweet, now I'll wait for his answer.

Testing this policy in Visual Studio 2010 I checked that it was not working, so, I just removed it from the Project in Project > Settings > Source Control > Check-in Policy.

If I need something more detailed, I can add a Code Analysis check-in policy as described in the Stack Overflow question about Prevent check-in if code analysis warning exists. With this approach I can even set a custom rule.

Hope this will help someone with the same problem.

like image 140
André Maldonado Avatar answered Nov 11 '22 04:11

André Maldonado