You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot install managed packages into C++/CLR .NET Core project #8195
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
Create new C++ Console application using the "Console App" template
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
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.
Reacted by Rob Siklos, Mihaly Hobor, JohnLudlow, Ryan, Philip Patrick, Theo Harper, Lorenzo Dematté, Andrei Krasutski, Dmitry Ignatiev, Matthieu Penant and 7 more
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.
Reacted by Ryan, Lorenzo Dematté, 房鹤·, Scot Brennecke, Igor Levicki, Yevgen Kiselgov and martingalvan-volue
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.
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.
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
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.
Activity
[-]Cannot install packages into C++/CLR project[/-][+]Cannot install managed packages into C++/CLR project[/+]bd4drummer commentedon Nov 16, 2019
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.
Arlorean commentedon Jan 15, 2020
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.Sunbreak commentedon Jun 15, 2020
There seems to be workaround: https://stackoverflow.com/questions/18694947/how-can-i-make-my-managed-nuget-package-support-c-cli-projects
36 remaining items
nkolev92 commentedon Jun 28, 2022
Hey all,
This is scheduled to release in 17.3.
The support being added is
PackageReference for C++/CLI .NET Core projetsI'll update this issue with the announcements when they're ready .
[-]Cannot install managed packages into C++/CLR project[/-][+]Cannot install managed packages into C++/CLR .NET Core project [/+]levicki commentedon Jun 30, 2022
@nkolev92, @AugP
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?
nkolev92 commentedon Jun 30, 2022
@levicki
I'd refer to https://developercommunity.visualstudio.com/t/use-packagereference-in-vcxproj/351636 for any updates on the scope of the work.
levicki commentedon Jul 1, 2022
@nkolev92
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.