Azure-pipelines-tasks: Build only ONE Project (with dependencies) in a Solution

Created on 13 Dec 2017  Â·  6Comments  Â·  Source: microsoft/azure-pipelines-tasks

I have a solution with 80 projects. Point to the solution and it will build them all....so far so good.

But one project is a WebApp and needs to end up in a _PublishedWebSites ("p:outdir=...").

If I pass that MsBuild parameter at the Solution level, all of the others are "merged" rather than properly in their own bin...

So my thought was to pass the .csproj directly.... But it will not build as it has ProjectDependencies

Thus the only approach I see is being able to specify what target project to build..... and that I can not find.

Most helpful comment

Hi,

@DynConcepts how did you solve this situation? Do you have any link to provide?

Thanks,

All 6 comments

This sounds like an MSBuild question, not a VSTS tasks issue. I suggest you ask this question on Stack Overflow or a similar forum.

If you can run an MSBuild command line locally that does what you want and for some reason it doesn't work on TFS / VSTS, then it is a VSTS problem.

Very much depends on perspective. The name of the task is "Visual Studio Build" as a result, the expectation is to do the same operations that can be done from within Visual Studio.

Technically ALL of the builds are MsBuild as that is the underlying platform and using the general MsBuild task makes sense for things that cannot be done within Visual Studio.

Anything you want to automate via CI needs to be able to run via the command line which is msbuild. It's called VS build because it finds the correct msbuild to invoke in context of the visual studio version you select.

[Privately]

Brian,

If all it did was find the correct msBuild, then that would be one thing…

But that is not all it does. It takes a Solution, Configuration, Platform, The Ability to Clean……

What it does not support is picking a project within the solution.

So the only way (that I can think of) to use the MsBuild task is to re-engineer all of the capabilities of the VS Build task,,, then add….

This means that something developers do on a regular basis, and want to replicate in a simple [i.e. use the default Build Definition Template] manner is completely out of their reach.

David

From: Bryan MacFarlane [mailto:[email protected]]
Sent: Thursday, December 14, 2017 4:57 PM
To: Microsoft/vsts-tasks vsts-tasks@noreply.github.com
Cc: David V. Corbin david.corbin@dynconcepts.com; Author author@noreply.github.com
Subject: Re: [Microsoft/vsts-tasks] Build only ONE Project (with dependencies) in a Solution (#6036)

Anything you want to automate via CI needs to be able to run via the command line which is msbuild. It's called VS build because it finds the correct msbuild to invoke in context of the visual studio version you select.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vsts-tasks/issues/6036#issuecomment-351848159, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJgg4ciUdnYyCxWbubfqFV2qmlEnoMxTks5tAZmegaJpZM4RAZeh.

Hi,

@DynConcepts how did you solve this situation? Do you have any link to provide?

Thanks,

Yes, please... ¿Any help for this?

I think if VSTS has a user interface for other commands, why not for the MSBUILD options like build only a project?

Was this page helpful?
0 / 5 - 0 ratings