Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi!

 

I need to know how do I create a .net Solution outside the Visual Studio Environment.

 

Want to be able to create the whole thing:

- Create the Solution

- Create Projects and add them to the Solution

- Add *.cs files to the projects

- Add references to the projects

 

the whole pack... :)

 

Thanks!

Alex :p

Software bugs are impossible to detect by anybody except the end user.
Posted

For what you're trying to do you really do not need solution files (.sln) as they are a Visual Studio specific thing.

 

.csproj files however are just XML documents. Open one up in notepad or something of the like and you can easily infer the layout and how to add files, references, etc programmatically. Just load the .csproj file into an XmlDocument instance and you can add new nodes, etc. With .NET 2.0 you can use MSBuild to programmatically compile projects. You do this by calling particular targets in the .csproj file via a command line switch. It is really pretty easy. There are also several managed namespaces for accessing various parts of MSBuild. Have a look around for MSBuild and you will find numerous examples.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...