惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Engineering at Meta
Engineering at Meta
T
Tenable Blog
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
H
Hacker News: Front Page
I
InfoQ
L
LangChain Blog
Security Latest
Security Latest
The Cloudflare Blog
Forbes - Security
Forbes - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Scott Helme
Scott Helme
爱范儿
爱范儿
A
Arctic Wolf
F
Full Disclosure
酷 壳 – CoolShell
酷 壳 – CoolShell
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 最新话题
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - lswweb

Drone概念与答疑 Drone基于K8S的Secrets管理 Centos8通过X11使用GUI应用 Linux自己常用命令记录(待续) K8S Master节点灾备与恢复 - ETCD K8S Master节点灾备与恢复 - Host文件Copy Rook Ceph出现daemons have recently crashed异常 Ceph rbd删除image遭遇watchers异常处理 Ceph OSD更换硬盘后遭遇PG Inconsistent异常与处理 Rook Ceph OSD异常,格式化osd硬盘重新挂载 进入K8S Pod执行操作,遭遇Operation not permitted错误 K8S Pod挂载rook ceph pv报not found in the list of registered CSI drivers异常处理 Vs中调试MVC源代码步骤 快速查找找VS菜单信息(Guid、GuidId、CmdId等) 在多排序条件下SQL获文章上一条、下一条记录 Knockout中ViewModel与Model的互转 Asp.Net MVC 表单验证 AjaxOptions.OnSuccess回调方法返回的参数信息 一次自定义Configuration的悲惨经历。
手动创建vsct文件
lswweb · 2015-02-09 · via 博客园 - lswweb

  vsct文件在vs package中有着重关重要的作用,它是代表Visual Studio的命令表(Command Table),Visual Studio利用vsct文件的定义为我们的package的命令创建用户界面。如果你查看这个文件的属性的话,你会发现该文件的Build Action是VSCTCompile。在package编译过程中,vsct文件会被编译成二进制的资源,并以ResourceName作为资源ID添加到VSPackage.resx资源文件中。

  正常情况下在创建项目过程中如果在“Select VSPackage Options”步骤时选了“Menu Command、Tool Window、Customer Editor”中的任意一项,那么项目生成时将会自动生成vsct文件。如果你创建的是一个空项目,这三项都没有选择那么又如何创建vsct文件呢?

1、在vs中创建任意名称的.vsct件。例:“vspackage.vsct”

2、打开package.cs文件,定义资源标记

    [ProvideMenuResource("Menus.ctmenu", 1)]
    public sealed class CodeGeneratorPackage : Package

3、用记事本打开项目的.csproj文件

找到

<Content Include="vspackage.vsct" /> //不同vs版本可能会有所不同,可以直接搜索文件名

改为

<VSCTCompile Include="vspackage.vsct">
      <ResourceName>Menus.ctmenu</ResourceName>      //ResourceName可以随便定义,但要与package.cs文件中引用的一至   
</VSCTCompile>

4、重新打开项目并编译