A couple of issues with form designer
Hi Adam, I'm trying to convert to using VS Code + POSH tools to create WinForms, so still learning ! I've come across an issue (that might just be me not doing something right) .. I'm trying to add an icon to the main form, it adds in the relevant code into the form.designer :
Import-LocalizedData -BaseDirectory $PSScriptRoot -FileName 'Form1.resources.psd1' -BindingVariable resources
$Form1.Icon = ([System.Drawing.Icon]$resources.'$this.Icon')
But when executed it gives the following error :
Import-LocalizedData : Cannot find the Windows PowerShell data file 'Form1.resources.psd1' in directory 'D:\Programming\PowerShell.Current Projects\test\en-GB\', or in any parent culture directories. At D:\Programming\PowerShell.Current Projects\test\Form1.designer.ps1:6 char:1
So it doesn't appear to be creating the resources.psd1 file, also I notice that it's adding \en-GB\ to the folder path, which doesn't exist ?
The other minor issue i've come across may not be anything to do with POSH tools, but when I create a test button with the text "Don't click this !" it uses the single quote mark when it adds it into the designer code, which then causes havoc ! I have to manually change the single quote to double, but then VS Code keeps changing it back ! This is one of the things that really annoys me with VS and why I preferred to use VS Code as it never used to do this. Sorry id this is not related to POSH tools :)
Kind regards Damian Boizot
VS Code v1.37.1 (system) POSH Pro v 4.9.0
Comments (2)
-
-
- changed status to resolved
Resolved in 4.9.3
- Log in to comment
A work around was posted on issue
#180that should also be applicable here.