virtualx-engine/modules/mono/editor/GodotSharpTools/Project/ProjectUtils.cs
Ignacio Etcheverry e36fb95c50 Added mono module
2017-10-03 00:01:26 +02:00

17 lines
521 B
C#

using System;
using System.IO;
using Microsoft.Build.Construction;
namespace GodotSharpTools.Project
{
public static class ProjectUtils
{
public static void AddItemToProjectChecked(string projectPath, string itemType, string include)
{
var dir = Directory.GetParent(projectPath).FullName;
var root = ProjectRootElement.Open(projectPath);
root.AddItemChecked(itemType, include.RelativeToPath(dir).Replace("/", "\\"));
root.Save();
}
}
}