Nuget / MSBuild : Build for multiple 3rd Party DLL versions
The scenario is as follows: I have multiple versions of 3rd party DLLs (specifically one for each year that the third party product is released). I need to be able to build for multiple different versions of these DLLs in order to deploy different versions of the application.
I found that I can achieve this using MS-Build like so:
<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 while checking whether there was an easy way to handle this kind of scenario using Nu-Get. Any thoughts on doing this with Nu-Get or MS-Build or even Powershell would be appreciated.
I don't think this is possible, but I did find this post in the discussion forums:
http://nuget.codeplex.com/discussions/253168
It seems like a reasonable request - certainly having debug/release versions. Might be worth adding to that post, or creating a request in the issue tracker to see if the team will consider providing support for this.
精彩评论