Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MsBuild

2 views
Skip to first unread message

shapper

unread,
Sep 12, 2008, 11:03:30 AM9/12/08
to
Hello,

I am working on an ASP.MET MVC Web Application with NET 3.5 in VS
2008.

I need to run some extra tasks on this project build so I download
MSBuild from http://msbuildtasks.tigris.org/.

I installed it but no new project type shows in my VS 2008.

I then found the following template:
http://blogs.conchango.com/stuartpreston/archive/2008/03/21/msbuild-p...

I am not sure if this is the right one ...

However, I don't know how to use it:

1. I don't know how to say to my "Build" project that the target
project is my MVC application

2. I am not sure how can I get the original XML file that builds my
MVC application.
I know that to add my extra tasks I should use this file ... I
think.

Anyway, could someone, please, help me out in making this work?

Thank You,
Miguel

sloan

unread,
Sep 12, 2008, 11:11:28 AM9/12/08
to

I have 2 files.

MSBuildit.bat

and

exclude.txt


Here are the contents:


MSBuildit.bat --<<do not include this line in the bat
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe" MySolution.sln
/p:Configuration=Release
XCOPY .\PresentationDirectoryHere\bin\Release\*.*
c:\wutemp\ReleaseBuild_MySolution /EXCLUDE:.\exclude.txt /e/s
End MSBuildit.bat --<<do not include this line in the bat


exclude.txt--<<do not include this line in the txt file
.pdb
MSBuildit.bat
exclude.txt
.sln
.vbproj
.csproj
.scc
.vssscc
.config
End exclude.txt--<<do not include this line in the txt file

That's one method. There are others.

Mine copies files to a temp directory, but with the exclude file, I filter
out the junk I don't want.
You might want to delete the .config (in the exclude .txt)

I put both files in the directory where MySolution.sln is.


..................

If you are asked about "Is this a file or directory", answer the questions.
Its the XCOPY working.


"shapper" <mdm...@gmail.com> wrote in message
news:342bbaf5-f5b3-400a...@8g2000hse.googlegroups.com...

shapper

unread,
Sep 12, 2008, 12:18:05 PM9/12/08
to
> "shapper" <mdmo...@gmail.com> wrote in message

>
> news:342bbaf5-f5b3-400a...@8g2000hse.googlegroups.com...
>
> > Hello,
>
> > I am working on an ASP.MET MVC Web Application with NET 3.5 in VS
> > 2008.
>
> > I need to run some extra tasks on this project build so I download
> > MSBuild fromhttp://msbuildtasks.tigris.org/.

>
> > I installed it but no new project type shows in my VS 2008.
>
> > I then found the following template:
> >http://blogs.conchango.com/stuartpreston/archive/2008/03/21/msbuild-p...
>
> > I am not sure if this is the right one ...
>
> > However, I don't know how to use it:
>
> > 1. I don't know how to say to my "Build" project that the target
> > project is my MVC application
>
> > 2. I am not sure how can I get the original XML file that builds my
> > MVC application.
> >    I know that to add my extra tasks I should use this file ... I
> > think.
>
> > Anyway, could someone, please, help me out in making this work?
>
> > Thank You,
> > Miguel

That's to simply or not? I was looking to use MsBuild Tasks (http://
msbuildtasks.tigris.org/)

I also have 2 custom tasks that I need to apply so I think I need to
create a XML file with all the details of the compilation ...

I downloaded MSBuildTasks and the template that I mentioned but I
still have the mentioned problems.

I can't just exclude some directories ... I need to merge files, run
custom tasks, exclude files and directories, etc

Thanks,
Miguel

sloan

unread,
Sep 12, 2008, 2:27:58 PM9/12/08
to
I'm not sure.
This seems like a really good tutorial site:
http://brennan.offwhite.net/blog/2006/11/30/7-steps-to-msbuild/


"shapper" <mdm...@gmail.com> wrote in message

news:989d0121-581d-4a08...@34g2000hsh.googlegroups.com...

shapper

unread,
Sep 12, 2008, 5:26:57 PM9/12/08
to
On Sep 12, 7:27 pm, "sloan" <sl...@ipass.net> wrote:
> I'm not sure.
> This seems like a really good tutorial site:http://brennan.offwhite.net/blog/2006/11/30/7-steps-to-msbuild/
>

I am trying to use this template ... it seems interesting. You create
a project in your solution where you define all the properties of the
build.

Then you just run it and it runs msbuild ...

Do you know how to reference in the XML file the path of the project
to be compiled?

And, a question a side, does anyone knows how to make the command
prompt in windows xp to not close after being used?!
I am trying to see what is being done but the command prompt window
closes to fast!

Thanks,
Miguel

sloan

unread,
Sep 12, 2008, 5:44:44 PM9/12/08
to
Go to Start Run
And then type in "cmd". Hit enter. You get a DOS window.
THen navigate and run the .bat manually.

That'll stop the "disappearing screen" as you try to debug the bat file.


"shapper" <mdm...@gmail.com> wrote in message

news:92e15c5d-5861-4021...@d77g2000hsb.googlegroups.com...

shapper

unread,
Sep 12, 2008, 5:50:00 PM9/12/08
to

Hello,

Does anyone knows how to indicate which project to be build by
MSBuild?

I have the following:

Build
|-----Build.proj
MyProject

Build is a project that when I run it in VS it calls MSBuild using
Build.proj as build information.

Build.proj is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="All">
<Import Project="..\properties\build.properties" />
<Import Project="$(MSBuildProjectDirectory)\properties
\build.properties" />
<PropertyGroup>
<BuildPath Condition="'$(BuildPath)'==''">..\Website
\Website.csproj</BuildPath>
<TasksPath Condition="'$(TasksPath)'==''">$(BuildPath)\Bin\Debug</
TasksPath>
</PropertyGroup>
<Target Name="All" DependsOnTargets="Build" />
<!-- add custom targets below -->
<Target Name="Build">
</Target>
</Project>

In this moment it is builing Build itself. I know that I need to
change something so that Build starts to call MSBuild to build
MyProject but I don't know what.

I tried everything I could think of but until now I wasn't able to
make this work.

Thanks,
Miguel

shapper

unread,
Sep 12, 2008, 6:19:40 PM9/12/08
to

Sloan,

I know but what I am trying to do is to change the Build.proj file to
start building my project ...

What would help me is to see the command window when I run Build which
seems impossible or to try to figure how to change the .proj XML file
to start building my project when I run the Build project.

Thanks,
Miguel

0 new messages