Presented:Richard Hundhausen
In this video, Richard Hundhausen shows you how to create, deploy, and test a custom check-in policy in Visual Studio Team System.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
Know when it is written in house on a principal consultant with access in a Microsoft regional Director and distributing systematically anus and look at how to create deploy music custom check in policy that out of the box version 1 team foundation server provides rejected policies work items code analysis and test after you install team foundation power tools version 1 2 which are defined as the www team system which is home to Utah for more policies across the half forgotten patterns change the comments and a cool work I heard editors review the use chicken policies can be configured per team projects but as right clicking going to project settings for control over to check in policy and adding one was one of the viewers will be on these built in policies of the policies provided by Microsoft and
Minute 1
Moral to implement some kind of custom business rule for this demonstration of Lex s build a class library and turned into a check in policy deployed and tested was going to start recruiting new projects virtues of Visual Basic class library and recycle it illegal works and will disrupt us into a folder called projects wielded it was under source control just yet Let s rename this class 12 illegal words and for the sake administration minute sheet and his points in sample code are to have greater social good is a one script notepad copy all of us into my code if you squeeze your beginning to actually reference few other
Minute 2
Else in this project we are working with the object model from the studio of team foundation server especially for source control need to reference a couple deals are so first of all I m been a reference to system drawing and the system Windows forms you to assemblies we need for a pop up file a support or being able to specify our legal words are custom policy was to browse for couple more secession undersea drive program files Microsoft Visual Studio eight common seven IEEE and in private assemblies you all that week was later this is where Microsoft don t hold the interesting API at the allows for much everything Visual Studio and team system
Minute 3
Seal fight in here just everything team foundation server build clients work items to service in Russia interested in the team foundation capacitor version control clients and version control called to give us access to the pending changes in its like I need to okay so my total away when he walked through the code here we got an illegal wordless basic river and allow the user to specify what works should not be found in the source control files when they check in so I m thinking foo and bar are good candidates separated list your smoking developer working for checking some of them were more and it is case insensitive web or in your duo wants a this code is in balance it s illegal before we got it from Internet and is it who want to use the permanence
Minute 4
You also search for other inflammatory words as well as a couple interfaces of being implemented here and I m actually taken the easy way out here just inheriting from a base class called policy face which implements our definition of Aragon which interfaces together some custom properties here description which largely be broadcast into the dialog window when the user selects and configures the read only property type that is the jump over 13 explore what I d choose a source control policy in the click add these are just the types your supply if I choose a work item is the description that we displayed this policy requires global and this is the type of the description again while I was telling your in my interface with the description of the type is to broadcast into those albums were seen just 13 explore those types
Minute 5
In which is little more lover a description of what this policy does absolute people but the files being checked in or stand for words that are in the illegal or otherwise inflammatory is also installation instructions that he did point out that it saw just go to the polls as a means to be automatically deployed to all developers workstations are well over a million tires on the team of initiative is the all Islander and simple as desktop if it does not I think it is installation instruction error because the team project knows there is a policy but the new person just is not installed yet so you get a policy failure in a message here that says they to install download and run legal works policy unless I do what were some of the political machine software otherwise just please don t use any of you were reports we ve got a remote property can edit
Minute 6
Is confirming a true saying if somebody does bring up his window here and here for reference archives this has no edit button here because their implementation can edit return false but other policy psychoanalysis policy if I did choose something or groups in the Highway code analysis I can edit that it actually has this dialogue support here for picking and choosing code analysis rules for my policies can be the same woman out of the water when you can configure and specify the works of her legal even if they get the hell in their little to someone else available at this time without direction to productize this support working people about what to include a help files or something or script absence followed avenues and troubleshooting tips
Minute 7
There is a cure for prevents to initialize us those check pending changes that here s where I should bring up more at swimming click the edit button on going to pop an instance of my pile of legal work policy which is Google right else I haven t had a project that shows a dialog will appear castle to specify some words and he would OKs to say those words into a verbal political works to hit them at that violence in my project or investors this dialogue legal work policy if we open up its just a form with a text box ones to allow a user to a project to specify the wars in Alaska have here is the magic method evaluate this is the one that runs and does what it needs to be done so religious declare a array list of
Minute 8
Others were going to declare array of our search words return those out split off so the specified food or one of arranged moments in and an assist as a sufficient Cosa could be a basically living through all the pending changes in the upending fecund object in as little as you want to access the team foundation server version control object model thoughts abstract and work at this level we say in your pending changes to the all the evidence is in the pending changes window and go through one of those and get me the thought local item which is the local path to the file sitting in my workspace over to comes using a stream stream reader of system I O and against the more efficient management of the whole file into the end something extra
Minute 9
Being if the whole file contains that were were in there and comparing uppercase uppercase so we can see regardless of upper lower mixed case but there wasn t much if I find a match by office message into the policy for your array and a lucrative because one pass I should look for many photos of the it is exceptionally code here somewhere was an Ohio error something like a refill the exception than the messages becomes the exception about to strike for troubleshooting to know about what you posted a try catch such an angle will have finally returned back or failures as a policy failure rate which is what the check in window or the pending changes with respect on the sickness and in rebuild the picture or
Minute 10
Working well at intent to anything that s a long step two is now to get this deal well here just goes over into a well known location and have registered points of us write inverted from the registry and were living in a Day of net in the registry that is not where we like to register things that this is a Visual Studio application after all that Visual Studio is silly column based application and uses the registry heavily for settings at plug ins and skins like a minimize this and let s go surf over to where graphs of yellow has been created section under projects for legal words as my bin folder debug and all are liquor runs and steal your wallpaper deal levels are replaced with a machine that didn t have Visual Studio installed a
Minute 11
Movies deal Wells was always better to have a team Explorer and Universal Studios home ahead of time that you have all these automobiles also will have a first for the licensing is concerned was copy to steal in the books go back to where we founder drills the premise of this folder for studio 80s common IDE private assembly have in their slots a false appearance in the paste this in your with all the others they does anyone want with its eyes have it here with all k litanies as well be sure though you have discriminating conventions of the your namespace prefix on these files differentiates them from the ones Microsoft is good will spring up the registry actually been popped into a local machine software
Minute 12
Have Microsoft Visual Studio vendor and version 8 are we dizzy team foundation source control check in policies will a slightly distorted out of the cells for your fish kill them software Microsoft Visual Studio eight team foundation source control check in policies and write no devoid of the three check in policies code analysis of unit testing policy and workouts have looks at them right quick revenue stream by legal words to point back to work you will live in this folder and copy to clipboard before typing legal
Minute 13
Words don t do is want to make sure that file is and there is no one correct otherwise little studio starts a perfectly okay so I have added a fourth check in policy here to the registry of the next time I start Visual Studio I can actually exit this one restarted with a sort of the new instance of Visual Studio that should be just as a test of who can explore animals go to war properties here for source control check in policy was at advocate that we have one of the legal word filter See the description stands the files being check in for works of NBA illegal or inflammatory click okay it s more enough to pop up the edit window closing at method which pops up a dialog windows are created and we can just enter a comma separated list your legal works through
Minute 14
Are about via Google then that shows here s a check of policy as it which I will second disable or enable it and remove it if I edit the pops a dialog window back again I can change the words are in here click okay click okay to try initially great hustle the new project were to do a Visual Basic console application called hello world of source control and workspace and wishes to court over Monsieur Jen Fu as string world hands in horror as integer 2 in the most in foobar is a Boolean he is once
Minute 15
Comfortingly absolute words in a casualty boss the lead developer has not turned on a policy that he or she keeps threatening to it so I could check in Moon policy runs lose where you can see them here on the policy failures and legal work through illegal word bar and illegal word foobar found at March 1 two a decision time to override and risk of the wrath of my demonstrator or do why go back or whatever we should handful of practices and give these much for things like FB and FD course of any conventional round of the nice assigned projects in the policy language and remember limitation for one of team foundation server is that it will not help you deploy those deals
Minute 16
Despots you must manually deploy the allows developers or testers and it is rejecting things in a bucket of entities and throughout an MSI works from the deal well in replication in the registry yourself well as you can see there really is no limit to what business rules to implement the subject of policies of other examples I ve seen implemented possibly popping up in me why during check in diplomats and code review by minute or 2000 on a principal consultant with associate a Microsoft regional Director and the Visual Studio team system MVP at the
Click here to go to original video page
Wednesday, July 9, 2008
Video: How Do I: Create a Custom Check-In Policy?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment