Visual Studio 2017 extension to integrate Conan C/C++ package manager functionality into any existing project.
The current task is to provide package management comparable to whan NuGet provides for .NET projects.
To use the plugin, open the Conan.VisualStudio.sln
file using the Visual
Studio 2017 and invoke the Run command on the developer machine (we aren't
providing the installer packages yet). It will create an isolated Visual Studio
environment and load the plugin.
To use the Conan executable on your local system, the plugin needs to know where
the Conan executable is. It will try to detect that automatically from your
PATH
environment variable, but you could set that manually for cases when the
automatic detection doesn't work.
To set the Conan executable location, enter "Tools → Options" menu and select "Conan" settings category.
The plugin will install the dependencies using the conan install
command. To
do that, ensure that your conanfile.txt
is placed in the same directory as
your project file or in any of its' parent directories, and then invoke the
"Tools → Invoke AddConanDepends" menu command.
It will call conan install --build missing --update
using the
visual_studio_multi
generator. After that, you'll need
to integrate the resulting property files into your Visual Studio project.
If you need any diagnostic information, please look for conan/conan.log
file
in the directory with your conanfile.
The visual_studio_multi
generator creates the
conan/conanbuildinfo.props
property file that should be integrated into your
vcxproj
file. To do that, use the "Tools → Integrate into project" menu
command. It will automatically add the corresponding <Import>
item into the
vcxproj
file.
If you need to build the generated project without Visual Studio (e.g. on a build server machine), execute the following terminal commands:
$ cd [directory with conanfile]
$ conan install . -g visual_studio_multi --install-folder ./conan -s compiler.version=15 --build missing --update
$ msbuild [usual params here]
After calling conan install
that way, msbuild
will be able to find all the
dependencies, because it'll be able to use the Conan-generated
conan/conanbuildinfo.props
file.
To build the Conan Visual Studio plugin, either with Visual Studio (nothing unusual here), or use MSBuild:
$ msbuild /p:DeployExtension=false
This project uses xUnit.net tests, please use any compatible test runner to run the automated tests.