コード例 #1
0
            /// <summary>
            /// Generate the command line arguments to be passed to devenv
            /// <para></para>
            /// If the user hasn't specified an output FileName we will generate a log
            /// file name with the project name (using the appropriate configuration/platform settings)
            /// and store it on the logs folder in the drops directory
            /// </summary>
            /// <param name="context">Activity context</param>
            /// <returns>The command line arguments</returns>
            private string GenerateCommandLineCommands(ActivityContext context)
            {
                var config = this.Configuration.Get(context);

                if (!string.IsNullOrEmpty(this.Platform.Get(context)))
                {
                    config += "|" + this.Platform.Get(context);
                }

                var cmd = new StringBuilder();

                cmd.AppendFormat(
                    "\"{0}\" {1} \"{2}\" /Out \"{3}\" ",
                    this.FilePath.Get(context),
                    VSDevEnv.GetActionCommandLineOption(this.Action.Get(context)),
                    config,
                    this.OutputFile.Get(context));

                if (!string.IsNullOrEmpty(this.ProjectPath.Get(context)))
                {
                    cmd.AppendFormat("/Project \"{0}\" ", this.ProjectPath.Get(context));

                    if (!string.IsNullOrEmpty(this.ProjectConfiguration.Get(context)))
                    {
                        cmd.AppendFormat("/ProjectConfig \"{0}\" ", this.ProjectConfiguration.Get(context));
                    }
                }

                return(cmd.ToString());
            }
コード例 #2
0
        public void DevEnvNoPlatformTest()
        {
            // Initialise Instance
            var target = new TfsBuildExtensions.Activities.VisualStudio.VSDevEnv { Action = VSDevEnvAction.Rebuild, Configuration = "Debug", FilePath = @"C:\Users\Michael\Documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1.sln", OutputFile=@"D:\a\log.txt", Platform = "AnyCPU"};

            // Create a WorkflowInvoker and add the IBuildDetail Extension
            WorkflowInvoker invoker = new WorkflowInvoker(target);
            var actual = invoker.Invoke();

            // note no result here... this test s for manual testing purposes
        }
コード例 #3
0
ファイル: VSDevEnv.cs プロジェクト: vidyabs/CustomActivities
        public void DevEnvNoPlatformTest()
        {
            // Initialise Instance
            var target = new TfsBuildExtensions.Activities.VisualStudio.VSDevEnv {
                Action = VSDevEnvAction.Rebuild, Configuration = "Debug", FilePath = @"C:\Users\Michael\Documents\visual studio 2012\Projects\ConsoleApplication1\ConsoleApplication1.sln", OutputFile = @"D:\a\log.txt", Platform = "AnyCPU"
            };

            // Create a WorkflowInvoker and add the IBuildDetail Extension
            WorkflowInvoker invoker = new WorkflowInvoker(target);
            var             actual  = invoker.Invoke();

            // note no result here... this test s for manual testing purposes
        }