Unable to package as executable

Issue #110 resolved
Former user created an issue

I'm having a problem when trying to Package as an Executable.

It was working fine, I added some code and it suddenly started complaining that :


This is VS generated code within the designer.ps1 there doesn't appear to be anything wrong with it.

$disdeleteuser_btn.Location = (New-Object -TypeName System.Drawing.Point -ArgumentList @([System.Int32]270,[System.Int32]217)) $disdeleteuser_btn.Name = [System.String]'disdeleteuser_btn' $disdeleteuser_btn.Size = (New-Object -TypeName System.Drawing.Size -ArgumentList @([System.Int32]94,[System.Int32]46)) $disdeleteuser_btn.TabIndex = [System.Int32]11 $disdeleteuser_btn.Text = [System.String]'Delete User' $disdeleteuser_btn.UseVisualStyleBackColor = $true $disdeleteuser_btn.add_Click($disdeleteuser_btn_Click)

This only started to happen when I added the below code:

#!$configmanager = 'C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1' Import-Module $configmanager cd imb:

If I comment out the Import-Module line it will compile without errors. I can run it from VS without problems.

Using: VS 2107 15.9.9 PoshPro Tools 4.2.1

Name Value ---- ----- PSVersion 5.1.16299.251 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.16299.251 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Comments (2)

  1. Log in to comment