Пример #1
0
        public RepositoryProject(string repositoryRoot)
        {
            _doc = ProjectRootElement.Create(NewProjectFileOptions.None);
            var import    = _doc.CreateImportElement(@"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props");
            var propGroup = _doc.AddPropertyGroup();

            if (repositoryRoot[repositoryRoot.Length - 1] != '\\')
            {
                repositoryRoot += '\\';
            }
            propGroup.AddProperty("RepositoryRoot", repositoryRoot);
            _doc.AddItemGroup();
            _doc.PrependChild(import);
            _doc.AddImport(@"$(MSBuildToolsPath)\Microsoft.Common.targets");
        }