Form Designer Delete my script

Hi,
I got an update few days ago,
since then when ever I change something in the form designer and save it, my script in the VSCode is cleared.

I noticed that in the Form Designer there is a TAB called Code, that loads empty.
if I am not copying my code to there it will erase it from VBCode.

please fix it.
thanks.

Version 5.6.1 will fix this issue and will be available in about 15 minutes.

thanks,

after new version i got another error:
before the update each package.psd1 was saved in it’s own working directory, so I could edit it and add my own vars in it - like icon, Modules i didn’t want to export, run as admin, Console (yes/no) and so on.

right now it saves the package in c:\temp directory for all my scripts.

*when trying to delete elements from the form i get an error:image

thanks.

Can you let me know how you are running the packaging? Is it through the VS Code command palette?

I’m working on trying to reproduce the issue with deleting controls but haven’t hit that yet.

hi,
for the Package i hope it will explain better:
https://app.box.com/s/3olktdds9w5g5vyvf0myfk2wi1urftw7

about the error when deleting controls i added a screen capture as well:
https://app.box.com/s/cdq7p06hh22xx7c7t40ua26boo9vf39r

Thanks for the videos. That’s helpful. I will take a look.

Hi,
I noticed that if you add an element that related to ToolsStripMenuItem

function InitializeComponent
{
$ToolStripMenuItem1 = (New-Object -TypeName System.Windows.Forms.ToolStripMenuItem)
$Label1 = (New-Object -TypeName System.Windows.Forms.Label)
$MenuStrip1 = (New-Object -TypeName System.Windows.Forms.MenuStrip)
$Form1.SuspendLayout()

what ever you insert after this element will bring an error while trying to delete it.

but, if you move the line:
$ToolStripMenuItem1 = (New-Object -TypeName System.Windows.Forms.ToolStripMenuItem)
to the end of the function (Just before the $Form1) deleting elements is working.

hope it will help.

thanks
Amir.

I will take a look. This is the first I’m hearing of it. Thanks!