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

[Bug] The "ConfigurationGeneral" rule is missing the "LanguageStandard" property #243

Open
atanadan-flutterint opened this issue Jun 20, 2024 · 5 comments
Assignees
Labels

Comments

@atanadan-flutterint
Copy link

atanadan-flutterint commented Jun 20, 2024

Installed the extension on an existing project, tried to add a dependency and I get before every build:
image
The language standard is set to C++17 on all configurations in the project(s)

@czoido czoido self-assigned this Jun 20, 2024
@czoido
Copy link
Contributor

czoido commented Jun 20, 2024

Hi @atanadan-flutterint,

Thanks a lot for reporting. A couple of questions:

  • What Visual Studio version are you using?
  • Can you share a bit about the structure of the solution? Does it have multiple projects? Are all of them VC++ projects?
  • How is the LanguageStandard set un your IDE?

We can add some checks to avoid the error but I would like to try to reproduce in case is something more I'm missing.

@czoido
Copy link
Contributor

czoido commented Jun 20, 2024

Also, could you try to create a new project with the console application template and check if it still happens?

@atanadan-flutterint
Copy link
Author

I'm using VS 2022 Community edition, Version 17.9.3
The solution has multiple projects, all of them VC++, but only one of them (from what I can determine) gives this error.

All projects were on the v141 platform toolset which doesn't have C/C++ Language Standards in the General tab of Project Properties. I tried switching to v143, updating the standard, applying, then returning to v141 which seems to resolve the issue. The project has not diff after doing that, so I don't know how that could have caused the fix/workaround.

I tried creating a new solution to test it there, but they are created with v143 and no error came up.

Dependencies are still not in the include path in either case, though. For example, if I add cereal/1.3.2 as a requirement in conandata.yml and build (logs show it being installed), I can't include anything under #include <cereal/...> (not sure if separate issue or related)

@czoido
Copy link
Contributor

czoido commented Jun 20, 2024

Ok, that makes sense, do you know which was the visual studio version where the projects were initially created?

For the includes not being recognized, as we are injecting the properties to the project programatically, sometimes Visual Studio can't reload the changes, could you please try to build again, check if it works and if it does not, close and open the solution and check if that works?

Thanks a lot.

@atanadan-flutterint
Copy link
Author

The project is old, so I'm not very sure - pre VS 2012, most likely.

I've tried opening/closing/building/rebuilding multiple times but still nothing. From what I can see, I can include e.g. cereal from a newly created project but not from this preexisting one. I can't use one of our private dependencies on either project, but I'm not 100% sure what tries to change the registry since it is disabled by our organizaton.

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

No branches or pull requests

2 participants