Skip to content

Commit c5cd879

Browse files
committed
set no build for NUKE project
1 parent 4d80bce commit c5cd879

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<Solution>
22
<Project Path="TestProject1/TestProject1.csproj" />
3-
<Project Path="RELATIVE" />
3+
<Project Path="RELATIVE">
4+
<Build Project="false" />
5+
</Project>
46
</Solution>

source/Nuke.GlobalTool.Tests/UpdateSolutionFileContentTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public Task Test(int number, string input, string expected)
155155
"""
156156
<Solution>
157157
<Project Path="TestProject1/TestProject1.csproj" />
158-
<Project Path="RELATIVE" />
158+
<Project Path="RELATIVE">
159+
<Build Project="false" />
160+
</Project>
159161
</Solution>
160162
""")]
161163
public Task TestXml(int number, string input, string expected)

source/Nuke.GlobalTool/Program.Setup.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ internal static void UpdateSolutionXmlFileContent(XDocument content, string buil
213213
return;
214214
}
215215

216-
solutionElement.Add(new XElement("Project", new XAttribute("Path", path)));
216+
var projectElement = new XElement("Project", new XAttribute("Path", path));
217+
projectElement.Add(new XElement("Build", new XAttribute("Project", value: false)));
218+
solutionElement.Add(projectElement);
217219
}
218220

219221
private static string[] GetTemplate(string templateName)

0 commit comments

Comments
 (0)