Open Jeanmilost opened 3 months ago
Hi @Jeanmilost,
Thanks a lot for your question.
I can't think that a simple solution has not been implemented to achieve a such task. Can you please tell me how I can run correctly the Conan build for a Visual Studio 2022 solution from a batch script?
If I understand correctly you are using the Conan Visual Studio Extension and modified the generated conan_install.bat? We would need a bit more data to know what could be happening, like the project structure, the conan log output... Is the conandeps property file generated? Can you see that added in the properties manager?
Hello @czoido, thank you for your answer.
What I want to do is the following:
To summarize, I want to know if there is a command line like: conan_extension.exe /rebuild:mySolution.sln
Or if not, either to add, if possible, a such command in the extension, or if not, to explain me how to write such script, with the minimum possible of operations?
Hi @Jeanmilost,
The only thing I can think of that is similar to what you want to achieve is to use the local developer flow on your project. Maybe you can try as an starting point with the msbuild_exe
template:
conan new msbuild_exe -d name="myproject" -d version=1.0
then do something like:
conan install .
conan build .
Is this something similar yo what you want to use? You can modify the conanfile.py
generated by the plugin to have a build method that you can call to build your project like the one that the template generates.
I have a Visual Studio 2022 solution for which I need to write a completely automatized build script. The idea is to build the whole solution and get the binaries by simply double-clicking on a script file.
However I cannot find how to run the Conan build from my batch script. Based on the automatically generated
conan_install.bat
file, I tried to write the below script. But it is not working as expected, and it cause several issues, as e.g. the dependencies are not found while the solution is compiled although they were successfully built.I can't think that a simple solution has not been implemented to achieve a such task. Can you please tell me how I can run correctly the Conan build for a Visual Studio 2022 solution from a batch script?
Below is the script I tried to implement: