I am working with Visual Studio 2012 paired with TFS 2012. Right now I am building a custom workflow template and need to run an if statement to separate two invokeprocess's. The condition for the if statement needs to operate off of which build configuration I am running, I want it to operate like this C code:
if(Configuration == 'Debug')
{//run for debug}
else if(Configuration == 'Release')
{//run for release}
My problem is that I can't find any documentation or help as to how one would go about creating a conditional in workflow, and how I can use my build configuration as a value in this conditional. Hopefully a straight-forward question that someone has some insight on, if any clarification is needed please let me know! Thanks!
To answer your basic question about an "if" in a workflow, open the worflow xaml file in the designer. Go to View > Toolbox. Under the heading "Control Flow" there is an "If" activity that you can drag and drop into your workflow.
A workflow can have multiple projects and solution being built in multiple configurations. The workflow contains an argument, BuildSettings, which has a property called PlatformConfigurations. The default template will loop through all PlatformConfigurations for all projects in the "Compile and Test" sequence. You may just want to grab the platformConfiguration variable in that loop and get the Configuration and put the if either before or after the MSBuild activity or you may need additional logic for specific project you want to act on.
Related
Is it possible to create two work items in different project but related each other ?
Description;
i mean Project 1 has a work item "ABC", and Project 2 has work item "ABC"
if I change state of my work item "ABC" from doing to done at Project 1, is it possible to have my work item "ABC" at Project 2 automatically change from doing to done as well?
looking for help
Thank you
Regards
Azh
If you only want to relate two work items and regardless of automatically change state, you can certainly relate two work items that are in different project. What you need to do is the same as relating two work items in the same project. You can refer to this document for detailed steps.
As of this time, however, the function of automatically change work items' state is not supported. But Microsoft have added the feature to their roadmap and offered an alternative solution. Please click this link for details and documentation.
There is a vote on this function in Developer Community, where you can follow the latest development of this feature.
I have a 2013 workflow that starts a number of 2010 workflows. I am converting these over to the new HTTP calls, but I'm running into a problem. It seems when you use the "Start 2010 Workflow" it creates a dictionary variable for that action. I need to know if there is a way to delete those unneeded dictionary variables. They are not in the local variable list so I cannot delete that way. I need to delete them as they are pushing my variable count over 50 and I cannot publish the workflow.
So Microsoft in its great wisdom decided that they were not going to give the user a way to delete the variables that are created when you use the "Start 2010 Workflow". I have to say, they are geniuses at Microsoft to not give the user a way to delete variables that are no longer needed. Here is a round about way of doing though if you need to do it. Scroll down and the answer will be there. https://social.msdn.microsoft.com/Forums/Lync/en-US/e9d7b2ba-593d-4524-93ee-a76a579fc6ff/deleting-coordination-action-output-variables-in-spd-2013?forum=sharepointcustomization
I'm having fun deploying some solutions to my SharePoint 2013 Foundation Edition. I'm checking out some eLearning Solutions, currently the SharePoint Learning Kit (SLK).
The solution comes with 3 Features:
SLK
SLK - Assign Self
SLK - Assign to Site
I guess I need the "SLK" Feature to activate the Solution but if I activate the other two features, I dont see any differences.
Can somebody tell me if I need to activate those two, that the solution works and what they are there for?
Thanks in Advance
-DaveTheMave
To simply answer your question - No, you don't need those 2 additional features, the SLK will work perfectly without them.
I don't have them activated myself.
Here is what the do:
Assign Self:
This feature add the "Assign To Self" menu item to document libraries. This allows the user to immediately assign an item to themselves and run it.
Assign to Site:
This feature add the "Assign To Site" menu item to document libraries. This allows the user to start assigning an item to the current site without having to choose the site to assign to. In effect it jumps straight to the Assignment Properties page for the current site.
As you are new to the SLK, I can highly recommend you this YouTube Tutorial on "how to get started with SLK".
We just moved to use TFS 2012 which seems to be a huge upgrade for 2008 in usability with VS2012.
However, there is a very annoying feature with "My Work" feature if you connect your work with a certain task. After you have connected the task with your work item, any checkin to any branch will mark the task to "done" status. How can I disable this? I'd like to have the development branch so that I can make small commits during development but with this feature I cannot connect the task with my current work if I do so. The only way to do this (which I know) is to select the task for my current work just before I merge all small commits from my personal branch to master. Yes this is doable but it isn't as nice workflow as it may be.
With taskboard feature in scrum template moving tasks to done after work is done is anyway trivial and common part of workflow. Automatic done movement is pretty annoying automation which shouldn't be there.
So my questions are: How to disable this? Is this feature part of template or some much more deeper integration with TFS work item management?
We are using Scrum 2.0 template from Microsoft.
When you are in the Pending Changes panel ready to check in your fix and you associate you work item with the changeset you should change "Resolve" to "Associate" (or what ever it is in Scrum).
To make this the Default is more complicated.
You will need to edit the Work Item Template definition for the types of work items you are using (Bug, Task, etc.).
One option is to remove the "Resolve" option altogether, you can do this as follows:
Open the XML for your Work Item Type (or the GUI in the Power Toys if you prefer):
Find and remove the:
<ACTION> <ACTION value="Microsoft.VSTS.Actions.Checkin" /> </ACTION>
section from your template - it will be in the <TRANSITIONS> against a particular transition between 2 states.
Doing this means TFS will never transition your work item as part of your checkin, you will have to do it every time.
The other option is to add a new work item "State" (e.g. "Under Development") that doesn't have an ACTION of Checkin. You can then transition you work items to this state whist working on them and then back to "Assigned" (or whatever) before checking them in in and "Resolving" them.
The Professional Team Foundation Server 2010 book from Wrox will help with WIT editing.
There are probably more ways to do this, it all depends on the team and environment you work in :).
There is also another way to do this that only affects your client machine:
To make “Associate” the default action (instead of “Resolve”), set the registry key
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Behavior\ResolveAsDefaultCheckinAction to False.
N.B. Replace 12.0 (for VS2013) with 14.0 for VS2015, 11.0 for VS 2012 or 10.0 for VS 2010.
Now you can upgrade to VS2015 (if already didn't do so) and uncheck the new checkbox Tools > Options > Source Control > Visual Studio Team Foundation > "Resolve associated work items on check-in". After that, "Associate" becomes the default option and you won't need to change it manually on commit
In Visual Studio 2015, this can be done by unchecking 'Resolve associated work items on check-in' in the Options menu.
Tools > Options > Source Control > Visual Studio Team Foundation Server
edits: typos
Based on the answer of DaveShaw and in respect to VS2022, my answer does not contain new information. But in case you are not familiar with RegEdit and you are searching for an automated way for the roll out, use the reg file instead.
create a registry file with name e.g. "AssociateAsDefaultCheckinAction.reg"
add the text below:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\12.0\TeamFoundation\SourceControl\Behavior]
"ResolveAsDefaultCheckinAction "="False"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\13.0\TeamFoundation\SourceControl\Behavior]
"ResolveAsDefaultCheckinAction "="False"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\TeamFoundation\SourceControl\Behavior]
"ResolveAsDefaultCheckinAction "="False"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\15.0\TeamFoundation\SourceControl\Behavior]
"ResolveAsDefaultCheckinAction "="False"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\16.0\TeamFoundation\SourceControl\Behavior]
"ResolveAsDefaultCheckinAction "="False"
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\17.0\TeamFoundation\SourceControl\Behavior]
"ResolveAsDefaultCheckinAction "="False"
execute the reg file on the developers system
After that, restart visual studio and check the result.
The state “resolve” is no longer visible on check-in
I'm trying to automate a process for our documentation team. They have a pretty big batch of framemaker files across several books and use RoboHelp to generate EclipseHelp for two different versions of our project.
Each framemaker file has the appropriate tags set to indicate which version a particular piece of documentation applies to. Currently the writers modify the conditional build expression to specify the correct set of tags and run File->Generate->EclipseHelp each time. I can run the generation process just fine, but I can't figure out how to change which tags it's using.
I've read through RoboHelp's scripting guide and the only references I can find to Conditional Build Tags is the ability to create and delete them. I can't find any references to Conditional Build Expressions. Does anyone know any way to modify it from a script? Alternatively, if someone can suggest a different way of organizing RoboHelp/Framemaker that is more conducive, I'm all ears, though I have basically zero familiarity with either.
The Conditional Build Expression forms form of your EclipseHelp Single Source layout. As such your script needs to refer to the tags there.
I'm going to answer with what I found - even though it's only a partial answer - just in case it can help someone, or possibly give someone enough to figure out a more proper answer.
Basically I found that each Single Source Layout has a corresponding *.ssl file. If your layout is called OnlineHelp, it will be (in my experience) OnlineHelp.ssl and will be in the same directory as your .xpj file. The ssl file is just a bunch of xml and has some number of sections. One of the sections will have the same name as the content category where you would go in the UI to change the Conditional Build Expression. In that section is an element named "BuildExpression". Set that to whatever you need and reopen your RoboHelp project. It's a bit of a hack, but I set up a groovy script to do that before running my ExtendScript and it gets the job done.