Ejemplo n.º 1
0
        private void ParseTargets(Project project)
        {
            foreach (Target mstarget in project.Targets)
            {
                if (!mstarget.IsImported || _defaultTargets.Contains(mstarget.Name))
                {
                    MSBuildTarget target = new MSBuildTarget(mstarget.Name);
                    target.Condition = mstarget.Condition;
                    target.Depends   = mstarget.DependsOnTargets.Replace(" ", "").Split(';');

                    if (_defaultTargets.Contains(target.Name))
                    {
                        target.Default = true;
                    }

                    if (_initialTargets.Contains(target.Name))
                    {
                        target.Initial = true;
                    }

                    Targets.Add(target);
                }
            }

            //Targets.Sort();
        }
Ejemplo n.º 2
0
        private void ParseTargets()
        {
            foreach (ProjectTargetInstance mstarget in _projectInstance.Targets.Values)
            {
                // TODO: Figure out how to eliminate imported targets
                //if (!mstarget.IsImported || _defaultTargets.Contains(mstarget.Name))
                //{
                    MSBuildTarget target = new MSBuildTarget(mstarget.Name);
                    target.Condition = mstarget.Condition;
                    target.Depends = mstarget.DependsOnTargets.Replace(" ", "").Split(';');

                    if (_defaultTargets.Contains(target.Name))
                        target.Default = true;

                    if (_initialTargets.Contains(target.Name))
                        target.Initial = true;

                    Targets.Add(target);
                //}
            }
        }