Project project = new Project(); project.AddNewImport("SomeImport.xml");
Project project = new Project(); string importPath = Path.Combine(Environment.CurrentDirectory, "MyImport.xml"); project.AddNewImport(importPath, false);In this example, we create a new `Project` instance and add a new import element that references a file named "MyImport.xml" located in the current directory. The second parameter specifies whether the import should be treated as optional. Package library: `Microsoft.Build.Utilities.Core`