SmartCommandlineArgs icon indicating copy to clipboard operation
SmartCommandlineArgs copied to clipboard

I get "CmdArgsParser did not load correctly" dialog on one solution.

Open BengtGustafsson opened this issue 1 year ago • 1 comments

This seems to be identical to #67 and I also see the text of #64 in the actual argument window.

I'm using your 3.1 version on VS 2022 17.9.6

Just as in #67 this only happens on one of my solutions which was open in VS when the computer was forcefully rebooted.

I deleted the json files in the build tree but that didn't help.

So it seems that some info in Microsoft's configuration files was corrupted or something like that.

BengtGustafsson avatar May 29 '24 08:05 BengtGustafsson

Besides the json file we store some data in the .suo file. Maybe that one ist corrupted?If you can reproduce the issue a log file would be nice to make the extension more robust in such cases.

MBulli avatar May 31 '24 07:05 MBulli

I have the same problem. I put the config into the .suo and directly loading a project with config stored in the .suo file fails. If I load a different project (without config) first and then switch the solution it works.

gix avatar Jan 06 '25 14:01 gix

Attaching a debugger to VS while loading a solution gives me:

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'The best overloaded method match for 'System.Collections.Generic.List<SmartCmdArgs.Logic.CmdArgumentJson>.Add(SmartCmdArgs.Logic.CmdArgumentJson)' has some invalid arguments'

in SmartCmdArgs17.dll!SmartCmdArgs.Helper.ProjectConfigHelper.GetVCProjEngineConfig.

If the config is loaded as part of package initialization then VS obviously complains about a failed InitializeAsync. I see that ProjectConfigHelper was removed in v2.6.1, so this might not be an issue anymore in the latest code.

gix avatar Jan 06 '25 15:01 gix

Does this still happen with the latest version (v3.2.1)?

Irame avatar Feb 12 '25 12:02 Irame

FYI: in my case (v3.2.1), the 'CmdArgsPackage' error also started popping up after a reboot.

I found out a duplicate "Id" in the .args.json file, and removing that entry fixed the issue.

laurelkeys avatar Feb 21 '25 15:02 laurelkeys

fixed in 99e07e88064f70f7a4d837231496458267d2dbab

Irame avatar Feb 27 '25 22:02 Irame