コード例 #1
0
        public void TestWebBuild()
        {
            var setting = new CompileSetting
            {
                BuildConfiguration = "Release",
                IsWeb = true,
                ProjectPath = ProjectPath,
                OutputDirectory = "PublishFolder/Web"
            };

            var target = new MsBuildCommand(setting);
            var executeSetting = new ExecuteSetting("./");
            var arguments = target.BuildArguments(executeSetting);
            var expected = "\"" + ProjectPath +
                           @""" /p:Configuration=Release;WebProjectOutputDir=""./PublishFolder/Web"" /t:_CopyWebApplication;_WPPCopyWebApplication;TransformWebConfig";
            Assert.AreEqual(expected, arguments);
        }
コード例 #2
0
        public void WebBuild_Release()
        {
            var webFolder = Path.Combine(Environment.CurrentDirectory, "PublishFolder", "web");
            var setting = new CompileSetting
            {
                BuildConfiguration = "Release",
                IsWeb = true,
                ProjectPath = ProjectPath,
                BuildLogFile = false
                //OutputDirectory = "PublishFolder/Web"
            };

            var msbuild = new MsBuildCommand(setting);
            var executeSetting = new ExecuteSetting("./");
            var arguments = msbuild.BuildArguments(executeSetting);

            Assert.AreEqual(
                @"""" + ProjectPath + @""" /p:Configuration=Release /t:_CopyWebApplication;_WPPCopyWebApplication;TransformWebConfig",
                arguments);
        }