So I'm using C++ to work on a project and I've created a GUI. I tried to use NuGet to instead a package However, it keeps bringing up this error:
Could not install package 'MetroModernUI 1.4.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 found a link on here to help me fix this issue. However another issue came up on step 2. Here is the link and error:
How can I make my managed NuGet package support C++/CLI projects?
Install failed. Rolling back...
Package 'NuGet.CommandLine.5.8.1' does not exist in project 'Project Name'
Package 'NuGet.CommandLine.5.8.1' does not exist in folder '<path>\packages'
A Package folder doesn't even exist in that directory. Someone please help me because that error also came up in the previous error when trying to instead a package using NuGet, here it is:
Install failed. Rolling back...
Package 'MetroModernUI.1.4.0' does not exist in project 'Project Name'
Package 'MetroModernUI.1.4.0' does not exist in folder '<path>\packages'
Steps
1Frist, install NuGet.CommandLine version 4.7.3
into your clr project by Nuget Package Manager UI.
2) after that, add this manually under the new created packages.config
file
<package id="MetroModernUI" version="1.4.0"/>
Then, rebuild your project to restore the nuget package MetroModernUI
.
And you can find the nuget package is installed into your project under <Solution_Folder>\packages\MetroModernUI.1.4.0.0
3) then right-click on References-->Add Reference-->Browse and then add
<Solution_Folder>\packages\MetroModernUI.1.4.0.0\lib\net\MetroFramework.dll
or any others in that folder.
You should note that clr project cannot reference net assembly dlls automatically by nuget. You should add them manually.
All of these steps will help you get what you want.