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

[service] msbuild package template has import incompatible with Conan 2.0 #14098

Closed
partiallyderived opened this issue Nov 7, 2022 · 2 comments · Fixed by #14099
Closed

[service] msbuild package template has import incompatible with Conan 2.0 #14098

partiallyderived opened this issue Nov 7, 2022 · 2 comments · Fixed by #14099

Comments

@partiallyderived
Copy link
Contributor

At

from conan.tools.layout import vs_layout
, vs_layout is imported from conan.tools.layout. However, when using this import in my PR, the CI informed me that the recipe was not ready for Conan v2, citing this import error:

ERROR: Error loading conanfile at '/home/conan/w/prod_cci_PR-13646/recipes/lzham/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod_cci_PR-13646/recipes/lzham/all/conanfile.py
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/conan/w/prod_cci_PR-13646/recipes/lzham/all/conanfile.py", line 8, in <module>
    from conan.tools.layout import vs_layout
ImportError: cannot import name 'vs_layout' from 'conan.tools.layout' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conan/tools/layout/__init__.py)

Therefore, it seems the msbuild template should import vs_layout from conan.tools.microsoft instead.

@prince-chrismc
Copy link
Contributor

Thank you so much for helping us fix the templates ❤️ we have been swamped and these little things make a world of difference and I just want to let you know it's appreciated

@partiallyderived
Copy link
Contributor Author

happy to help :)

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

Successfully merging a pull request may close this issue.

2 participants