MSBUILD:错误 MSB1008:只能指定一个项目。开关:释放

MSBUILD : error MSB1008: Only one project can be specified. Switch: Release

我正在尝试使用

将我的代码发布到 linux 服务器上
dotnet publish –-configuration Release

在终端命令行中。这应该会在 bin/release/publish 中创建一个文件夹,其中包含准备部署到服务器上的所有文件。

但是,我收到一条错误消息,上面写着

"MSBUILD : error MSB1008: Only one project can be specified. Switch: Release" and nothing gets published to the bin folder.

我在 vscode 文件夹中创建了一个 settings.json 文件夹

{
 "deploy.reloaded": {
     "packages": [
         {
             "name": "Version 1.0.0",
             "description": "Package version 1.0.0",

             "files": [
                 "Schedule.API/bin/Release/netcoreapp3.0/publish/**"
             ]
         }
     ],

     "targets": [
         {
             "type": "sftp",
             "name": "Linux",
             "description": "SFTP folder",

             "host": "192.168.0.152", "port": 22,
             "user": "webuser", "password": "password",

             "dir": "/var/www/schedule",
             "mappings": {
                 "Schedule.API/bin/Release/netcoreapp3.0/publish/**": "/"
             }
         }
     ]
 }
}

这里的第一个破折号似乎有 copy/paste 错误:

dotnet publish –-configuration Release

第一个破折号是 (U+2013 : EN DASH)。它应该是一个简单的破折号 - (U+002D : HYPHEN-MINUS),就像第二个一样。这应该有效:

dotnet publish --configuration Release