0

One of our underlying projects is packaged via NuGet and distributed (internally) so that other teams can consume the library - let's call it "Core." With NuGet 1.x, we got a reference in our .csproj file that looked something like this:

<Reference Include="Core">
    <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Core.1.4.1.381\lib\net40\Core.dll</HintPath>

After upgrading to NuGet 2.0, this same reference looks like this:

<Reference Include="Core, Version=1.4.1.381, Culture=neutral, processorArchitecture=MSIL">
    <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Core.1.4.1.381\lib\net40\Core.dll</HintPath>

In the Include attribute, does the Version matter? I'm explicitly setting SpecificVersion to false. I've looked through the MSBuild Project File Schema Reference, but it didn't see anything regarding how this attribute is parsed.

Thanks for input on this.

-SethO

SethO
  • 2,703
  • 5
  • 28
  • 38

1 Answers1

1

I tried under VS2010, if you specify :

<SpecificVersion>False</SpecificVersion>

the version under <Reference></Reference> is ignored.

Nico
  • 234
  • 2
  • 7
  • Thanks, Nico. Were you able to find any information about what parses/consumes the Include attribute data in the Reference tag? I'm still trying to figure out why it started showing up. – SethO Jul 10 '12 at 17:56
  • You are wondering why ... ? You could take a look at the source code on codeplex : http://nuget.codeplex.com Look after NuGet assembly, (the project is called CommandLine), there are not many assemblies referencing the Microsoft.Build API... I bet something has changed in the **AddReference** method of `NuGet.Common.MSBuildProjectSystem` class. Have a look to the history of the corresponding file (**MSBuildProjectSystem.cs**) Good luck :) – Nico Jul 12 '12 at 07:21
  • I do understand that the NuGet source code put it there. I am much more interested in how it is parsed and used on the receiving end. Knowing that setting `SpecificVersion` to false allows MSBuild to ignore the version in `Reference` makes my inquiry purely academic at this point. You've allayed my fears about the additional data in the `Include` attribute. – SethO Jul 12 '12 at 17:55