我正在尝试使用特定的发布配置文件pubxml文件来调用"dotnet publish":
I'm trying to call "dotnet publish" with a specific publish profile pubxml file as documented here :
docs.microsoft/zh-cn/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-2.1&tabs=aspnetcore2x
但是,我尝试的所有操作似乎都导致默认行为,并且/p:PublishProfile部分被忽略.
However, everything I try seems to result in the default behaviour, and the /p:PublishProfile part is ignored.
dotnet publish /p:PublishProfile="MyFolderProfile"不起作用,也不记录任何错误,并建立到"/obj"下的默认位置.
Doesn't work, and logs no error, building to the default location under "/obj".
我确实注意到,一个故意不正确的命令具有相同的结果,例如:
I do note that an intentionally incorrect command has the same result though, eg:
dotnet publish /p:PublishProfile="MyFolderProfile-XXXXX"我做错了什么?-任何指针将不胜感激!
What am I doing wrong? - Any pointers would be greatly appreciated!
推荐答案前一段时间,我遇到了同样的问题.我设法通过改而解决:
I ran into the same issue a while ago. I managed to fix it by instead calling:
dotnet build [projectname] /p:PublishProfile=[PublishProfile]更多推荐
使用/p:PublishProfile =?发布的dotnet.
发布评论