Nuget doesn't seem to be installing header files - c++

I'm new to the Nuget package manager (Maven guy normally, trying to fix a project my boss set up). Our project requires boost and openssl. Currently someone has to have boost and openssl installed on their system. I am hoping to use nuget to install the dependencies so that we can just clone-and-build anywhere that has VS2015.
But I can't make it work. Even installing the Boost headers and boost-vc140 packages, my project is still reporting Cannot open include file: 'boost/noncopyable.hpp': No such file or directory with the include #include <boost/noncopyable.hpp>.
I've tried upgrading to the newest version of nuget (the previous one ships with VS2015), I've installed all the boost nuget libraries, and just generally beat my head against this for the last day. This seems way more difficult than it should be to add dependencies to a project.
I also have no idea what openssl project to select.
Can someone please let me know what I'm doing wrong?

Related

vcpkg integrate install missing on macOS/Linux

The vcpkg helps to manage libraries for C++ projects on Windows/macOS/Linux.
On Windows one can
vcpkg integrate install
https://vcpkg.readthedocs.io/en/latest/users/integration/
But outside Windows that does not seem to exist. Am I wrong?
That end up making CMakeLists.txt made on Windows not portable to macOS/Linux. While migrating a project from Windows to macOS I found I have to add
include_directories(~/vcpkg/installed/x64-osx/include)
otherwise make will fail to find header files.

libgit2 dependency pcre not present in build

I'm building a C++ app which uses the libgit2 library to interact with a git repo. I've installed libgit2 through vcpkg, which also installed the pcre library which libgit2 needs. So far, so good. When I build my project there is no issue, only when I launch the app it throws an error that pcre.dll is not present. This is correct, pcre.dll isn't in my output folder as none of my code has any interaction with it. Libgit2 needs it.
How can I get the dependency of the dependency to be included in my final build?
Pcre is present and accounted for, but none of my code uses it so it doesn't get included in the build of my app. The git2.dll does get included with the build. The paths that need to be added to Visual Studio are there, managed by vcpkg. Everything is setup so that pcre could be included in a build if need be.
I use libgit2 v 1.1.0, Visual Studio 2019 and the latest stable version of vcpkg.
I'm running into the same issue and have opened a PR: https://github.com/microsoft/vcpkg/pull/18289
Based on Neumann-A's feedback in the PR, it looks like there may be a bug preventing the pcre DLL from getting copied to the release/deployment files. For now, you're welcome to use my vcpkg fork which exposes the "builtin" REGEX_BACKEND CMake option, which works around this problem. https://github.com/motevets/vcpkg/tree/fix-libgit2

MinGW Installation Manager - Missing devpropdef.h file

I downloaded the MinGW Installation Manager and installed most of the packages available there in trying to find the 'devpropdef.h' file.
This file is needed by the openframeworks library and without it, I cannot compile the most basic project.
This file was listed by one of the contributors in this thread, but I don't know what happened to it.
Does anyone know which package it is in from the MinGW installation manager? Or how I can get my hands on it?
The http://winlibs.com/ build of GCC/MinGW-w64 has a very recent version of MinGW-w64 which contains devpropdef.h.

Visual Studio 2017 Nuget Install Package Builds Project Instead of Installing / Uninstalling Packages

When importing existing library projects into an existing solution (after I copied them locally from somewhere else), when I try to install or uninstall a Nuget package through the package manager, it justs builds my solution showing me all of the errors I have because the package is not installed. It does nto try to install or uninstall the package. Why is it building my project instead of just installing / uninstalling the bloody package?
Why is it building my project instead of just installing /
uninstalling the bloody package?
It's not default behavior of VS IDE itself.
As for VS2017, if we install a normal package using Package Manager UI, VS will check the compatibility between the package to consume and the current project. If they're compatible, the package will be installed successfully, if not, VS will throw nuget error like NU1202 or others in ErrorList window.
But I'm sure for VS2017, installing/uninstalling won't call a build.
Possible causes of the issue and corresponding suggestions:
1.This behavior results from one third-party extension.
Reset all VS settings => disable all the third-party extensions => restart VS to check if the issue persists. If after the check you find this issue results from one extension, you need to make sure if the extension provides one option to turn on/off the auto-build. Or you may need to disable/uninstall the extension temporarily and contact the author of the extension to post the issue.
You may get more details for trouble-shooting from this similar issue.
2.Custom script(.ps1,.targets) from one specific nuget package causes this.
The authors can place powershell script and PackageID.targets in .nupkg when generating packages. Some of these scrips will execute when we install the package, others will execute when we uninstall the package. See similar issue here.
You can create a new simple console project TestProject in TestProject solution. Then right-click solution=>add=>Existing project to import a new external project. Now let's install the Newtonsoft.Json package to check if the issue disappears. If the issue disappears in new project with Newtonsoft.Json package. I think it indicates one special package you try to install/uninstall may cause the issue.
Hope all above helps and feel free to let me know if there's any update.

Nuget install faill because of a path which is to long

I'm trying to install some Package on Visual Studio 2017 using NuGet, I need the Microsoft.EntityFrameworkCore package but when I try to install, it fails because of a long path/repertory name. This path is supposed to be shorter than 260 chars (or 248 if it's a repertory name), but I can't figure out which path/repertory they're talking about (there is no more info in the error). So I did look to my C# project Path and this one is only 130 chars.
Do you have any solution ? I'm on a school project and I really need these packages , hope you guys can help me.
Nuget install faill because of a path which is to long
When we install the nuget package via NuGet to our project, NuGet will download the package from the nuget source and save it in the local cache.
For .net framework project, NuGet will save the package in the \packages folder in the solution folder by default. In this case, if we have the long file name issue, we could move the solution to the root of C disk, just like magicandre1981 said.
Besides, if you are interested in nuget, we could overwrite the repositoryPath value in the nuget.config file to change the default path of \packages folder.
Check details from this thread and the document.
For .net core/standard project, NuGet will save the package in the global folder C:\Users\<UserName>\.nuget\packages. In this case, if we have long username, we may get this issue, to resolve it, we could rename our username or we could change the default global package folder.
Check this thread for details.
Hope this helps.