问题 I am attempting to generate a .csproj file programatically using the MSBuild namespace, but the lack of code samples is making this a tedious and error prone process. So far, I have got the following code but I am not sure how to add classes, references and such to the project. public void Build() { string projectFile = string.Format(@"{0}\{1}.csproj", Common.GetApplicationDataFolder(), _project.Target.AssemblyName); Microsoft.Build.Evaluation.Project p = new Microsoft.Build.Evaluation