Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

C# Makefile

In VisualStudio 6.0, there's an Export Makefile menu item
that creates a makefile for the project. Is there any way to achieve this in VS.Net 2003? Basically, I need a command-line build script for my project and was wondering if there's
an automated way to generate it for an existing VS.Net project.

Thanks,

- Mike.

Mike
Friday, April 30, 2004

Sorry, no. It's a hugely frustrating limitation in VS.NET (2002 and 2003), but at least it's supposedly fixed in the upcoming Whidbey release.

Sexist
Friday, April 30, 2004

Use NAnt and the <solution> task.

Brad Wilson (dotnetguy.techieswithcats.com)
Friday, April 30, 2004

Although that's a really annoying solution because you have to rewrite the NAnt XML everytime you add/remove files to your VS.NET project. Keeping your project and your NAnt files in synch is a headache. There is a program called Slingshot which attempts to do the conversion for you, but based on (my admittedly limited) tests, it doesn't work on anything much more complicated than "Hello World".
  Do a search on MSDN for a program called BuiltIt. It's a free 3rd party tool that automatically builds your program directly from the solution file. But it has some severe limitations, too.

Sexist
Saturday, May 01, 2004

Thanks everybody for the input, albeit not very optimistic.
Well, if that's the case, let me give you some background.
My C# project calls a Web service; when I added a Web reference, a cs file got created containing the wrapper class whose method I call.  The project compiles and the resulting DLL works just fine. However, when I build it via a command-line script, it looks as if the web service piece doesn't quite get done; the project compiles all
right but gives me a file not found error at runtime when
the web service call code is executed. So, I was wondering that perhaps there's something in the command-line build process that I am missing. I am only including the wrapper cs file into the command line script; do I perhaps need the WSDL file or the reference map file?

This is why I thought if I could have the script automatically generated for me, I'd see what I am missing.

Any ideas would be greatly appreciated...

Mike
Saturday, May 01, 2004

"Although that's a really annoying solution because you have to rewrite the NAnt XML everytime you add/remove files to your VS.NET project."

How so? The <solution> target should automatically grab all current files, and if you're compiling manually (like I do currently) you can simply include *.cs in the project directory and its subdirectories. That should work fine, unless your project setup is completely crazy.

Chris Nahr
Saturday, May 01, 2004

"Although that's a really annoying solution because you have to rewrite the NAnt XML everytime you add/remove files to your VS.NET project."

I suggest you actually read about and/or use the <solution> task, since you clearly have no idea what it does.

http://nant.sourceforge.net/help/tasks/solution.html

Brad Wilson (dotnetguy.techieswithcats.com)
Saturday, May 01, 2004

*  Recent Topics

*  Fog Creek Home