gpt4 book ai didi

c# - 从命令行发布 WPF 项目

转载 作者:行者123 更新时间:2023-12-02 05:45:07 27 4
gpt4 key购买 nike

我有一个只包含一个 WPF 项目的解决方案,当我尝试使用 msbuild(命令行)从该项目创建一个包时,出现错误

The target "Package" does not exist in the current project.

Troy hunt 在此链接中讨论此问题 Why the target "Package" does not exist in the current project. ,但这对我没有帮助,可能是因为我使用的是 WPF 项目,而该示例是针对 Web 项目的。

谢谢

最佳答案

我正在尝试使用

创建发布项目

msbuild MyProject.csproj/t:/p:configuration=release

上面这行对于 web 项目来说工作得很好但是对于 windows 项目它应该是

msbuild MyProject.csproj/t:发布/p:configuration=release

我希望它可以节省一些人的时间

关于c# - 从命令行发布 WPF 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10379751/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com