Failed to Load Designer. Failed to parse designer file.

Issue #204 resolved
Kevin Van Bogart created an issue

Versions:
PoshTools v5.0.2

PS Version v5.1.17763.771

VS Code v1.39.2

When attempting to load ‘PowerShell Pro Tools: Show Windows Form Designer’ from the ‘Command Pallet' a error message box displays and no further information is given. The PowerShell Pro Tools Form Designer will then load without any functionality beyond being able to close it. Are there logs generated by or for the extension that would be useful in troubleshooting or configuring the product? I assume there may be a corrupt build in a cache the extension is using, but I have no idea where that it as I’m only just starting to familiarize myself with Pro Tools.

Update: The extension received an update to 5.0.2 this morning, VS Code has since been reloaded and the problem persists. Additionally, the extension has been uninstalled and reinstalled without effect, though I didn’t have to import the license again so I’m guessing there’s still something cached.

Comments (9)

  1. Adam Driscoll

    Hey Kevin,

    When you issue this command, do you have a ps1 file open? It seems like it’s opening a designer file that it’s failing to parse successfully. How it works when using it in VS Code, is that it looks at the current file you have open, for example, form.ps1. It then looks to see if there is a form.designer.ps1 file in the same location. It will attempt to load that designer file, read the file to generate the form designer view and then display it. It’s failing the parsing part for some reason.

    One thing you can try is to download the form designer stand alone. It’s just an executable that you can download from our website. https://ironmansoftware.com/powershell-pro-tools/

    See if you can create new forms with it or open your existing forms.

  2. Kevin Van Bogart reporter

    Welp, that definitely pointed me in the right direction. I renamed the ‘.designer.ps1' file and it works again. The code in the designer file was pretty basic as a I didn’t get very far before the issue occurred.

    I’m glad I put this on low priority seeing how simple the fix was. Thanks for your assistance!

  3. Adam Driscoll

    Was the designer.ps1 generated by a previous run of the designer? If so, can you send me the file? I’d love to see what was causing the error.

  4. Kevin Van Bogart reporter

    As stated previously, I didn't get very far before encountering the issue. I did have a text box and a couple listboxes setup in the designer before it bombed, it doesn't appear those were saved at all.

    I had run the designer for that file before and it crashed while I was working on other tasks. I restarted the designer and made a bit more progress creating the list boxes and such before it crashed again leaving the attached file.

  5. Murphy, Sam M

    I just had the same happen to me just as i had finished creating my form have lost 4hours of work so not very happy

  6. Murphy, Sam M

    ok found the issue was when i had 2 groupboxes on form manually removed second group box and it loaded again

  7. Log in to comment