Accessing Projects via DTE in C# T4 Template

前端 未结 2 934
既然无缘
既然无缘 2020-12-09 20:42

I\'m currently trying to iterate over all of my projects (sharepoint) to get all feature guids into an file. there i want to prefix them with the projects name. My problem i

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 21:29

    Try this

            var item = dte.Solution.Projects.GetEnumerator();
            while (item.MoveNext())
            {
                var project = item.Current as EnvDTE.Project;
                if (project == null)
                {
                    continue;
                }
                ...
            }
    

提交回复
热议问题