468,765 Members | 1,119 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

MSBuild : Building a project without building it's dependencies

Hi,
I'm facing a problem while building a project through MSBuild, this
project is a part of a solution which has several other projects on
which it depends, but I want to build this project without building
it's dependencies.
We can do this for a solution by unselecting projects through
Configuration Manager under solution properties, but how to achive
same for a project!
Dec 5 '07 #1
4 3118
Instead of running MSBUILD on the solution file, have you tried to run
it on just the project file?

Or, you can still run it on the solution file, and target just one
specific project in the solution using the /t switch.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ra*************@gmail.comwrote in message
news:be**********************************@s8g2000p rg.googlegroups.com...
Hi,
I'm facing a problem while building a project through MSBuild, this
project is a part of a solution which has several other projects on
which it depends, but I want to build this project without building
it's dependencies.
We can do this for a solution by unselecting projects through
Configuration Manager under solution properties, but how to achive
same for a project!

Dec 5 '07 #2
Hi Nicholas,
The problem is that we are migrating from .NET 1.1 to .NET 2.0, and we
used NAnt to build our solutions, using <solutiontag like this,
<solution configuration="${project.config}" failonerror="true"
outputdir="${output.dir}">
<projects>
<include name="myproject.csproj" /
>
...........

but because of change in the project structure of VS .NET 2005, which
is MSBuild compliant, our previous build file fails to build.
After some diagnosis, we found that we need to invoke MSBuild using
<exectag like this
<exec program="MSBuild" commandline="myproject.vcproj /
property:Configuration=${project.config};OutputPat h=${path::get-full-
path(output.dir)}" verbose="false"/>

now the problem is ........
when I execute this script, it rebuilds it's dependent projects as
well, which I don't want to do!

I hope this explanation would be useful to you!

Thanks in advance!

Cheers,
Ram
On Dec 5, 9:32 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
Instead of runningMSBUILDon the solution file, have you tried to run
it on just the project file?

Or, you can still run it on the solution file, and target just one
specific project in the solution using the /t switch.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<ramshankarya...@gmail.comwrote in message

news:be**********************************@s8g2000p rg.googlegroups.com...
Hi,
I'm facing a problem while building a project throughMSBuild, this
project is a part of a solution which has several other projects on
which it depends, but I want to build this project without building
it's dependencies.
We can do this for a solution by unselecting projects through
Configuration Manager under solution properties, but how to achive
same for a project!- Hide quoted text -

- Show quoted text -
Dec 6 '07 #3
Well, why use NANT still and why not use MSBuild directly?

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<ra*************@gmail.comwrote in message
news:31**********************************@s36g2000 prg.googlegroups.com...
Hi Nicholas,
The problem is that we are migrating from .NET 1.1 to .NET 2.0, and we
used NAnt to build our solutions, using <solutiontag like this,
<solution configuration="${project.config}" failonerror="true"
outputdir="${output.dir}">
<projects>
<include name="myproject.csproj" /
>>
..........

but because of change in the project structure of VS .NET 2005, which
is MSBuild compliant, our previous build file fails to build.
After some diagnosis, we found that we need to invoke MSBuild using
<exectag like this
<exec program="MSBuild" commandline="myproject.vcproj /
property:Configuration=${project.config};OutputPat h=${path::get-full-
path(output.dir)}" verbose="false"/>

now the problem is ........
when I execute this script, it rebuilds it's dependent projects as
well, which I don't want to do!

I hope this explanation would be useful to you!

Thanks in advance!

Cheers,
Ram
On Dec 5, 9:32 pm, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
> Instead of runningMSBUILDon the solution file, have you tried to run
it on just the project file?

Or, you can still run it on the solution file, and target just one
specific project in the solution using the /t switch.

--
- Nicholas Paldino [.NET/C# MVP]
- m...@spam.guard.caspershouse.com

<ramshankarya...@gmail.comwrote in message

news:be**********************************@s8g2000 prg.googlegroups.com...
Hi,
I'm facing a problem while building a project throughMSBuild, this
project is a part of a solution which has several other projects on
which it depends, but I want to build this project without building
it's dependencies.
We can do this for a solution by unselecting projects through
Configuration Manager under solution properties, but how to achive
same for a project!- Hide quoted text -

- Show quoted text -

Dec 6 '07 #4
Nicholas Paldino [.NET/C# MVP] wrote:
Well, why use NANT still and why not use MSBuild directly?
Maybe he likes NAnt.

I assume that NAnt still has way more tasks than MSBuild.

Arne
Dec 8 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Uma Abhyankar | last post: by
5 posts views Thread by Al | last post: by
reply views Thread by luvic.vangool | last post: by
7 posts views Thread by shapper | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.