Endpoint tasks.json publishes the wrong configuration

This is a VSCode issue only.

I’ve experienced this, and maybe you have too, but if I use Ctrl-Shift-B to build, and then I try to use F5, then the ‘publish’ command fails when it tries to publish the x64 bits instead of re-building for Release/Any CPU.

The fix is to edit tasks.json and change the “AppTemplPublish” task to read as follows:

        {
            "label": "AppTemplPublish",
            "command": "dotnet",
            "type": "shell",
            "dependsOn": "build",
            "args": [
                "publish",
                "-p:Platform='Any CPU'",
                "-r","linux-arm",
                "-o","bin\\linux-arm\\publish",
                "--self-contained","false"
            ]
        },

Note that the way that I have reworked this item also causes this to work on non-Windows systems. There are other tweaks required for AppTemplDeploy and AppTemplStop to make them work on non-Windows systems, but that’s not the point of this post. The above is an issue on Windows systems.

@Gus_Issa/@Dat_Tran : Where do you want issues submitted for the VSCode extension and template?

Good catch. You can list here or use the library repo for now

1 Like