Skip to content

Cannot install managed packages into C++/CLR .NET Core project  #8195

Closed

Description

@abelykh0

Details about Problem

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): NA

NuGet version (x.x.x.xxx): whatever comes with VS 2019

dotnet.exe --version (if appropriate): NA

VS version (if appropriate): Visual Studio Enterprose 2019 v16.1.1

OS version (i.e. win10 v1607 (14393.321)): Windows 10 v1809 (OS Build 17763.529)

Worked before? If so, with which NuGet version: never worked, see #3171, #1121

Detailed repro steps so we can see the same problem

  1. Create new C++ Console application using the "Console App" template

  2. Right click on project, Properties, "Common Language Runtime Support" - set to "Common Language Runtime Support (/clr)", ".NET Target Framework Version" - set to "4.7.2", OK

  3. Right click on References, Manage Nuget Packages, browse to "Newtonsoft.Json", Install

Error Could not install package 'Newtonsoft.Json 12.0.2'. You are trying to install this package into a project that targets 'native,Version=v0.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.

Activity

  1. changed the title [-]Cannot install packages into C++/CLR project[/-] [+]Cannot install managed packages into C++/CLR project[/+] on Aug 21, 2019
  2. added
    Type:Engineering
    and removed
    Type:Engineering
    on Aug 21, 2019
  3. added this to the Backlog milestone on Aug 21, 2019
  4. added
    Priority:3
    on Aug 21, 2019
  5. bd4drummer commented on Nov 16, 2019

    @bd4drummer

    I have been developing in C++ CLR .Net Core against VS 2019 latest Preview. I can't call this a blocker issue for that work, but I can argue that NET Core CLR projects are not going to qualify as fully supported without this being resolved.

    Is there any possibility the priority of this to be escalated? Most just asking that we can depend on this to be resolved with the release of NET Core CLR development.

  6. Arlorean commented on Jan 15, 2020

    @Arlorean

    I'm getting the same problem trying to nuget System.Numerics.Vectors (4.5.0) into a C++/CLR project with NET Target Framework Version v4.7.2 in Microsoft Visual Studio Professional 2019 Version 16.4.3:
    Could not install package 'System.Numerics.Vectors 4.5.0'. You are trying to install this package into a project that targets 'native,Version=v0.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.

  7. added
    Resolution:External
    on May 7, 2020
  8. Sunbreak commented on Jun 15, 2020

    @Sunbreak

    I'm getting the same problem trying to nuget System.Numerics.Vectors (4.5.0) into a C++/CLR project with NET Target Framework Version v4.7.2 in Microsoft Visual Studio Professional 2019 Version 16.4.3:
    Could not install package 'System.Numerics.Vectors 4.5.0'. You are trying to install this package into a project that targets 'native,Version=v0.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.

    There seems to be workaround: https://stackoverflow.com/questions/18694947/how-can-i-make-my-managed-nuget-package-support-c-cli-projects

  9. removed this from the Backlog milestone on Jul 9, 2020
  10. 36 remaining items

  11. modified the milestones: Sprint 2022-04, on Apr 25, 2022
  12. added this to the 6.3 milestone on Jun 28, 2022
  13. nkolev92 commented on Jun 28, 2022

    @nkolev92
    Member

    Hey all,
    This is scheduled to release in 17.3.
    The support being added is PackageReference for C++/CLI .NET Core projets

    I'll update this issue with the announcements when they're ready .

  14. changed the title [-]Cannot install managed packages into C++/CLR project[/-] [+]Cannot install managed packages into C++/CLR .NET Core project [/+] on Jun 28, 2022
  15. levicki commented on Jun 30, 2022

    @levicki

    @nkolev92, @AugP

    Hey all, This is scheduled to release in 17.3. The support being added is PackageReference for C++/CLI .NET Core projets

    I'll update this issue with the announcements when they're ready .

    That's great news!

    However, from the feature name it does not seem .Net Framework will be supported?

    Can we get any official response on whether you would consider supporting it?

  16. levicki commented on Jul 1, 2022

    @levicki

    @nkolev92

    I'd refer to https://developercommunity.visualstudio.com/t/use-packagereference-in-vcxproj/351636 for any updates on the scope of the work.

    Thank you, but honestly it would have been better if you didn't -- to see that people have been asking for this for 4 years already without any progress is disturbing.

    @AugP
    I understand Microsoft's focus on .Net Core, but it still seems somewhat less stable compared to .Net Framework, and there are many large hardware and software companies having huge codebases consisting of both C++/CLI (.Net Framework) and pure .Net Framework libraries so like it or not .Net Framework is going to stay and new code is going to be written in it for quite a while longer. You may as well make it easier for us while we have to support it for our vendors and our clients.

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

Metadata

Metadata

Assignees

Labels

Functionality:RestorePartner:C++Priority:2Resolution:ExternalType:Feature

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions