Is there any way to write a Visual Studio Project file easy or do i have to look at the xml format and write it by hand? Is there any lib for this in .net framework(3.5)?
Im using vb.net but c# would also work..
Is there any way to write a Visual Studio Project file easy or do i have to look at the xml format and write it by hand? Is there any lib for this in .net framework(3.5)?
Im using vb.net but c# would also work..
There is no support for this in the framework. The Visual Studio project file format is specific to Visual Studio. There may be support in the MSBuild libraries but you would need to include them as a reference and interact with it that way. What are you trying to do that requires you to create a VS project file?
The link provided here should give you what you need.
Visual Studio since version 2005 uses the MSBuild format to store C# and VB project files.
You could read this primer http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=472 or search the Web for further examples.
For programmatic access you could use the classes in the Microsoft.Build.BuildEngine
namespace. Probably the Project
class is of most interest to you.
I haven't tried this myself but you might want to look at http://msdn.microsoft.com/en-us/library/microsoft.build.buildengine.project.aspx
We do it from a couple of in-house tools. The project files for Visual Studio are stored as XML, so you can just use whatever XML classes you prefer. Make sure you pay attention to GUIDs as they are used to tie everything together between the various files in Visual Studio.