Our nupkg packages contain several versions of the same DLL (x86, x64, AnyCPU) and in csproj files. In links, I use conditional links to select a specific dll depending on the current platform set. As a result, I have several links to the same library (only different platform compilation).
here is a snippet of my csproj file:
<Reference Include="xxxx" Condition="'$(Platform)'=='x86'"> <HintPath>..\..\packages\xxxx.2.7.0.1093\lib\net45\x86\xxxx.dll</HintPath> </Reference> <Reference Include="xxxx" Condition="'$(Platform)'=='x64'"> <HintPath>..\..\packages\xxxx.2.7.0.1093\lib\net45\x64\xxxx.dll</HintPath> </Reference> <Reference Include="xxxx" Condition="'$(Platform)'=='AnyCPU'"> <HintPath>..\..\packages\xxxx.2.7.0.1093\lib\net45\AnyCPU\xxxx.dll</HintPath> </Reference>
This design works great in both MSBuild and Visual Studio.
Unfortunately, after updating nuget, csproj links are messed up. Here is the result:
<Reference Include="xxxx" Condition="'$(Platform)'=='x86'"> <HintPath>..\..\packages\xxxx.2.7.0.1093\lib\net45\x86\xxxx.dll</HintPath> </Reference> <Reference Include="xxxx" Condition="'$(Platform)'=='x64'"> <HintPath>..\..\packages\xxxx.2.7.0.1093\lib\net45\x64\xxxx.dll</HintPath> </Reference> <Reference Include="xxxx"> <HintPath>..\..\packages\xxxx.2.7.0.1094\lib\net45\x86\xxxx.dll</HintPath> </Reference>
So it looks like only one link has been updated and ... the status section has been deleted and the first dll in the list has also been used.
Not what I expected. Any ideas how best to get around this problem? Does anyone use conditional links in your csproj with nuget? Any advice would be greatly appreciated!
source share