使用/p:PublishProfile =?发布的dotnet.

编程入门 行业动态 更新时间:2024-10-26 00:20:52
本文介绍了使用/p:PublishProfile =?发布的dotnet.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用特定的发布配置文件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.

本文发布于:2023-11-10 09:26:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1574997.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:PublishProfile   dotnet

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!