Ejemplo n.º 1
0
        public async Task RunAsync(CancellationToken token)
        {
            Context.Output.WriteLine("Building Solution...", ConsoleColor.White);

            var msbuild = new MSBuildCommand(Context)
            {
                Exe = ".\\bin\\msbuild.cmd",
                WorkingDirectory = Context.ContentDirectory,
            };

            var buildArgs = new MSBuildArguments {
                ProjectFile = "Photon.Sample.sln",
                Targets     = { "Rebuild" },
                Properties  =
                {
                    ["Configuration"]       = "Debug",
                    ["Platform"]            = "Any CPU",
                    ["DeployOnBuild"]       = "True",
                    ["PublishUrl"]          = "Publish",
                    ["DeployDefaultTarget"] = "WebPublish",
                    ["DeleteExistingFiles"] = "True",
                    ["WebPublishMethod"]    = "FileSystem",
                },
                Logger =
                {
                    ConsoleLoggerParameters = MSBuildConsoleLoggerParameters.ErrorsOnly
                                              | MSBuildConsoleLoggerParameters.Summary,
                },
                Verbosity   = MSBuildVerbosityLevels.Minimal,
                MaxCpuCount = 0,
            };

            await msbuild.RunAsync(buildArgs, token);

            packageVersion = Context.BuildNumber.ToString();
            var packagePath = Path.Combine(Context.BinDirectory, "Packages");

            appPackages = new ApplicationPackageUtility(Context)
            {
                PackageDirectory = packagePath,
            };

            projectPackages = new ProjectPackageUtility(Context)
            {
                PackageDirectory = packagePath,
            };

            await Task.WhenAll(
                CreateProjectPackage(token),
                CreateWebApplicationPackage(token),
                CreateServiceApplicationPackage(token));

            using (var block = Context.Output.WriteBlock()) {
                block.Write("Build Number: ", ConsoleColor.DarkBlue);
                block.WriteLine(Context.BuildNumber, ConsoleColor.Blue);
            }
        }
Ejemplo n.º 2
0
        private async Task BuildSolution(CancellationToken token)
        {
            var msbuild = new MSBuildCommand(Context)
            {
                Exe = "msbuild",
                WorkingDirectory = Context.ContentDirectory,
            };

            var buildArgs = new MSBuildArguments {
                ProjectFile = "PiServerLite.sln",
                Properties  =
                {
                    ["Configuration"] = "Release",
                    ["Platform"]      = "Any CPU",
                },
                Verbosity = MSBuildVerbosityLevel.Minimal,
            };

            await msbuild.RunAsync(buildArgs, token);
        }
Ejemplo n.º 3
0
        private async Task BuildSolution(CancellationToken token)
        {
            var msbuild = new MSBuildCommand(Context)
            {
                Exe = "msbuild",
                WorkingDirectory = Context.ContentDirectory,
            };

            var buildArgs = new MSBuildArguments {
                ProjectFile = "Photon.sln",
                Targets     = { "Rebuild" },
                Properties  =
                {
                    ["Configuration"] = "Release",
                    ["Platform"]      = "Any CPU",
                },
                Verbosity   = MSBuildVerbosityLevels.Minimal,
                NodeReuse   = false,
                NoLogo      = true,
                MaxCpuCount = 0,
            };

            await msbuild.RunAsync(buildArgs, token);
        }