From 833890438f42784134b6af22e6074d9a1bc9ca8d Mon Sep 17 00:00:00 2001 From: Harald Wolff Date: Wed, 9 Dec 2020 17:16:22 +0100 Subject: [PATCH] Ignore .csproj when no version set --- ln.build/pipeline/DotNetCommands.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ln.build/pipeline/DotNetCommands.cs b/ln.build/pipeline/DotNetCommands.cs index 5970959..dbd19e0 100644 --- a/ln.build/pipeline/DotNetCommands.cs +++ b/ln.build/pipeline/DotNetCommands.cs @@ -40,7 +40,6 @@ namespace ln.build.commands foreach (string projectFileName in projectFiles) { - stage.PipeLine.CommandEnvironment.Extend("DOTNET_PROJECTS", projectFileName); CSProjHelper csp = new CSProjHelper(projectFileName); string projectName = csp.GetName(); @@ -49,8 +48,13 @@ namespace ln.build.commands stage.CommandEnvironment.Logger.Log(LogLevel.INFO, "dotnet prepare: project {0} version={1} type={2}", projectName, projectVersion, ot); + if (projectVersion == null) + continue; + if (projectVersion > highestVersion) highestVersion = projectVersion; + + stage.PipeLine.CommandEnvironment.Extend("DOTNET_PROJECTS", projectFileName); } stage.PipeLine.CommandEnvironment.Set("RELEASE_VERSION", highestVersion.ToString());