2

We are using NuGet in our projects, we are facing issues with the csproj references of the NuGet packages.

Scenario 1

When we are installing few packages to the solution on Dev system with below details,

  • Windows 7, x64 bit
  • Visual Studio 2012
  • NuGet 2.8
  • PTC Integrity for version control

It adds the specific version to the csproj files. as given below, (csproj snippet),

<Reference Include="ABCD.XYZ, Version=1.0.6045.25123, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\ABCD.XYZ.2.0.0.0\lib\net45\ABCD.XYZ.dll</HintPath>
<Private>True</Private>
</Reference>

Scenario 2

When adding the same package on build server with below details

  • Windows Server 2008 R2
  • Visual Studio 2012
  • NuGet 2.8
  • PTC Integrity for version control

It adds below details,

<Reference Include="ABCD.XYZ">
  <HintPath>..\packages\ABCD.XYZ.2.0.0.0\lib\net45\ABCD.XYZ.dll</HintPath>
  <Private>True</Private>
</Reference>

How is the specific version is added ? I see this post is mentioning that it adds below tag to the csproj for that user, but that's not the case for us.

<SpecificVersion>False</SpecificVersion>
  • My scenario here is that, our build increments the ABCD.XYZ Assembly Version with each build. Therefore the project which has above reference is failing as it's not able to find the version above (NuGet adds strong name in the reference)

  • I have tried various build configurations like Debug, Release, x64, Any CPU etc.

  • Updating csproj manually, isn't that flexible option

So, here are my few questions,

  • How is this specific version or strong name is added to the csproj ?
  • Is there any option to add/ignore specific version ?
  • What is required to add the reference as highlighted in Scenario 2 ?

Please let us know if additional data is required.

Community
  • 1
  • 1
Vijay
  • 384
  • 4
  • 16
  • Do you have `ABCD.XYZ` registered in the global GAC on dev system? do a `gacutil /l ABCD.XYZ` from a developer command prompt and see if you get rows on the dev machine but not on the build machine. – Scott Chamberlain Jul 26 '16 at 20:39
  • No this file is not present in the GAC. – Vijay Jul 28 '16 at 16:34
  • I wonder I don't see any documentation on this part on NuGet ! – Vijay Jul 29 '16 at 19:35
  • I would [sign in and use the support page on NuGet](https://www.nuget.org/policies/contact) and see if they have any idea what is going on. If you get an answer come back here and explain it to the rest of us by posting your own answer to the question and accepting it. – Scott Chamberlain Jul 29 '16 at 19:40
  • Sure, I have raised this issue to NuGet GitHub as well. – Vijay Jul 30 '16 at 19:55
  • FYI .. Issue raised - [NuGet-Issue](https://github.com/NuGet/Home/issues/3218) – Vijay Aug 10 '16 at 15:39

0 Answers0