conan-io / conan-vs-extension

Conan Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
MIT License
58 stars 34 forks source link

Dynamic-link library not found on run #61

Closed blaz-kranjc closed 1 year ago

blaz-kranjc commented 5 years ago

Running a project that has a dynamic-link dependency from Visual studio fails, as conan resolved .dll are not in the PATH.

To reproduce:

  1. In the conan-vs-extension/Conan.VisualStudio.Examples/ExampleCLI/ExampleCLI/conanfile.txt add
    [options]
    fmt:shared=True
  2. Run conanfile.txt -> Install from Visual Studio
  3. Press F5

PS: Props for this project it is set to solve a bunch of awkwardness with conan usage from VS.

SSE4 commented 5 years ago

nice find! I'll try to implement a solution for this

SSE4 commented 5 years ago

seems like PATH is not updated automatically props file has correct fmt PATH after Install for conanfile.txt but, after I relaunch VS it's updated and program may run normally I'll try to find a solution how to automatically refresh it

jgsogo commented 5 years ago

Hi! I've just tried this example with fmt:shared=True and it works (using dev version of the extension and Conan 1.16.1). Conan is adding the path to the DLL to the generated property sheet, that path is added to the environment PATH variable y debugging works out of the box.

I think that nothing has changed in the extension related to this, something can have changed in Conan itself (maybe the generator visual_studio has improved), can I ask you to try again to know if this is an actual issue?

Thanks!