Groups | Blog | Home
all groups > c# > january 2005 >

c# : Creating a solution dynamically



udi.ben-senior NO[at]SPAM intel.com
1/25/2005 11:29:14 PM
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.
Dmitriy Lapshin [C# / .NET MVP]
1/26/2005 2:22:17 PM
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!

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

[quoted text, click to view]
AddThis Social Bookmark Button