Skip to content

Commit

Permalink
Merge pull request #680 from nunit/chore/keep-version-information
Browse files Browse the repository at this point in the history
chore: Keep version in resulting dll
  • Loading branch information
mikkelbu authored Jan 27, 2024
2 parents b0655fe + c060984 commit 87e452f
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 87e452f

Please sign in to comment.