Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Nuget update command result differs from Visual Studio's (Package Manager) update

$
0
0

I have a package (MyPackage) installed in a given project.

If I update it with Visual Studio (Manage Nuget Packages) or with Update-Package command, such as:

Update-Package -Id MyPackage -Version 1.2.8-bla

The target project's csproj entry for this package looks like:

<Reference Include="MyPackage, Version=1.2.7.0, Culture=neutral, processorArchitecture=MSIL"><HintPath>..\..\..\packages\MyPackage.1.2.8-bla\lib\net48\MyPackage.dll</HintPath></Reference>

But if I update it using nuget update command such as:

nuget update path_to_csproj -Id MyPackage -Version 1.2.8-bla

Then I get:

<Reference Include="MyPackage, Version=1.2.7.0, Culture=neutral, PublicKeyToken=null"><HintPath>..\..\..\packages\MyPackage.1.2.8-bla\lib\net48\MyPackage.dll</HintPath><Private>True</Private></Reference>

The nuget update command:

  • Adds <Private>True</Private>
  • Adds PublicKeyToken=null
  • Removes processorArchitecture=MSIL

I'd like to understand why and know how I can get the same result I get with Package Manager but using nuget update command.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>