コード例 #1
0
        public BuildTargetResponse BuildCommand(BuildTargetRequest req)
        {
            var command = Executable.ApplyPathReplacementsForClient() + " " + BuildArguments(false); 
            var file = _solution.FileName;
            var addConfiguration = true;

            if (!string.IsNullOrEmpty(req.Project))
            {
                var prj = _solution.Projects.FirstOrDefault(x => x.Title == req.Project);
                if (prj == null)
                {
                    _logger.Error("Could not find project with name " + req.Project + ". Falling back to building solution");
                }
                else
                {
                    _logger.Debug("Adding project " + prj.FileName + " to build command");
                    file = prj.FileName;
                    // Specifying a specific configuration will cause issues when dependent projects do not have the same configuration (Debug\Release) as the target project
                    addConfiguration = false;
                }
            }

            command += " \"" + file + "\" /target:" + req.Type;

            if(addConfiguration)
            {
                command += " /p:Configuration=" + req.Configuration;
            }



            var response = new BuildTargetResponse { Command = command };
            return response;
        }
コード例 #2
0
        public BuildTargetResponse BuildCommand(BuildTargetRequest req)
        {
            var command          = Executable.ApplyPathReplacementsForClient() + " " + BuildArguments(false);
            var file             = _solution.FileName;
            var addConfiguration = true;

            if (!string.IsNullOrEmpty(req.Project))
            {
                var prj = _solution.Projects.FirstOrDefault(x => x.Title == req.Project);
                if (prj == null)
                {
                    _logger.Error("Could not find project with name " + req.Project + ". Falling back to building solution");
                }
                else
                {
                    _logger.Debug("Adding project " + prj.FileName + " to build command");
                    file = prj.FileName;
                    // Specifying a specific configuration will cause issues when dependent projects do not have the same configuration (Debug\Release) as the target project
                    addConfiguration = false;
                }
            }

            command += " \"" + file + "\" /target:" + req.Type;

            if (addConfiguration)
            {
                command += " /p:Configuration=" + req.Configuration;
            }



            var response = new BuildTargetResponse {
                Command = command
            };

            return(response);
        }
コード例 #3
0
 public BuildTargetResponse BuildCommand(BuildTargetRequest req)
 {
     return new BuildTargetResponse { Command = this.Executable.ApplyPathReplacementsForClient() + " " + this.Arguments + " /target:" + req.Type.ToString() + " " + "/p:Configuration=" + req.Configuration.ToString() };
 }
コード例 #4
0
 public BuildTargetResponse BuildCommand(BuildTargetRequest req)
 {
     return(new BuildTargetResponse {
         Command = this.Executable.ApplyPathReplacementsForClient() + " " + this.Arguments + " /target:" + req.Type.ToString()
     });
 }