Using multiple Source control folders in a single build definition TFS 2010 - msbuild

In the Workspace tab
Source Control Folder: I am picking only two locations from my entire team project. I do not want to pick the entire team project because it has 20 projects.
I only need two project locations for the build.
$/TeamProject/ABCProj.SVC
$/TeamProject/ABCProj.UI
Build Agent Folder, If i specify the same $(SourceDir) for both the Source control folder locations($/TeamProject/ABCProj.SVC, $/TeamProject/ABCProj.UI)
above, I am unable to save the build definition.
I am getting an error when saving the Build definition
"$(SourceDir) can only be mapped one time in a given workspace"
Can any one please suggest a solution.

You'll have to map your version control folders to different source directories, for example:
$/TeamProject/ABCProj.SVC -> $(SourceDir)/ABCProj.SVC
$/TeamProject/ABCProj.UI -> $(SourceDir)/ABCProj.UI
Alternatively, you can just map $/TeamProject to $(SourceDir) and cloak all subprojects you don't want to get the sources for.

Related

List files and paths in a VB poject

I have several VB.Net projects each with containing many files/forms. Several of the forms are shared/linked between more than one project and saved in a shared folder. Recently I discovered one file that should have been shared was not, meaning that there were two files with the same name in two different folders. Obviously any change of a file in one project was not shown in the other poject. Is there any way of listing all the files and paths in a project - either to screen or spreadsheet?
you should take a look at the projectname.vbproj file, it is a xml file and in the node called <ItemGroup> you are going to find what you are looking for, you can tell if a file is a linked one if inside the <Compile> node there is a <Link> tag.

How to stop TFS creating a new folder with each build

I have a build definition in TFS 2012 and its currently dropping the build onto a network share which will be used as the website root folder.
The problem is it's creating a new folder based on the version number each time. I'd like to keep the version numbering but just make it clear out and deploy to the same folder over and over so I don't have to change anything in IIS. Folders are like -
Build20130123.1
Build20130123.2
each containing a complete deployment. I just need one folder that gets everything dumped in it for every build.
What you are trying to do is counterintuitive to the build system, because not only does it drop the artifacts of the build into that folder, but when the retention policy is fulfilled it will try to delete those artifacts back out. So if you do this you will need to set your retention policy to keep always so it never tries to delete out the contents of this folder. You are better off, adding after the copy to drop step a Manual copy to this static folder that won't be subject to retention policy as it will know nothing about it. But if you wish when you open the template in the main sequence you will see a sub-sequence called Update Drop Location. In there is 3 items, the middle one is an If statement for if drop build and Build Reason is triggered, dig down into the then side and you will find a sequence which contains an activity called Set Drop Location. Right click on its properties and you will see how the path string is currently put together, adjust this string to what you wish and then this value will be propagated through out the build template
You could use the new feature in 2012 sp1 that lets you place the output within TFS source control then you would just need to run a TFS GET command manually or via an updated workflow call to update the latest files and binaries for your website location. Option number 3 in the picture below.
2012 MSDN-Select a Staging Location and Setting Up a Drop Folder

How to differentiate tasks from master project and subprojects

Using the Microsoft Project VSTO, I am able to iterate through all the Tasks in a project.
The problem with this approach is that if a file has one master project and multiple subprojects, the Tasks collection for the master project will contain tasks from ALL the projects (master as well as subprojects).
Is there someway to differentiate whether the Task is from a master project or a subproject?
The easies way is Task.Project that will return you name of a project your task belongs to link also you can get name of a subproject from it's "ancor" task in your master through Task.Subproject link. There is also a field which tells you if the subproject is Read-Only or you can update it: Task.SubProjectReadOnly link
If you want to access only the main project, it might be quicker to start with the summary task and recursively deal with each task's children, stopping the recursion on tasks which represent external subprojects. That way, you will not have to touch every task.

Create MSBuild task that recursively copies a folder to several projects in my solution

I'm new to MSBuild and I tried reading up on several sources on the net but I'm missing somet things..
Here's what I want:
A build task that on execution recursively copies a directory structure from a (hardcoded/configured) path on my machine to a set of projects in the solution
Then compiles (release/debug, I guess I can make two sets of them)
Preferably this process would be called when I press f5 in VS and is selectable from the release/debug dropdown (with a different name off course).
What I don't get yet:
Where do I place my .proj file? In my root (where my sln file is)?
How can I make VS pick it up (bind it to f5).
Look at the Copy Task examples on how to copy a file structure recursively.

Netbeans + project groups: how can I tweak, where Netbeans stores information about created project groups?

When coding, I use Dropbox to sync folder in which I keep my projects between 3 computers.
I use Netbeans as an IDE, and so - I create project groups very often. While creating them, I usually choose "Folder of Projects" option, so it includes all projects found in specific folder.
Is it possible to tweak Netbeans, that it would store information about created project groups in specific place? Is there any option which changes this setting?
Netbeans stores the groups information in:
{netbeans_user_root}/config/Preferences/org/netbeans/modules/projectui/groups
I doubt that this can be changed.