MBulli / SmartCommandlineArgs

A Visual Studio Extension which aims to provide a better UI to manage your command line arguments
GNU General Public License v2.0
98 stars 35 forks source link

Commands got cleared after re-generating the solution using cmake #139

Closed AnkaChan closed 1 year ago

AnkaChan commented 1 year ago

I check the "Enable version control support" function. However, with that every time I regenerate the project the saved parameters got cleared.

Irame commented 1 year ago

Sorry for the late response, but you can have a look at the wiki page about Cmake support

maxzhu273 commented 1 year ago

I think I'm seeing something similar here too. In my case, I'm seeing the extension load from the json that is sitting next to my VS 2022 solution, but saving to the custom file path.

The way I tested this:

  1. Create a new solution in VS 2022. It doesn't seem to matter whether it's created via Visual Studio itself, or via CMake using the set_properties command.
  2. Under Smart Commandline Arguments Settings, set the following:
    • "Save Settings to JSON" to checked
    • "Use Solution Directory" to checked
    • "Use Custom JSON Path" to unchecked
  3. Create some command line args. A new *.args.json should appear with the new command line args next to the solution file.
  4. Close and reopen Visual Studio 2022. The command line args from step 3 should still be present.
  5. Under Smart Commandline Arguments Settings, change "Use Custom JSON Path" from unchecked to checked.
    • The path I used for testing was "../../tools/Smart Command Line Args" with forward slashes.
  6. Notice that a new *.args.json appears in the custom location.
  7. Modify the command line args that were created in step 3.
  8. Close and reopen Visual Studio 2022. Notice that the command line args from step 3 are still present, despite being changed in step 7.

A quick note: I noticed that I saw an issue with args not saving at all in step 7, but couldn't reliably reproduce that issue. At that time, I had "Save Settings to JSON" unchecked, and back slashes in the path in step 5.