Skip to content

Commit 6f8d29f

Browse files
Merge pull request #4151 from CommunityToolkit/anyCpuBuilds
Forced AnyCPU on builds.
2 parents 0f744f8 + 3a59da0 commit 6f8d29f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

build/build.cake

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ Task("BuildProjects")
150150
Information("\nBuilding Solution");
151151
var buildSettings = new MSBuildSettings
152152
{
153-
MaxCpuCount = 0
153+
MaxCpuCount = 0,
154+
PlatformTarget = PlatformTarget.MSIL
154155
}
155156
.SetConfiguration(configuration)
156157
.WithTarget("Restore");
@@ -162,7 +163,8 @@ Task("BuildProjects")
162163
// Build once with normal dependency ordering
163164
buildSettings = new MSBuildSettings
164165
{
165-
MaxCpuCount = 0
166+
MaxCpuCount = 0,
167+
PlatformTarget = PlatformTarget.MSIL
166168
}
167169
.SetConfiguration(configuration)
168170
.WithTarget("Build")
@@ -214,7 +216,8 @@ Task("Package")
214216
// Invoke the pack target in the end
215217
var buildSettings = new MSBuildSettings
216218
{
217-
MaxCpuCount = 0
219+
MaxCpuCount = 0,
220+
PlatformTarget = PlatformTarget.MSIL
218221
}
219222
.SetConfiguration(configuration)
220223
.WithTarget("Pack")
@@ -264,7 +267,7 @@ Task("Test")
264267
NoBuild = true,
265268
Loggers = new[] { "trx;LogFilePrefix=VsTestResults" },
266269
Verbosity = DotNetCoreVerbosity.Normal,
267-
ArgumentCustomization = arg => arg.Append($"-s {baseDir}/.runsettings"),
270+
ArgumentCustomization = arg => arg.Append($"-s {baseDir}/.runsettings /p:Platform=AnyCPU"),
268271
};
269272
DotNetCoreTest(file.FullPath, testSettings);
270273
}).DeferOnError();

0 commit comments

Comments
 (0)