Skip to content

Commit

Permalink
chore: Keep version in resulting dll
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelbu authored Jan 27, 2024
1 parent b0655fe commit c060984
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ Task("Build")
NoRestore = true,
MSBuildSettings = new DotNetMSBuildSettings
{
Version = packageVersion
Version = packageVersion,
FileVersion = packageVersion,
}
});
});
Expand All @@ -154,15 +155,23 @@ Task("Test")
Configuration = configuration,
Loggers = new string[] { "trx" },
VSTestReportPath = "TestResult-NUnit3.xml",
MSBuildSettings = new DotNetMSBuildSettings().WithProperty("NUnitVersion", "3")
MSBuildSettings = new DotNetMSBuildSettings
{
Version = packageVersion,
FileVersion = packageVersion,
}.WithProperty("NUnitVersion", "3")
});
Information("Testing against NUnit 4.xx");
DotNetTest(TEST_PROJECT, new DotNetTestSettings
{
Configuration = configuration,
Loggers = new string[] { "trx" },
VSTestReportPath = "TestResult-NUnit4.xml",
MSBuildSettings = new DotNetMSBuildSettings().WithProperty("NUnitVersion", "4")
MSBuildSettings = new DotNetMSBuildSettings
{
Version = packageVersion,
FileVersion = packageVersion,
}.WithProperty("NUnitVersion", "4")
});
})
.Finally(() =>
Expand Down Expand Up @@ -190,7 +199,8 @@ Task("Pack")
Properties = new Dictionary<string, string>()
{
{"Configuration", configuration},
{"TargetFramework", targetFramework }
{"TargetFramework", targetFramework },
{ "NoBuild", "true" }
}
});
});
Expand Down

0 comments on commit c060984

Please sign in to comment.