本文整理汇总了C#中Solution.Build方法的典型用法代码示例。如果您正苦于以下问题:C# Solution.Build方法的具体用法?C# Solution.Build怎么用?C# Solution.Build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solution
的用法示例。
在下文中一共展示了Solution.Build方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssertCleanBuild
static async Task AssertCleanBuild (Solution sol, string configuration)
{
BuildResult cr = await sol.Build (Util.GetMonitor (), configuration);
Assert.IsNotNull (cr);
Assert.AreEqual (0, cr.ErrorCount);
// Warning check disabled due to bug #15121
// Assert.AreEqual (0, cr.WarningCount);
}
示例2: CheckSolutionBuildClean
void CheckSolutionBuildClean (Solution sol, string configuration)
{
SolutionConfigurationSelector config = (SolutionConfigurationSelector) configuration;
string tag = "CheckSolutionBuildClean config=" + configuration;
DotNetProject lib1 = (DotNetProject) sol.FindProjectByName ("Lib1");
DotNetProject lib2 = (DotNetProject) sol.FindProjectByName ("Lib2");
DotNetProject lib3 = (DotNetProject) sol.FindProjectByName ("Lib3");
DotNetProject lib4 = (DotNetProject) sol.FindProjectByName ("Lib4");
Assert.IsFalse (File.Exists (lib1.GetOutputFileName (config)), tag);
Assert.IsFalse (File.Exists (lib2.GetOutputFileName (config)), tag);
Assert.IsFalse (File.Exists (lib3.GetOutputFileName (config)), tag);
Assert.IsFalse (File.Exists (lib4.GetOutputFileName (config)), tag);
BuildResult res = sol.Build (Util.GetMonitor (), config);
Assert.AreEqual (0, res.WarningCount, tag);
Assert.AreEqual (0, res.ErrorCount, tag);
Assert.IsTrue (File.Exists (lib1.GetOutputFileName (config)), tag);
Assert.IsTrue (File.Exists (lib2.GetOutputFileName (config)), tag);
Assert.IsTrue (File.Exists (lib3.GetOutputFileName (config)), tag);
Assert.IsTrue (File.Exists (lib4.GetOutputFileName (config)), tag);
sol.Clean (Util.GetMonitor (), config);
Assert.IsFalse (File.Exists (lib1.GetOutputFileName (config)), tag);
Assert.IsFalse (File.Exists (lib2.GetOutputFileName (config)), tag);
Assert.IsFalse (File.Exists (lib3.GetOutputFileName (config)), tag);
Assert.IsFalse (File.Exists (lib4.GetOutputFileName (config)), tag);
}
示例3: AssertCleanBuild
static void AssertCleanBuild (Solution sol, string configuration)
{
BuildResult cr = sol.Build (Util.GetMonitor (), configuration);
Assert.IsNotNull (cr);
Assert.AreEqual (0, cr.ErrorCount);
Assert.AreEqual (0, cr.WarningCount);
}