Controlling Visual Studio .NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
how is it possible to create a project with a specific template, compile it
and close it? All with a c# script.

Thanks,
Daniele
 
Why use Visual Studio for that? Just create the .cs files, the .prj file,
and the config file, and compile using the command line compiler...

Does that help?
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
This is the situation:

I've an external application written in C# that have to create and compile
MANY OTHERS (about 120!!!) VS Project based on a Custom Template. How do that
whitout user interaction?
 
let me see if I understand.

You are using a common template to create 120+ assemblies.

Your app is asked to begin, and must create and compile these assemblies,
resulting in DLLs.

You can do all of this with the command line. Visual Studio is an IDE. It
doesn't compile anything. It simply calls the compiler. The compiler is
free (comes with the framework).

NAnt can compile 100 projects at once, and it doesn't use Visual Studio at
all.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Ok but I don't know how create a new project with a specific template with
the command line.

What are the exe and the option for create and compile a project with a
specific template?
 
Hello Daniele,

The templates available in VS.Net are useful for generating only the barest
skeleton of an application. From what I'm understanding, you are doing a
lot more than that. Am I wrong?

I am not wondering about the reason for creating an app from a template...
I've heard of that many times. Usually, I've heard of folks using XML and
XSLT for this, not VS templates, but the concept is the same.

I am wondering why you'd use Visual Studio templates to do it? Since VS
templates are SO light, you can just as easily create the files for a
project yourself and write them to a hard drive. You can even use the
template files you created for VS if that would make your life easier.

Your project would need the ability to create a .csproj file, which is
something the VS environment gives you right now. It isn't clear from your
messages if you'd need to create a solution file, but the compiler doesn't
need it. The csproj format is fairly simple and human readable, so it
wouldn't take much effort to make a .csproj template that would do the trick
for you. Just look at the csproj files you have and (dare I say it) reverse
engineer.

What I'm getting at: I don't believe you can drive VS from the command line.
I'm wondering why you'd want to drive VS from the command line when you are
already doing 90% of the work yourself?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top