Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify additional include directories for msbuild.exe

I am attempting to install the nodejs module ibm_db. The issue I am having is that in order to install this module node-gyp needs to build it using msbuild, but it won't detect some header files I have installed.

How do I add the directory of my additional header files to some path so hatt msbuild.exe will find them when trying to compile any project? On linux I simply set cpath= and everything build just fine.

Thanks!

like image 203
EthanLWillis Avatar asked Mar 12 '14 18:03

EthanLWillis


People also ask

How do I add additional directories in Visual Studio 2022?

Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio. Select the Configuration Properties > C/C++ > General property page. Modify the Additional Include Directories property.

How do you build MSBuild solution?

To build a specific target of a specific project in a solution. At the command line, type MSBuild.exe <SolutionName>. sln , where <SolutionName> corresponds to the file name of the solution that contains the target that you want to execute.

What is MSBuild command?

The build command is used to build an image from a Dockerfile, but the command has to be run in the same directory as the Dockerfile. When an image is built, the commands specified in the Dockerfile are executed. The operating system is installed​ along with all the packages required in the Docker container.


1 Answers

MSBuild exposes special properties for resolving references in build time. You can set AssemblySearchPaths and AdditionalLibPaths.

E.g. msbuild your.sln /p:AssemblySearchPaths="C:\Dev\Lib\Foo;C:\Dev\Lib\Bar;"

See Common MSBuild Project Properties

like image 85
KMoraz Avatar answered Oct 14 '22 14:10

KMoraz