Hi,
Finally, I have found a person who is willing to contribute to my Forms project. Turns out collaboration is impossible due to psf files being binary files.
Whatever extra benefit's this feature provides, It's irrelevant for me when the collaboration ability is at the stake.
How I can disable this 'feature' so we can commit to Git repository and see actual code changes with windows forms designer code instead of XML?
Collaboration is impossible due to psf files being binary files
Forum rules
Do not post any licensing information in this forum.
Do not post any licensing information in this forum.
- ALIENQuake
- Posts: 112
- Last visit: Mon Nov 28, 2022 12:28 pm
- Has voted: 4 times
- Alexander Riedel
- Posts: 8283
- Last visit: Fri Jun 09, 2023 11:35 pm
- Been upvoted: 30 times
Re: Collaboration is impossible due to psf files being binary files
PSF files are not binary. They are text files. The code inside is plain text.
What is stored as 'binary' (encoded as text) is the form and its preview. Since the Windows Forms designer does not support PowerShell,
a round-robin code - object - code is not possible. I sincerely doubt that Microsoft will add PowerShell to the designer supported languages at any time.
So it is neither feature nor malfeasance on our part, it is simply a necessity.
What is stored as 'binary' (encoded as text) is the form and its preview. Since the Windows Forms designer does not support PowerShell,
a round-robin code - object - code is not possible. I sincerely doubt that Microsoft will add PowerShell to the designer supported languages at any time.
So it is neither feature nor malfeasance on our part, it is simply a necessity.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- ALIENQuake
- Posts: 112
- Last visit: Mon Nov 28, 2022 12:28 pm
- Has voted: 4 times
Re: Collaboration is impossible due to psf files being binary files
Your reply doesn't make any sense but maybe I haven't explained it properly.
Let's look at the simple form: code:
when my coworker will change the placement of the 'button1' from left to right, the underlying code changes will look like this:
then, he can commit this change into a git repository, I can review it and merge it.
But this code is not visible inside .psf file. All we see is XML data that can't be reviewed. And if I do GUI changes myself, there is no way to merge both changes.
Let's look at the simple form: code:
Code: Select all
#----------------------------------------------
#region Generated Form Code
#----------------------------------------------
$form1.SuspendLayout()
#
# form1
#
$form1.Controls.Add($button1)
$form1.AutoScaleDimensions = New-Object System.Drawing.SizeF(6, 13)
$form1.AutoScaleMode = 'Font'
$form1.ClientSize = New-Object System.Drawing.Size(284, 261)
$form1.Name = 'form1'
$form1.Text = 'Form'
$form1.add_Load($form1_Load)
#
# button1
#
$button1.Location = New-Object System.Drawing.Point(12, 226)
$button1.Name = 'button1'
$button1.Size = New-Object System.Drawing.Size(75, 23)
$button1.TabIndex = 0
$button1.Text = 'button1'
$button1.UseVisualStyleBackColor = $True
$button1.add_Click($button1_Click)
$form1.ResumeLayout()
#endregion Generated Form Code
Code: Select all
$button1.Location = New-Object System.Drawing.Point(197, 226)
But this code is not visible inside .psf file. All we see is XML data that can't be reviewed. And if I do GUI changes myself, there is no way to merge both changes.
- Alexander Riedel
- Posts: 8283
- Last visit: Fri Jun 09, 2023 11:35 pm
- Been upvoted: 30 times
Re: Collaboration is impossible due to psf files being binary files
Does the other person have PowerShell Studio?
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- ALIENQuake
- Posts: 112
- Last visit: Mon Nov 28, 2022 12:28 pm
- Has voted: 4 times
Re: Collaboration is impossible due to psf files being binary files
Yes, we are modifying the whole project at the same time. With ps1 files there is no problem as both of us can see all related changes.
- Alexander Riedel
- Posts: 8283
- Last visit: Fri Jun 09, 2023 11:35 pm
- Been upvoted: 30 times
Re: Collaboration is impossible due to psf files being binary files
The UI code is always generated out of the object, so you cannot work on the UI at the same time.
Place pure code in specific files as much as possible.
It is basically not any different than resources in a C++ project. Even though it is technically text, you need to serialize modifications.
Place pure code in specific files as much as possible.
It is basically not any different than resources in a C++ project. Even though it is technically text, you need to serialize modifications.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- ALIENQuake
- Posts: 112
- Last visit: Mon Nov 28, 2022 12:28 pm
- Has voted: 4 times
Re: Collaboration is impossible due to psf files being binary files
It appears to me that the way how 'forms code' is handled is specific to PowerShell Studio's internal design. What are the chances of changing? Can I have a simple and straightforward answer?
Re: Collaboration is impossible due to psf files being binary files
We have no plans to change the psf format at this time. I have added this to the list of things to look into for the development team. As for when that will happen, there is no timeline.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- ALIENQuake
- Posts: 112
- Last visit: Mon Nov 28, 2022 12:28 pm
- Has voted: 4 times
Re: Collaboration is impossible due to psf files being binary files
Thanks for the reply. My only wish is that upcoming WPF support will be implemented in a way that this limitation will not exist.