5

I have access to a nugget repository that has two different versions of a package, one 32bit and one 64bit.

My dev machine at work is 32 bit whereas the build server builds the solution in 64bit mode. Currently I'm controlling the build process with ItemGroup conditions, something a bit like this:

<ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">

It it possible to configure nuget to bind to one package when building in 32bit mode and the other in 64bit mode? Or am I stuck with manually editing the *proj files?

4

1 回答 1

0

恐怕MSBuild是现在要走的路。根据配置/平台条件,您可以在还原发生之前在预构建步骤中包含不同的 packages.config 文件,或转换 packages.config 文件的内容(使用占位符或其他东西)。

这让我觉得您甚至可以使用SlowCheetah在 packages.config 文件上应用这种 XML 转换?

于 2012-09-10T20:05:37.327 回答