New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to update native packages #1291

Closed
deepakaravindr opened this Issue Aug 28, 2015 · 7 comments

Comments

Projects
None yet
8 participants
@deepakaravindr
Member

deepakaravindr commented Aug 28, 2015

@iladan

Having a C++ project which is using nuget package CppNative.1.0.0.0.nupkg targeting framework "native". Packages.config looks like:

package id="CppNative" version="1.0.0.0" targetFramework="Native"

Runing nuget.exe update CppNative SolutionName.sln
Result (using nuget.exe of version 2.8.5):
WARNING: Could not install package 'CppNative 2.0.0.60'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Problem:
Package is not updated, but removed.

This bug has been moved from https://github.com/NuGet/NuGet.CommandLine/issues/10

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Oct 13, 2015

Looks like we need to fix nuget.exe update to recognize that the TFM is "native" or enable a flag to select the TFM when running nuget.exe update.

yishaigalatzer commented Oct 13, 2015

Looks like we need to fix nuget.exe update to recognize that the TFM is "native" or enable a flag to select the TFM when running nuget.exe update.

@yishaigalatzer yishaigalatzer added this to the Client-VNext milestone Oct 13, 2015

@grahamtodd

This comment has been minimized.

Show comment
Hide comment
@grahamtodd

grahamtodd Jan 27, 2016

Do we have any idea when this might be addressed? I was in the midst of trying to migrate our c++ projects across to TeamCity and publishing/consuming nuget packages, and this issue kind of fundamentally breaks things.

grahamtodd commented Jan 27, 2016

Do we have any idea when this might be addressed? I was in the midst of trying to migrate our c++ projects across to TeamCity and publishing/consuming nuget packages, and this issue kind of fundamentally breaks things.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer Jan 27, 2016

Unfortunately not :( we are locked into many other items. Would gladly take a pr for this

yishaigalatzer commented Jan 27, 2016

Unfortunately not :( we are locked into many other items. Would gladly take a pr for this

@grahamtodd

This comment has been minimized.

Show comment
Hide comment
@grahamtodd

grahamtodd Jan 27, 2016

Pardon my ignorance. What is a pr?

grahamtodd commented Jan 27, 2016

Pardon my ignorance. What is a pr?

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer commented Jan 27, 2016

Pull request.

@forderud

This comment has been minimized.

Show comment
Hide comment
@forderud

forderud Apr 13, 2016

I'm also encountering the same problem with NuGet 3.4.2 when attempting to update NuGet dependencies in a C++ project from the command line.

forderud commented Apr 13, 2016

I'm also encountering the same problem with NuGet 3.4.2 when attempting to update NuGet dependencies in a C++ project from the command line.

@harikmenon harikmenon modified the milestones: Client-VNext, Future Apr 19, 2016

@Malvineous

This comment has been minimized.

Show comment
Hide comment
@Malvineous

Malvineous Jun 5, 2016

Just came across this with NuGet 3.4.4. Trying to update native NuGet packages in a C++ build that has nothing to do with .NET results in:

For adding package 'xxx' to project 'myproject.vcxproj' that targets 'net40'.
WARNING: Could not install package 'xxx'. You are trying to install this package into a
  project that targets '.NETFramework,Version=v4.0', but the package does not contain
  any assembly references or content files that are compatible with that framework. For
  more information, contact the package author.

Performing the update through Visual Studio works, just not via the command line, so it can't happen automatically on the build server.

The irony is that when people ask how to get NuGet package restore to update packages to the latest version the answer always comes back that package restore isn't meant for this because updated packages might break the build. When it is explained that it's happening on a build server precisely to check whether the build works with the latest dependency versions, the response then is to run nuget update to do this. Which, due to this bug, doesn't actually work :-P

Malvineous commented Jun 5, 2016

Just came across this with NuGet 3.4.4. Trying to update native NuGet packages in a C++ build that has nothing to do with .NET results in:

For adding package 'xxx' to project 'myproject.vcxproj' that targets 'net40'.
WARNING: Could not install package 'xxx'. You are trying to install this package into a
  project that targets '.NETFramework,Version=v4.0', but the package does not contain
  any assembly references or content files that are compatible with that framework. For
  more information, contact the package author.

Performing the update through Visual Studio works, just not via the command line, so it can't happen automatically on the build server.

The irony is that when people ask how to get NuGet package restore to update packages to the latest version the answer always comes back that package restore isn't meant for this because updated packages might break the build. When it is explained that it's happening on a build server precisely to check whether the build works with the latest dependency versions, the response then is to run nuget update to do this. Which, due to this bug, doesn't actually work :-P

Malvineous added a commit to adplug/winamp that referenced this issue Jun 5, 2016

Appveyor: Temporarily disable auto package updates
There's a bug in NuGet which causes it to fail for native C++ projects :-(
NuGet/Home#1291

@yishaigalatzer yishaigalatzer modified the milestones: 3.5 RC, Future Jun 5, 2016

jainaashish added a commit to NuGet/NuGet.Client that referenced this issue Jun 8, 2016

jainaashish added a commit to NuGet/NuGet.Client that referenced this issue Jun 8, 2016

jainaashish added a commit to NuGet/NuGet.Client that referenced this issue Jun 9, 2016

jainaashish added a commit to NuGet/NuGet.Client that referenced this issue Jun 11, 2016

@alpaix alpaix modified the milestones: 3.5 RTM, 3.6 Beta Jul 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment