Collaboration is impossible due to psf files being binary files

Anything you want to tell us? Praise? Criticism? Post it here. Please keep it professional and constructive.
Forum rules
Do not post any licensing information in this forum.
Locked
User avatar
ALIENQuake
Posts: 100
Last visit: Wed Oct 13, 2021 10:12 am
Has voted: 4 times

Collaboration is impossible due to psf files being binary files

Post by ALIENQuake »

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?

User avatar
Alexander Riedel
Posts: 7783
Last visit: Tue Oct 19, 2021 1:46 pm
Answers: 6
Been upvoted: 11 times

Re: Collaboration is impossible due to psf files being binary files

Post by Alexander Riedel »

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.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
ALIENQuake
Posts: 100
Last visit: Wed Oct 13, 2021 10:12 am
Has voted: 4 times

Re: Collaboration is impossible due to psf files being binary files

Post by ALIENQuake »

Your reply doesn't make any sense but maybe I haven't explained it properly.

Let's look at the simple form:
Test-Form.psf
(27.53 KiB) Downloaded 905 times
Zx4alMXs3G.png
Zx4alMXs3G.png (2.26 KiB) Viewed 22770 times
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
when my coworker will change the placement of the 'button1' from left to right, the underlying code changes will look like this:

Code: Select all

	$button1.Location = New-Object System.Drawing.Point(197, 226)
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.

User avatar
Alexander Riedel
Posts: 7783
Last visit: Tue Oct 19, 2021 1:46 pm
Answers: 6
Been upvoted: 11 times

Re: Collaboration is impossible due to psf files being binary files

Post by Alexander Riedel »

Does the other person have PowerShell Studio?
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
ALIENQuake
Posts: 100
Last visit: Wed Oct 13, 2021 10:12 am
Has voted: 4 times

Re: Collaboration is impossible due to psf files being binary files

Post by ALIENQuake »

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.

User avatar
Alexander Riedel
Posts: 7783
Last visit: Tue Oct 19, 2021 1:46 pm
Answers: 6
Been upvoted: 11 times

Re: Collaboration is impossible due to psf files being binary files

Post by Alexander Riedel »

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.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
ALIENQuake
Posts: 100
Last visit: Wed Oct 13, 2021 10:12 am
Has voted: 4 times

Re: Collaboration is impossible due to psf files being binary files

Post by ALIENQuake »

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?

User avatar
brittneyr
Site Admin
Posts: 893
Last visit: Tue Oct 19, 2021 2:56 pm
Answers: 20
Been upvoted: 17 times

Re: Collaboration is impossible due to psf files being binary files

Post by brittneyr »

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 Ryn
SAPIEN Technologies, Inc.

User avatar
ALIENQuake
Posts: 100
Last visit: Wed Oct 13, 2021 10:12 am
Has voted: 4 times

Re: Collaboration is impossible due to psf files being binary files

Post by ALIENQuake »

Thanks for the reply. My only wish is that upcoming WPF support will be implemented in a way that this limitation will not exist.

Locked