使用/p:PublishProfile =?发布的dotnet. [英] dotnet publish with /p:PublishProfile=?

查看:32
本文介绍了使用/p:PublishProfile =?发布的dotnet.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用特定的发布配置文件pubxml文件来调用"dotnet publish":

I'm trying to call "dotnet publish" with a specific publish profile pubxml file as documented here :

但是,我尝试的所有操作似乎都导致默认行为,并且/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.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆