Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Conan in Visual Studio #17525

Open
1 task done
zxuan99 opened this issue Dec 26, 2024 · 3 comments
Open
1 task done

[question] Conan in Visual Studio #17525

zxuan99 opened this issue Dec 26, 2024 · 3 comments

Comments

@zxuan99
Copy link

zxuan99 commented Dec 26, 2024

What is your question?

Hi,

I have 1 question and hope that you can answer them.

  1. My conan server and client (which consists of Visual Studio) are on different machines but on the same network in an offline environment. Without using Visual Studio Conan extension, may I ask what are the configurations needed in the Visual Studio so that it is still able to inject the necessary properties into the project?

Thanks

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@davidsanfal
Copy link
Contributor

davidsanfal commented Dec 26, 2024

Hi @zxuan99 !

The configuration of a conan server doesn't depend on the compiler you are using, you just need to add it as a remote to the conan client to use it. To add it to the client you have to run a conan remote add.

conan remote add myremote https://myservername.mydomain.com

Here is the complete conan server documentation.

If you need any additional help feel free to ask.

Thank you very much!

@zxuan99
Copy link
Author

zxuan99 commented Dec 26, 2024

Hi @davidsanfal ,

I think you have misread my question

If I used the Visual Studio Conan extension, the project in Visual Studio will automatically generate relevant files and folders such as conan, conandata and relevant property sheets. However, if I prefer not to use Visual Studio Conan extension (since I link it to my private server instead of Conan Center), how should I go about to configure my Visual Studio so that it is able to automatically generate the required files, folder and property sheets.

@memsharded
Copy link
Member

Hi @zxuan99

I am afraid your question is not fully clear. If you mean how to use the MSBuild generators, the process would be something like:

  • use MSBuildDeps, MSBuildToolchain generators in your conanfile
  • conan install will generate the files
  • Add the generated .props files to your current VS project. From the IDE it is something like in the Property view, right click, add existing properties pages. In https://docs.conan.io/2/reference/tools/microsoft/msbuilddeps.html you can read about the generated files, which ones you might want to add in which projects or subprojects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants