We have a solution with multiple projects. We'd like to build one particular project twice (running a script editing a few files from project in between these two builds) producing two different outputs.
Looking at the build template I can't navigate down to the level of individual projects, I can only see "build the solution" in the XAML. So I don't think we can perform any project specific actions there. Will I have to go down into MSBuild or are there other ways to do this?
You can.
From the "Items to Build" dialog, when you press the "Add" button, select "MSBuild Project files (*.*proj)" from the "Items of type" combo, then select your projects.
Beware that Default build template will go through the list of items to build and you cannot insert actions in between.
Related
Ideally I would like to clone a jenkins project, but it is in say /dir1/dir2/dir3/dir4/dir5 and I am in /dir1/dir2/dir6/dir7/dir8 and I can "copy existing item from" but it does not offer a browse, and I don't know how to specify a project from a different directory. If someone knows, you could let me know.
In the meantime, I will just have two window open. One window displaying the current project and the other window creating a new one, and I will just copy the things over. My problem, and I bet it is very simple but I could not find out during research or else it is so simple I overlooked it ;-) Jenkins wants me to specify the type (Freestyle project, MultiJob Project, Maven project, Pipeline, etc) and I am not sure. I want to make it the same as the existing project, but I can't figure out how to tell what type the existing project is. It does check out files from SVN and build via Java.
Can someone tell me how to find out what type of project an existing maven project is?
There is no specific tag, but if you open a project, delete button have the type of project information available. pipleline project will have "Delete Pipeline" button, maven project will have "Delete Maven Project" button and a freestyle project will only have "Delete Project" button.
In addition one should have description text about this information.
On Jenkins' Dashboard, each project type has a different icon representation on the left of the project table. For example, Folder project has a Folder icon. When you hover your mouse over the icon, it will show a tooltip that is the project type.
You can go to the script page on jenkins(http://replace_with_your_jenkins_url/script) and execute the below script:
def jenkins = Jenkins.getInstance()
def jobName = "name_of_your_job"
def job = jenkins.getItem(jobName)
println "Job type: ${job.getClass()}"
You don't need to know the project type. Just click on 'New Item' and enter the name of the new project and enter the name of the project you want to clone from, in 'Copy from' input and click OK
Is it possible for me to run multiple (2) projects at the same time?
I realize that you only have the option of making a single project the 'startup project'.
But I have 2 web projects in my solution, and I need to run both at the same time.
Is the only option opening multiple instances of VS?
Right-Click on your solution (Top-Most node in your Solution
Explorer)
Click on "Properties"
On the right panel, expand
"Common properties", and click on "Startup Project"
Click on "Multiple Startup Projects"
In the "Action" column, select "Start" on the project you want to start
Optionally, you can change the startup order by clicking on a project and moving it with the arrows on the right.
What I do is open another instance of VS and have each project open in the separate VS windows. Then I run both of them.
This saves the hassle of having to deal with changing the settings around.
Is there a way to create a build definition, in TFS 2010, that uses continuous integration trigger, and only builds the project who's code changed.
To clarify, what I'm searching for is the following scenario:
1 Solution
x Projects in Solution
1 Build Definition per Project
All Builds are CI triggered
When a check-in occours in a project only that project gets built and tested.
Place in your build definition's "Items to build" section of the "Process" tab any *.*proj instead of a *.sln.
In the "Workspace" section, select only the source control paths that relate with this project.
In the process tab, set "Clean Workspace" to "None", use "/t:Build" on the "MSBuild Arguments" and properly configure your projects and their dependencies in the solution. This way on each build, you will be getting the latest code, and then building whatever was modified, and anything that depends on it. This is much more dynamic and requires only one build definition. Let the build system operate as it was designed and leverage the optimized build process.
I have a solution the source Control (TFS 2008) with multiple projects. Some of the projects are independent of each other. I dont want to build the complete solution instead sometimes we need to build some of the projects.
I am a total newbie in Team Build. Please help how i can use the
<SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/Build-Development.sln">
<Targets></Targets>
<Properties></Properties>
</SolutionToBuild>
to select only some of the projects from the solution.
Kindly give a detailed answer for me as i am absolutely clueless about it.
Thanks
The easiest way to do this is to define a new solution configuration for your existing solution. Just follow these steps:
Open your solution
From the main Visual Studio menu, select Build > Configuration Manager...
Click the "Active solution configuration" drop down and select New...
Enter a name for the new configuration (e.g. "TFS")
Specify the configuration to copy settings from (e.g. "Release")
In the "Build" column, uncheck any projects you don't want to build from your TFS Build
Click Close
Update your configurations to build to use the configuration you just defined
That's it! There's no need to manage multiple solutions and new projects should be included in your new configuration by default. Switching them off is as simple as clearing a checkbox.
Create a second build and a second .sln file to do the build. We have one project with three different builds in it (a "main" build, a "utility" build, and a "code analysis" build).
Manually create a solution that includes all the projects you want to build and check it in. Then create a new build using the wizard. Finally, edit the created .PROJ file (found in $/ProjectName/TeamBuildTypes) and point it to the correct solution.
Alternatively, you could copy and modify your existing .PROJ file, but since you said you're a newbie, I'd stick with the first to begin with.
Does anybody know how can I configure TFS Build to build a set of projects in a solution instead?
The solution I have, has 16 projects but for one of my build definitions I want some of them to be compiled.
The easiest way in my opinion is to create a new solution file. There is nothing stopping you from having several solutions that reference the same projects (or some subset).
The other way is to create a new configuration. In Solution Explorer, rightclick the root node -> Configuration Manager. In addition to standard configs like "debug" or "release" you can create your own custom ones. For each combination of config + platform, you can use the checkboxes below to define which projects will be built and what settings they'll use.
Whatever you choose, you'd edit your TFSBuild.proj file to point to the desired solution and/or configuration. MSDN instructions: http://msdn.microsoft.com/en-us/library/bb399127.aspx
Once you create your build it will make a TFSBuild.proj file in source control (you can right click on the build in Team Explorer and select Configuration Folder to find it.
Open this file and find the tag that has "SolutionToBuild". That tag has sub tags for specifying targets. I think if you enter the projects you want to build in there (semicolon delimited) then it will just build those.
If you have not made your build yet then (as John Saunders said) you can specify the projects in the setup of the build. (After you have set it up you cannot do that again.