Creating a solution dynamically

U

udi.ben-senior

Hi,
Does anyone know how do I create a .NET solution dynamically?
I have a csharp file I need to wrap in a solution and add some
references to it (- all done by another application at run time of
course).
I guess I need to use the visual studio classes.
Can someone drop me a lead on that issue?
Thanks!
Udi.
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi,

You should indeed use the DTE.Solution class for this purpose. This is a COM
class so you will need an interop assembly.
Once you've get hold of a reference to the Solution class, please refer to
MSDN documentation on Visual Studio extensibility (I remember there was a
dedicated section on manipulating projects and solutions).

Please feel free to follow up with further questions!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top