Nuget / MSBuild: Build for Multiple Third-Party DLL Versions

The scenario is as follows: I have several versions of third-party DLLs (in particular, every year when a third-party product is released). I need to be able to create several different versions of these DLLs to deploy different versions of the application.

I found that I can achieve this using MS-Build as follows:

<ItemGroup Condition=" '$(Configuration)' == '2009 Release' ">
  <Reference Include="thirdPartyLib">
   <SpecificVersion>False</SpecificVersion>
   <HintPath>..\lib_2009\thirdPartyLib.dll</HintPath>
   <Private>True</Private>
  </Reference>
</ItemGroup>
<ItemGroup Condition=" '$(Configuration)' == '2010 Release' ">
  <Reference Include="thirdPartyLib">
   <SpecificVersion>False</SpecificVersion>
     <HintPath>..\lib_2010\thirdPartyLib.dll</HintPath>
   <Private>True</Private>
  </Reference>
</ItemGroup>

However, I thought it was also worth checking if there was an easy way to handle this scenario with Nu-Get. Any thoughts on this with Nu-Get or MS-Build or even Powershell will be appreciated.

+3
source share
1 answer

I don't think this is possible, but I found this post on discussion forums:

http://nuget.codeplex.com/discussions/253168

- , debug/release. , -, , .

+1

All Articles