简体   繁体   English

发布选项已从VS2017的上下文菜单中删除

[英]Publish option is gone from context menu in VS2017

So I'm trying to publish a project, but for whatever reason I can't. 所以我正在尝试发布一个项目,但无论出于什么原因我都做不到。 The very last project that I added still gives me the option to do it, but none of the other projects allow me to do it. 我添加的最后一个项目仍然让我可以选择,但其他任何项目都不允许我这样做。 The publish option is missing from the context menu (see snippets). 上下文菜单中缺少发布选项(请参阅代码段)。 I tried to change the guid as explained in this article , but no luck. 我试图改变guid,如本文所述 ,但没有运气。

发布

没有发表

How do I publish my projects?? 我如何发布我的项目?

Thanks for the help in advance! 我在这里先向您的帮助表示感谢!

By the way I'm using Visual Studio Community 2017 顺便说一下,我正在使用Visual Studio Community 2017

So I haven't been able to figure out why the menu is missing, but I found a way to publish it via the command line which ends up being the same. 所以我无法弄清楚为什么缺少菜单,但我找到了一种通过命令行发布它的方法,最终是相同的。 Using a cmd with admin rights navigate to the project you want to publish and use these commands: 使用具有管理员权限的cmd导航到要发布的项目并使用以下命令:

set Platform=
set ASPNETCORE_ENVIRONMENT=
dotnet publish -c Release -o bin\Release\PublishOutput

-c specifies the configuration {Debug|Release}, and -o the relative output location. -c指定配置{Debug | Release},以及-o相对输出位置。 For more info go to the documentation of dotnet 有关更多信息,请访问dotnet的文档

I fixed this issues by using VS installer ,selected web development options and installed it. 我通过使用VS安装程序,选择的Web开发选项并安装它来修复此问题。 After installing web development settings I can publish option. 安装Web开发设置后,我可以发布选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM