Publish properties not recognized for WPF ClickOnce Package in GitHub Action
Hello,
I have a WPF application (.NET Framework, v4.8). I have setup GitHub Action for creating ClickOnce package. Below is the build step.
# Setup MSBuild
- name: Setup MSBuild
if: always()
uses: microsoft/[email protected]
# Build WPF app
- name: Build WPF app
id: build_wpf_app
if: always()
run: msbuild ${{env.Solution_Path}} /target:publish /p:Configuration=Release
The above snippet works as expected and generates a ClickOnce package.
Now, when I update the build command as below:
msbuild ${{env.Solution_Path}} /target:publish /p:Configuration=Release;BootstrapperEnabled=true;Install=true;
I am getting below error:
Time Elapsed 00:00:31.62
BootstrapperEnabled=true: D:\a\_temp\5e67135b-dc47-445c-84a4-10cd3b8aa0f5.ps1:2
Line |
2 | … /p:Configuration=Release;BootstrapperEnabled=true;Install …
| ~~~~~~~~~~~~~~~~~~~~~~~~
| The term 'BootstrapperEnabled=true' is not recognized as a name of a cmdlet, function, script file, or
| executable program. Check the spelling of the name, or if a path was included, verify that the path is
| correct and try again.
Now, if I update the build command as below:
msbuild ${{env.Solution_Path}} /target:publish /p:Configuration=Release;Install=true;
I am getting below error:
Time Elapsed 00:00:27.07
Install=true: D:\a\_temp\48ec9f79-b111-4610-88cc-d8959b6b4095.ps1:2
Line |
2 | … /target:publish /p:Configuration=Release;Install=true
| ~~~~~~~~~~~~
| The term 'Install=true' is not recognized as a name of a cmdlet, function, script file, or executable
| program. Check the spelling of the name, or if a path was included, verify that the path is correct
| and try again.
Looks like the publish properties (https://docs.microsoft.com/en-us/visualstudio/deployment/building-clickonce-applications-from-the-command-line?view=vs-2022) are not supported or I am missing something silly.
Can anyone please help how to fix the issue?
Thanks in advance.