Check In Policy to ensure that code builds

Is there a way to configure TFS to require that changes being checked in must produce a succesful build?
[105 byte] By [DanielJSegan] at [2008-2-10]
# 1

Yes there is.... the stupid thing though is that i don't have my dev PC handy here so i don't know exactly how

Lets give it a try though:

Right mouse click on your project in the Team Explorer.

Choose for the setting that says something like "Source control settings."

Now i think there is a tab saying: "Check-in policies", but i am not certain. Play with those a little, don't know the name of the check-in policy you need to pick.

JeroenVos at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 2
Daniel,

I'm not sure if the "clean build" checkin policy that came with Beta 2 is included in the RTM version. Regardless, it should be straightforward to build your own. You can search the web & this forum, or start at these links:

http://msdn2.microsoft.com/en-us/library/ms181459(VS.80).aspx
http://blogs.msdn.com/jmanning/archive/2005/09/16/469217.aspx
http://blogs.msdn.com/jmanning/archive/2006/01/21/515858.aspx

RichardBergMSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 3
Thanks. I will look into it.
DanielJSegan at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 4

Richard Berg MSFT wrote:
Daniel,

I'm not sure if the "clean build" checkin policy that came with Beta 2 is included in the RTM version. Regardless, it should be straightforward to build your own. You can search the web & this forum, or start at these links:

http://msdn2.microsoft.com/en-us/library/ms181459(VS.80).aspx
http://blogs.msdn.com/jmanning/archive/2005/09/16/469217.aspx
http://blogs.msdn.com/jmanning/archive/2006/01/21/515858.aspx

I'm still on Beta 3...... are you telling me when i upgrade to RTM that i will lose that functionality? That is somewhat...... strange......

JeroenVos at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 5

I’m using the en_vs_2005_tfs_trial.iso version from MSDN. I know what you are talking about. I’m beginning to find that a lot of things I expected to be in the release have either not made it or mysteriously disappeared.

I actually saw the policy mentioned in the book “Working with Microsoft Visual Studio 2005 Team System” and I wanted to apply it, as it would help me tremendously with ensuring that what I have in source control can be built.

I’m not opposed to putting this together myself if need be but it would be great if it came with the product.

DanielJSegan at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 6

The word on the street is that this policy is now part of Code Analysis.

http://blogs.msdn.com/team_foundation/archive/2005/04/15/408700.aspx

DanielJSegan at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 7

I am using TFS release and it does not work...

I have a windows form project, business layer and data layer. The enitre solution will build with no errors or warnings however I can't get it to check in unless I disable the check-in policy. The only thing I have checked is the enforce code analysis for managed code... Can someone verify if this really made it into release?

Channelzero at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...
# 8

You do have to enable code analysis in those projects as well. Otherwise the policy will fail even if your build is correct. You can find the code analysis option in the project options window. Or you can let all the projects conform to the policy by right clicking on the solution and choosing: "Migrate Code Analysis Policy Settings to Solution".

Hope this helps.

JeroenVos at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...

Visual Studio Team System

Site Classified