Our team is trying to implement a master csv file for all the language translations we have to enable our systems team to maintain our resource files. I'm creating a dll that will be called before build to convert said csv file into their respective resx and designer files. I've got generating the resx files and designer files completed already but am struggling to add the new resx files that are generated to the resource project properly. I looked at this solution to add a file to the project but I can't add the dependencies right.
Here's the code I'm trying to use
var p =
Microsoft.Build.Evaluation
.ProjectCollection.GlobalProjectCollection
.LoadedProjects.FirstOrDefault(pr => pr.FullPath == projFilePath);
if (p == null)
p = new Microsoft.Build.Evaluation.Project(projFilePath);
p.AddItem("Folder", @"C:\projects\BabDb\test\test2");
p.AddItem("Compile", @"C:\projects\BabDb\test\test2\Class1.cs");
p.Save();