Skip to content

Commit c060984

Browse files
authored
chore: Keep version in resulting dll
1 parent b0655fe commit c060984

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

build.cake

+14-4
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ Task("Build")
135135
NoRestore = true,
136136
MSBuildSettings = new DotNetMSBuildSettings
137137
{
138-
Version = packageVersion
138+
Version = packageVersion,
139+
FileVersion = packageVersion,
139140
}
140141
});
141142
});
@@ -154,15 +155,23 @@ Task("Test")
154155
Configuration = configuration,
155156
Loggers = new string[] { "trx" },
156157
VSTestReportPath = "TestResult-NUnit3.xml",
157-
MSBuildSettings = new DotNetMSBuildSettings().WithProperty("NUnitVersion", "3")
158+
MSBuildSettings = new DotNetMSBuildSettings
159+
{
160+
Version = packageVersion,
161+
FileVersion = packageVersion,
162+
}.WithProperty("NUnitVersion", "3")
158163
});
159164
Information("Testing against NUnit 4.xx");
160165
DotNetTest(TEST_PROJECT, new DotNetTestSettings
161166
{
162167
Configuration = configuration,
163168
Loggers = new string[] { "trx" },
164169
VSTestReportPath = "TestResult-NUnit4.xml",
165-
MSBuildSettings = new DotNetMSBuildSettings().WithProperty("NUnitVersion", "4")
170+
MSBuildSettings = new DotNetMSBuildSettings
171+
{
172+
Version = packageVersion,
173+
FileVersion = packageVersion,
174+
}.WithProperty("NUnitVersion", "4")
166175
});
167176
})
168177
.Finally(() =>
@@ -190,7 +199,8 @@ Task("Pack")
190199
Properties = new Dictionary<string, string>()
191200
{
192201
{"Configuration", configuration},
193-
{"TargetFramework", targetFramework }
202+
{"TargetFramework", targetFramework },
203+
{ "NoBuild", "true" }
194204
}
195205
});
196206
});

0 commit comments

Comments
 (0)