Question

I'm currently working on an application that will generate actual .cs and .xaml code files and add them to a project. I've managed to do this by manually editing an existing .csproj file and thats working well.

However I would like to be able to create the project files from my application as well, to cut out the extra step of creating the project first then running the application after.

Does anyone know how to create a C# project (class library, or WPF Application) from an application? I've looked into DTE, but I've hit a wall

Was it helpful?

Solution

I can't give a complete answer, but maybe I can point you in the right direction.

One avenue to explore in your own searching is MSBuild. C# and VB.net project files follow the msbuild format, and so the first step in building a valid project file is building a valid msbuild file.

Also, it sounds like you're doing something a little different, but have you looked at the T4 system for code generation?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top