Skip to content

ForNeVeR/conan-vs-extension

 
 

Repository files navigation

conan-vs-extension Build status

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.

Usage

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.

Configuration

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.

Settings window screenshot

Package installation

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.

"Invoke AddConanDepends" menu item screenshot

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.

Integration with project

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.

"Integrate into project" menu item screenshot

Building without Visual Studio

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.

Build

To build the Conan Visual Studio plugin, either with Visual Studio (nothing unusual here), or use MSBuild:

$ msbuild /p:DeployExtension=false

Test

This project uses xUnit.net tests, please use any compatible test runner to run the automated tests.

About

Visual Studio Extension for using Conan.io in VC++ Projects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.9%
  • Batchfile 0.1%